From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor@opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi@qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi@qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] I/O error in writeArray Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi@qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces@qbang.org [mailto:rxtx-bounces@qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi@qbang.org _______________________________________________ Rxtx mailing list Rxtx@qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces@qbang.org [mailto:rxtx-bounces@qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi@qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces@qbang.org [mailto:rxtx-bounces@qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces@qbang.org [mailto:rxtx-bounces@qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi@qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx@qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi@qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces@qbang.org [mailto:rxtx-bounces@qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi@qbang.org _______________________________________________ Rxtx mailing list Rxtx@qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi@qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi@qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi@qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi@qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx@qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi@qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx@qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx@qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi@qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx@qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx@qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx@qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi@qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx@qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx@qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx@qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx@qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi@qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi@qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi@qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 14 23:22:06 2006 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi@qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 14 23:22:07 2006 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue Mar 14 23:22:07 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 14 23:22:07 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi@qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 14 23:22:07 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi@qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 14 23:22:07 2006 Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi@qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 14 23:22:07 2006 Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi@qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor@opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0001.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi@qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi@qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] I/O error in writeArray Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0001.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0001.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0001.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0001.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi@qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces@qbang.org [mailto:rxtx-bounces@qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi@qbang.org _______________________________________________ Rxtx mailing list Rxtx@qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces@qbang.org [mailto:rxtx-bounces@qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi@qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces@qbang.org [mailto:rxtx-bounces@qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces@qbang.org [mailto:rxtx-bounces@qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi@qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx@qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi@qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces@qbang.org [mailto:rxtx-bounces@qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi@qbang.org _______________________________________________ Rxtx mailing list Rxtx@qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi@qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0001.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi@qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi@qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi@qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx@qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi@qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx@qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx@qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi@qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx@qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx@qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx@qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi@qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx@qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx@qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx@qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx@qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi@qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi@qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi@qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi@qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi@qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi@qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi@qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 18:25:31 2006 Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi@qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Tue Mar 28 20:17:25 2006 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor@opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0002.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 20:17:25 2006 Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi@qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 20:17:25 2006 Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi@qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] I/O error in writeArray Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0002.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0002.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0002.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0002.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi@qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces@qbang.org [mailto:rxtx-bounces@qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi@qbang.org _______________________________________________ Rxtx mailing list Rxtx@qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces@qbang.org [mailto:rxtx-bounces@qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi@qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces@qbang.org [mailto:rxtx-bounces@qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces@qbang.org [mailto:rxtx-bounces@qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi@qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx@qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi@qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces@qbang.org [mailto:rxtx-bounces@qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi@qbang.org _______________________________________________ Rxtx mailing list Rxtx@qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi@qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0002.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi@qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi@qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi@qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx@qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi@qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx@qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx@qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi@qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx@qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx@qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx@qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi@qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx@qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx@qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx@qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx@qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi@qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi@qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi@qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx@qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi@qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi@qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi@qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi@qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue Mar 28 20:17:26 2006 Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi@qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0003.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0003.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0003.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0003.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0003.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0003.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0003.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0004.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0004.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0004.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0004.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0004.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0004.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0004.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0005.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0005.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0005.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0005.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0005.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0005.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0005.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0006.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0006.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0006.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0006.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0006.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0006.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0006.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0007.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0007.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0007.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0007.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0007.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0007.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0007.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0008.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0008.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0008.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0008.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0008.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0008.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0008.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0009.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0009.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0009.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0009.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0009.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0009.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0009.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0010.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0010.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0010.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0010.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0010.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0010.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0010.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0011.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0011.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0011.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0011.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0011.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0011.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0011.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0012.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0012.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0012.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0012.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0012.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0012.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0012.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0013.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0013.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0013.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0013.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0013.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0013.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0013.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0014.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0014.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0014.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0014.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0014.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0014.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0014.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0015.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0015.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0015.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0015.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0015.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0015.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0015.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0016.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0016.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0016.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0016.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0016.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0016.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0016.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0017.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0017.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0017.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0017.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0017.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0017.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0017.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0018.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0018.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0018.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0018.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0018.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0018.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0018.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0019.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0019.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0019.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0019.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0019.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0019.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0019.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0020.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0020.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0020.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0020.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0020.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0020.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0020.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0021.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0021.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0021.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0021.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0021.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0021.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0021.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0022.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0022.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0022.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0022.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0022.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0022.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0022.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0023.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0023.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0023.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0023.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0023.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0023.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0023.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0024.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0024.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0024.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0024.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0024.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0024.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0024.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0025.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0025.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0025.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0025.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0025.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0025.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0025.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0026.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0026.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0026.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0026.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0026.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0026.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0026.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0027.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0027.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0027.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0027.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0027.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0027.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0027.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0028.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0028.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0028.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0028.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0028.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0028.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0028.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0029.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0029.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0029.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0029.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0029.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0029.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0029.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0030.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0030.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0030.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0030.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0030.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0030.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0030.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0031.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0031.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0031.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0031.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0031.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0031.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0031.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0032.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0032.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0032.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0032.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0032.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0032.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0032.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0033.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0033.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0033.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0033.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0033.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0033.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0033.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0034.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0034.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0034.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0034.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0034.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0034.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0034.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0035.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0035.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0035.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0035.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0035.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0035.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0035.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0036.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0036.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0036.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0036.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0036.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0036.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0036.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0037.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0037.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0037.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0037.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0037.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0037.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0037.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0038.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0038.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0038.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0038.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0038.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0038.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0038.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0039.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0039.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0039.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0039.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0039.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0039.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0039.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0040.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0040.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0040.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0040.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0040.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0040.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0040.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0041.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0041.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0041.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0041.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0041.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0041.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0041.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0042.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0042.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0042.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0042.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0042.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0042.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0042.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0043.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0043.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0043.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0043.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0043.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0043.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0043.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0044.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0044.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0044.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0044.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0044.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0044.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0044.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0045.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0045.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0045.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0045.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0045.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0045.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0045.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0046.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0046.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0046.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0046.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0046.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0046.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0046.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0047.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0047.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0047.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0047.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0047.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0047.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0047.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0048.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0048.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0048.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0048.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0048.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0048.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0048.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0049.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0049.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0049.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0049.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0049.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0049.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0049.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0050.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0050.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0050.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0050.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0050.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0050.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0050.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0051.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0051.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0051.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0051.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0051.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0051.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0051.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0052.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0052.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0052.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0052.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0052.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0052.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0052.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0053.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0053.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0053.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0053.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0053.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0053.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0053.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0054.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0054.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0054.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0054.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0054.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0054.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0054.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0055.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0055.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0055.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0055.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0055.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0055.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0055.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0056.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0056.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0056.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0056.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0056.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0056.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0056.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0057.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0057.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0057.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0057.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0057.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0057.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0057.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0058.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0058.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0058.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0058.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0058.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0058.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0058.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0059.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0059.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0059.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0059.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0059.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0059.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0059.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0060.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0060.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0060.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0060.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0060.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0060.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0060.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0061.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0061.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0061.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0061.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0061.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0061.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0061.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0062.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0062.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0062.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0062.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0062.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0062.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0062.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0063.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0063.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0063.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0063.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0063.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0063.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0063.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0064.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0064.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0064.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0064.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0064.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0064.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0064.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0065.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0065.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0065.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0065.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0065.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0065.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0065.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0066.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0066.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0066.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0066.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0066.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0066.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0066.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0067.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0067.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0067.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0067.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0067.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0067.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0067.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0068.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0068.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0068.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0068.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0068.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0068.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0068.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0069.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0069.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0069.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0069.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0069.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0069.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0069.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0070.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0070.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0070.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0070.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0070.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0070.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0070.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0071.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0071.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0071.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0071.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0071.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0071.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0071.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0072.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0072.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0072.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0072.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0072.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0072.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0072.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0073.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0073.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0073.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0073.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0073.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0073.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0073.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0074.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0074.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0074.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0074.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0074.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0074.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0074.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0075.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0075.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0075.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0075.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0075.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0075.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0075.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0076.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0076.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0076.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0076.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0076.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0076.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0076.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0077.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0077.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0077.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0077.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0077.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0077.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0077.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0078.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0078.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0078.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0078.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0078.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0078.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0078.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0079.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0079.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0079.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0079.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0079.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0079.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0079.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0080.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0080.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0080.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0080.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0080.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0080.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0080.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0081.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0081.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0081.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0081.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0081.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0081.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0081.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0082.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0082.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0082.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0082.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0082.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0082.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0082.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0083.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0083.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0083.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0083.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0083.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0083.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0083.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0084.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0084.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0084.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0084.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0084.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0084.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0084.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0085.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0085.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0085.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0085.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0085.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0085.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0085.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0086.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0086.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0086.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0086.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0086.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0086.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0086.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0087.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0087.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0087.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0087.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0087.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0087.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0087.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0088.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0088.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0088.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0088.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0088.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0088.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0088.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0089.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0089.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0089.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0089.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0089.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0089.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0089.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0090.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0090.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0090.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0090.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0090.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0090.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0090.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0091.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0091.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0091.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0091.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0091.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0091.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0091.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0092.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0092.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0092.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0092.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0092.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0092.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0092.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0093.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0093.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0093.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0093.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0093.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0093.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0093.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0094.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0094.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0094.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0094.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0094.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0094.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0094.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0095.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0095.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0095.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0095.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0095.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0095.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0095.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar differ $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar [] $ find rxtx-devel/ -name \*.jnilib rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib I think this could lead to confusion. it looks like there are multiple copies and some are outdated. When people run into problems they tend to become rather random in behavior. Eliminating obvious bad choices would help. On Sat, 28 Jan 2006, Dmitry Markman wrote: > well > I already did it (but I think the name should be librxtxSerial.jnilib, at > least > RXTXPort class has static initialization that call > System.loadLibrary( "rxtxSerial" ) ) > > problem is that that library will be good only for mac os x 10.4 and higher > it probably won't work for 10.3 or 10.2 > > also I didn't check that library, so if somebody can do that > I'd be very grateful > > thanks > > > however CVS has the file LibSerial.pbproj.sit.hqx that contains the project > that builds > binaries for the 10.3 and 10.2 > > On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > >> >> Hi Dmitry >> >> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was >> thinking of the following: >> >> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >> Extensions/libSerial.jnilib >> >> These tend to be older releases if we dont sync and some folks pull them >> out for installs. >> >> I still need to get two patches in today but it will be ready first thing >> tomorrow for sure. >> >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi, Trent >>> >>> how I can access that tree? >>> I can't see it inside of the rxtx-devel folder >>> >>> thanks >>> >>> >>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>> >>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>> Hi >>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>> this is a XCode 2.2.1 project for building universal libraries >>>>> I didn't test built libraries (I don't have the appropriate hardware) >>>>> enjoy >>>> Thanks Dmitry >>>> With the Mac OS X, we have the build tree with binaries in rxtx source. >>>> Would you be interested in rebuilding that tree tomorrow or early next >>>> week so they have 2.1.7 binaries in the tree? I could also put those in >>>> the binary package for people like Doug working on installers then. >>>> The auto* tools should also work with Mac OS X now too. >>>> -- >>>> Trent Jarvi >>>> tjarvi at qbang.org >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >>> Dmitry Markman >>> >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 17:10:18 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 19:10:18 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: since CodeWarrior is officially dead I removed all CW directory from the CVS Trent, please, remove CW directory from the server I removed file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/libSerial.jnilib as well however file rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/ Java/Extensions/librxtxSerial.jnilib is untested and should be good only for 10.4.X on PPC or Intel On Jan 28, 2006, at 6:30 PM, Trent Jarvi wrote: > > Hi Dmitry > > Perhaps we should doing a cvs delete on a few files. For instance: > $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx- > devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar differ > $ ls -l ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/ > MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/ > RXTXcomm.jar > -rw-r--r-- 1 root root 126488 Sep 23 2004 ./rxtx-devel/MACOSX_IDE/ > CW/RXTXcomm.jar > -rw-r--r-- 1 root root 111646 Jan 28 04:26 ./rxtx-devel/MACOSX_IDE/ > ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar > [] $ find rxtx-devel/ -name \*.jnilib > rxtx-devel/MACOSX_IDE/CW/libI2C.jnilib > rxtx-devel/MACOSX_IDE/CW/libParallel.jnilib > rxtx-devel/MACOSX_IDE/CW/libRS485.jnilib > rxtx-devel/MACOSX_IDE/CW/librxtxSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/librxtxSerial.jnilib > > I think this could lead to confusion. it looks like there are > multiple copies and some are outdated. When people run into > problems they tend to become rather random in behavior. > Eliminating obvious bad choices would help. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> well >> I already did it (but I think the name should be >> librxtxSerial.jnilib, at least >> RXTXPort class has static initialization that call >> System.loadLibrary( "rxtxSerial" ) ) >> >> problem is that that library will be good only for mac os x 10.4 >> and higher >> it probably won't work for 10.3 or 10.2 >> >> also I didn't check that library, so if somebody can do that >> I'd be very grateful >> >> thanks >> >> >> however CVS has the file LibSerial.pbproj.sit.hqx that contains >> the project that builds >> binaries for the 10.3 and 10.2 >> >> On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: >> >>> Hi Dmitry >>> With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I >>> was thinking of the following: >>> rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ >>> Extensions/libSerial.jnilib >>> These tend to be older releases if we dont sync and some folks >>> pull them out for installs. >>> I still need to get two patches in today but it will be ready >>> first thing tomorrow for sure. >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi, Trent >>>> how I can access that tree? >>>> I can't see it inside of the rxtx-devel folder >>>> thanks >>>> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >>>>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>>>> Hi >>>>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>>>> this is a XCode 2.2.1 project for building universal libraries >>>>>> I didn't test built libraries (I don't have the appropriate >>>>>> hardware) >>>>>> enjoy >>>>> Thanks Dmitry >>>>> With the Mac OS X, we have the build tree with binaries in rxtx >>>>> source. Would you be interested in rebuilding that tree >>>>> tomorrow or early next week so they have 2.1.7 binaries in the >>>>> tree? I could also put those in the binary package for people >>>>> like Doug working on installers then. >>>>> The auto* tools should also work with Mac OS X now too. >>>>> -- >>>>> Trent Jarvi >>>>> tjarvi at qbang.org >>>>> _______________________________________________ >>>>> Rxtx mailing list >>>>> Rxtx at qbang.org >>>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>>> Dmitry Markman >>>> _______________________________________________ >>>> Rxtx mailing list >>>> Rxtx at qbang.org >>>> http://mailman.qbang.org/mailman/listinfo/rxtx >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From dmarkman at mac.com Sat Jan 28 19:46:56 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 21:46:56 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: I made the following changes in the CVS: (2.1) folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources file RXTX.pre_install was deleted files preinstall and preupgrade was added file preinstall and preupgrade handle /var/lock directory (as SerialImp.h suggests) folder rxtx-devel/MACOSX_IDE/ForPackageMaker file RXTX_Tiger.pmproj.sitx.hqx that file is an installer project (Tiger) file RXTX_Tiger.pkg.sitx.hqx this file is an installer itself I tested that installer on my iMac G5 (10.4.4) and it worked well also I tested (very lightly) jnilib and it looks like it works too but extensive testing is still required (currently I have just keyspan adapter, but I don't have any device, so I just tested that rxtx recognizes serial port without errors) that installer contains universal library so in theory it should work on intel's Macintosh Dmitry Markman From tjarvi at qbang.org Sat Jan 28 19:54:49 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 19:54:49 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > I made the following changes in the CVS: > (2.1) > folder rxtx-devel/MACOSX_IDE/ForPackageMaker/Resources > file RXTX.pre_install was deleted > files preinstall and preupgrade was added > > file preinstall and preupgrade handle /var/lock directory > (as SerialImp.h suggests) > > folder rxtx-devel/MACOSX_IDE/ForPackageMaker > > file RXTX_Tiger.pmproj.sitx.hqx > that file is an installer project (Tiger) > > file RXTX_Tiger.pkg.sitx.hqx > this file is an installer itself > > I tested that installer on my iMac G5 (10.4.4) > and it worked well > > also I tested (very lightly) jnilib and it looks like it works too > but extensive testing is still required > (currently I have just keyspan adapter, but I don't have any device, > so I just tested that rxtx recognizes serial port without errors) > > that installer contains universal library > so in theory it should work on intel's Macintosh > Neat Dmitry As all changes are going to happen in RXTXPort.java, I can just sneak a jar into the Mac OS X tree when I make those changes so we are all on the same boat in the release. 1) a close speeup fix 2) a flush fix so close does not hang. I'll post with links (when I find them :) shortly. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sat Jan 28 21:49:03 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 21:49:03 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 Message-ID: We are quickly comming to the release of 2.1-7. This will probably be the last release before may. There are many little fixes that will help users. While it has not been formally tested, I'm confident this release will be one of the best yet. I think these will be the last changes before 2.1-8. Does anyone know of something missing? I'll do builds in the morning. I need to read through the last patch one more time but this is whats going down. 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html I looks like we will have binaries for the following platforms initially x86-w32 x86-linux x86_64-linux arm-linux (pending cross tools) mips-linux (pending cross tools) ppc-linux (pending cross tools) ppc-Mac OS X x86-Mac OS X Sparc Solaris (pending permission - no cc installed) If you would like to work with us getting more platforms into the mix, please bounce and email. Some that should work but we dont have build tools for: w64 (gnu tools are not there yet) hp-ux (I may have access to one of these without cc) aix irix dec unix x86 Solaris unixware openunix wince (this needs closed source tools) *bsd (I could do this on a slow day) others I may have missed. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 22:42:52 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 00:42:52 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: small comment Apple doesn't use x86 notation it uses i386 (and BTW it has nothing to do with i386 set of command it's just notion of the intel processor in general, so don't be afraid :-) ) so I'd recommend i386-Mac OS X instead of x86-Mac OS X but it's not that important I think thanks On Jan 28, 2006, at 11:49 PM, Trent Jarvi wrote: > > We are quickly comming to the release of 2.1-7. This will probably > be the last release before may. There are many little fixes that > will help users. While it has not been formally tested, I'm > confident this release will be one of the best yet. > > I think these will be the last changes before 2.1-8. Does anyone > know of something missing? I'll do builds in the morning. I need > to read through the last patch one more time but this is whats > going down. > > 2.1-7 Jan 29 2006 > Mac OS X x86/universal binaries/install fixes > Dmitry Markman > http://mailman.qbang.org/pipermail/rxtx/ > 20060128/002169.html > catch exceptions on flush() so close() works. > Adam Walsh > http://mailman.qbang.org/pipermail/rxtx/ > 20060118/002131.html > more close() performance fixes > ?yvind Harboe > http://mailman.qbang.org/pipermail/rxtx/ > 20060119/002135.html > > I looks like we will have binaries for the following platforms > initially > > x86-w32 > x86-linux > x86_64-linux > arm-linux (pending cross tools) > mips-linux (pending cross tools) > ppc-linux (pending cross tools) > ppc-Mac OS X > x86-Mac OS X > Sparc Solaris (pending permission - no cc installed) > > If you would like to work with us getting more platforms into the > mix, please bounce and email. Some that should work but we dont > have build tools for: > > w64 (gnu tools are not there yet) > hp-ux (I may have access to one of these without cc) > aix > irix > dec unix > x86 Solaris > unixware > openunix > wince (this needs closed source tools) > *bsd (I could do this on a slow day) > others I may have missed. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 22:54:33 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 22:54:33 -0700 (MST) Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dmitry Markman wrote: > small comment > Apple doesn't use x86 notation > it uses i386 (and BTW it has nothing to do with i386 set of command it's just > notion of the intel processor in general, so don't be afraid :-) ) > so I'd recommend i386-Mac OS X instead of x86-Mac OS X > but it's not that important I think > Nods. What does gcc -dumpmachine say? Thats how I try to split up the binaries not with the source. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sun Jan 29 06:54:07 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sun, 29 Jan 2006 08:54:07 -0500 Subject: [Rxtx] Summary of Changes for Jan 28 In-Reply-To: References: Message-ID: <022D2DF9-20DD-4916-86F1-EE5D20C1BB6D@mac.com> for ppc version it returns powerpc-apple-darwin8 I don't have intel's mac, so I sent questio ti the xcode list and I got answer from Alexander von Below below at mac dot com % gcc -dumpmachine i686-apple-darwin8 On Jan 29, 2006, at 12:54 AM, Trent Jarvi wrote: > Nods. What does gcc -dumpmachine say? Thats how I try to split up > the binaries not with the source. Dmitry Markman From lyon at docjava.com Sun Jan 29 07:07:23 2006 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Sun, 29 Jan 2006 09:07:23 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: Hi All, Is it possible to do a build for all the binaries for all the platforms from a single platform? For example, suppose you are on Linux, then typing "make" should enable the creation of the binaries for each supported platform. At present, if I want to make for the mac, I have to be on a mac. This enables the different versions of the source code in Java to drift away from the different versions of the source code in C. Such a drift is a fruitful source of bugs. Thanks! - Doug From tjarvi at qbang.org Sun Jan 29 11:03:12 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 11:03:12 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sun, 29 Jan 2006, Dr. Douglas Lyon wrote: > Hi All, > Is it possible to do a build for all the binaries for all > the platforms from a single platform? > > For example, suppose you are on Linux, > then typing "make" should enable the creation > of the binaries for each supported platform. > > At present, if I want to make for the mac, I have to be > on a mac. This enables the different versions of the source > code in Java to drift away from the different versions of > the source code in C. > > Such a drift is a fruitful source of bugs. > Hi Doug Yes and no :) The gcc toolchain is fairly good at compiling to various hosts. This can be configured as a cross toochaing along with glibc and binutils. But the question becomes 'which versions?' You can see some neat work done a while ago looking at just a few targets here: http://kegel.com/crosstool/crosstool-0.38/buildlogs/ Thats just linux. Platforms that dont use glibc are especially problematic because the host libraries are needed which usually means obtaining a closed source product license for the entire operating system. But you can build a cross compiler to Mac OS X. You may run into tiny bugs in gcc depending upon the version (I'd probably try 3.4.5). You probably wont find it premade. This is way to much for discussion on the rxtx list. See the Crossgcc FAQ, the crosstool above and when you run into problems (which always happens) the gurus with tell you "Just THINK!!!" It is fun if you get it working though :) -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 16:23:17 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 16:23:17 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: >> At present, if I want to make for the mac, I have to be >> on a mac. This enables the different versions of the source >> code in Java to drift away from the different versions of >> the source code in C. >> >> Such a drift is a fruitful source of bugs. >> > One solution to this is to nfs/smb/afs mount your home directory so you are always using the same code. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 20:18:57 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 20:18:57 -0700 (MST) Subject: [Rxtx] rxtx 2.1.7 or 2.1.8? Message-ID: We have been working on pre 2.1.7 for some time :) Would it cause less confusion if we call it 2.1.8? I'm about ready to tag and release the source. The bins I'm working on. If nobody comments I'll just go with 2.1.7. Its going to take a while to find the loopback to test a little. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Sun Jan 29 23:55:26 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sun, 29 Jan 2006 23:55:26 -0700 (MST) Subject: [Rxtx] rxtx-2.1-7 Message-ID: Many thanks to all that have contributed to rxtx-2.1-7! I have managed to test rxtx-2.1-7 on Windows XP and Fedora Linux. A small step. It looks good so far. I won't be releasing the bins tonight. I want to put some documentation in this time to help new users. We will be having rxtx-2.1-8 around May for those that need to get new things in. This includes me. I was terrified tonight when I tried XP. Nothing was working. It turned out vmware didnt have they physical ports attached but windows didn't complain. After digging through that, I'm confident things are OK. For now, developers can preview rxtx-2.1-7 (stable). ftp://ftp.qbang.org/pub/rxtx/rxtx-2.1-7.zip (source). I will provide bins probably later this week as I have time. If you want to contribute bins, please let me know. I think this is going to be good for any projects. I just don't want to have to do it twice and cause confusion. When I put bins up, I'll be giving a list of known problems also to save people time. Some of these I will be looking at too. My 'unreleased' last builds are also located at: ftp://ftp.qbang.org/pub/rxtx/lastbuild/ Dmitry's Mac OS X builds are in the source (with an updated .jar). 2.1-7 Jan 29 2006 Mac OS X x86/universal binaries/install fixes Dmitry Markman http://mailman.qbang.org/pipermail/rxtx/20060128/002169.html catch exceptions on flush() so close() works. Adam Walsh http://mailman.qbang.org/pipermail/rxtx/20060118/002131.html more close() performance fixes ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060119/002135.html Blue Tooth Support cleanup writeByte so close works, send the original exceptions so people can see the exception. Paul http://mailman.qbang.org/pipermail/rxtx/20051229/002014.html http://mailman.qbang.org/pipermail/rxtx/20060108/002053.html %s/\`which java\`/\\\`which java\\\`/g in configure.in Takeshi "Ken" Hamasaki http://mailman.qbang.org/pipermail/rxtx/20060105/002039.html System.gc() slows down close() too much. ?yvind Harboe http://mailman.qbang.org/pipermail/rxtx/20060103/002025.html Configure.java message correction User serial_close and serial_open in termios.c JNI_OnLoad and JNI_OnUnload are in SerialImp.c now so remove them from init.c Gerrit Telkamp http://mailman.qbang.org/pipermail/rxtx/20051230/002018.html (See also rxtx-2.1-7pre[1-22]) -- Trent Jarvi tjarvi at qbang.org From trevor at opecsystem.com Mon Jan 23 12:37:21 2006 From: trevor at opecsystem.com (Trevor Sutton) Date: Mon, 23 Jan 2006 19:37:21 -0000 Subject: [Rxtx] Serial operation for USB serial ports on linux Message-ID: <000001c62054$6dda1bb0$2b001eac@aries> Hi Can anybody give me a few pointers on where in the c code is the best place to look for serial rx interrupts? The problem I have is linux box with an usb to eight serial ports board. I know the usb/serial hardware works using minicom and a loopback. I know my code works for ports /dev/ttyS0 to Sn. However when using my code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, but I don't seem to get any data available event. Trevor Sutton; Managing Director OpecSystem Limited Mobile 07768 461940 Office 01296 730110 Email Trevor at opecsystem.com www. opecsystem.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060123/2e6234fa/attachment-0096.html From tjarvi at qbang.org Mon Jan 23 13:09:50 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Mon, 23 Jan 2006 13:09:50 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: <000001c62054$6dda1bb0$2b001eac@aries> References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: On Mon, 23 Jan 2006, Trevor Sutton wrote: > Hi > > Can anybody give me a few pointers on where in the c code is the best > place to look for serial rx interrupts? > > The problem I have is linux box with an usb to eight serial ports board. > I know the usb/serial hardware works using minicom and a loopback. I > know my code works for ports /dev/ttyS0 to Sn. However when using my > code, based upon rxtx2.1, with the /dev/ttyUSB ports, it transmits ok, > but I don't seem to get any data available event. > Hi Trevor The data available event goes down to a bit on RS232 UARTS. There is a line status register (LSR) at address 5 on the UART chip that at byte 0 has a "Data Ready" slot. The UART flips this when data is available. By reading this bit, the kernel can know when data is available. The problem is USB ports don't have UARTs. In rxtx, this is obtained by ioctl( eis->fd, FIONREAD, &change ) except for OpenServer and Solaris (perhaps other traditional Unix systems too). The return value of select() is used to know. It looks like rxtx just returns data available on these system when the file descriptor changes. So this appears to be a bit problematic with USB. I know output buffer empty is also a problem (which you work around with flush()). How this will behave is going to depend upon the kernel drivers. They need to try to do what can be done on UARTs. They probably can do it all but sometimes code is written that just gets a certain job done. One place to start looking to see if you can get the results you want is to just put your thumb on SELECT() in RXTXPort(eventLoop). This should break out as soon as there is a detectable change on the port. The other option is to go with polling reads with long timeouts and short thresholds. I suspect this is how minicom is doing it. -- Trent Jarvi tjarvi at qbang.org From tjarvi at qbang.org Tue Jan 24 08:58:56 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Tue, 24 Jan 2006 08:58:56 -0700 (MST) Subject: [Rxtx] Serial operation for USB serial ports on linux In-Reply-To: References: <000001c62054$6dda1bb0$2b001eac@aries> Message-ID: > There is a line status register (LSR) at address 5 on the UART chip that at > byte 0 has a "Data Ready" slot. The UART flips this when data is available. > By reading this bit, the kernel can know when data is available. The problem > is USB ports don't have UARTs. > This does not really relate to the discussion but I was not accurate and who knows who will find it looking for what. Its an address offset of 1 not 5. From f.frumento at ngi.it Wed Jan 25 08:18:53 2006 From: f.frumento at ngi.it (Fabio Frumento) Date: Wed, 25 Jan 2006 16:18:53 +0100 Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 Message-ID: <43D796DD.7000804@ngi.it> Hi all, I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial port on WindowsXP pro with a ThinkPadT43P from IBM while the bytes are being written and read correctly it thrown an IO exception in the native method writeArray (but the byte are sent ok), i've tried to compile the RXTX myself to debug properly and understand what is causing this strange behavior, but it seems i'm not skilled enough to make it compile with cygwin :( ok I could catch the exception and continue to work but i don't like to work with a piece of code i can't understand the behavior of, anyway it seems the guilty row is at SerialImpl.c:1342 ---- code } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); ---- code for some reason (result < 0 && errno==EINTR ) return false also after sending the right amount of bytes. this problem exists only with the bluetooth serial (not sure for USB) if i use a normal legacy RS232 port it works fine anyone else have experienced same problem ? Could someone kindly tell me how to compile this little monster with cygwin or also mingwin so that i can debug it myself ? i've follwed instruction in the tarball but neither the java or C code is being compiled, i've checked against the most common mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to check... Thanks in advance Fabio Frumento From tjarvi at qbang.org Wed Jan 25 10:52:19 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Wed, 25 Jan 2006 10:52:19 -0700 (MST) Subject: [Rxtx] Problem with bluetooth COM and rxtx 2.1-7pre17 In-Reply-To: <43D796DD.7000804@ngi.it> References: <43D796DD.7000804@ngi.it> Message-ID: On Wed, 25 Jan 2006, Fabio Frumento wrote: > Hi all, > > I'm experiencing some problem using rxtx 2.1-7pre17 with a bluetooth serial > port on WindowsXP pro with a ThinkPadT43P from IBM > > while the bytes are being written and read correctly it thrown an IO > exception in the native method writeArray (but the byte are sent ok), i've > tried to compile the RXTX myself to debug properly and understand what is > causing this strange behavior, but it seems i'm not skilled enough to make it > compile with cygwin :( > > ok I could catch the exception and continue to work but i don't like to work > with a piece of code i can't understand the behavior of, anyway it seems the > guilty row is at SerialImpl.c:1342 > ---- code > } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); > ---- code > > for some reason (result < 0 && errno==EINTR ) return false also after sending > the right amount of bytes. this problem exists only with the bluetooth serial > (not sure for USB) if i use a normal legacy RS232 port it works fine > > anyone else have experienced same problem ? Could someone kindly tell me how > to compile this little monster with cygwin or also mingwin so that i can > debug it myself ? i've follwed instruction in the tarball but neither the > java or C code is being compiled, i've checked against the most common > mistakes (JAVA_PATH, INCLUDE PATH and so on) and now i don't know what to > check... > Hi Fabio, You will probably be following this into termios.c and serial_write to find out what is really going on. There is a YACK macro that can be used to describe the w32 API errors in win32termios.h. When people have problems compiling w32, I usually offer them the 'bob' account. This allows people to upload their code and cross compile to windows on a linux system. If you are interested, just contact me off the list. Getting mingw builds going can be tricky if you have not done it before. If you like, you may paste the build errors you are having to the list and we can try to figure out whats wrong. -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 17:02:55 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 16:02:55 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I've moved from a Windows box to a Linux box running Fedora Core 2 and JDK 1.5.0_03. On Trent's suggestion I'm running the latest RXTX-2.1-7pre20, have specified the flow control (none) and have specified the read timeout (disabled). When I run the attached code I get the following exception: Java.io.IOException: Input/output error in writeArray at gnu.io.RXTXPort.writeArray(Native Method) at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) at SerialIfTest.runTest(SerialIfTest.java:143) at SerialifTest.main(SerialIfTest.java:22) Attached are the make command, the run command, the test results, and the code. Any assistance would be appreciated. I'm a really green Linux user. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/attachment-0096.html -------------- next part -------------- A non-text attachment was scrubbed... Name: maketest Type: application/octet-stream Size: 123 bytes Desc: maketest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/maketest-0096.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: runtest Type: application/octet-stream Size: 119 bytes Desc: runtest Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/runtest-0096.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: testresults Type: application/octet-stream Size: 485 bytes Desc: testresults Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/testresults-0096.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: SerialIfTest.java Type: application/octet-stream Size: 6557 bytes Desc: SerialIfTest.java Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20060127/227d9a76/SerialIfTest-0096.obj From tjarvi at qbang.org Fri Jan 27 17:22:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 17:22:16 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Fri Jan 27 18:04:50 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 17:04:50 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 - ttyS103. ls -lH /dev/ttyS100 crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 We're using a 9 pin connector. Hopefully you'll just tell me it's a cabling error because the pinout came from Digi and is built to spec. statserial -n /dev/ttyS100 Device: /dev/ttyS100 Signal Pin Pin Direction Status Full Name (25) (9) (computer) Name ----- --- --- --------- ------ ----- FG 1 - - - Frame Ground TxD 2 3 out - Transmit Data RxD 3 2 in - Receive Data RTS 4 7 out 1 Request To Send CTS 5 8 in 0 Clear To Send DSR 6 6 in 0 Data Set Ready GND 7 5 - - Signal Ground DCD 8 1 in 0 Data Carrier Detect DTR 20 4 out 0 Data Terminal Ready RI 22 9 in 0 Ring Indicator setserial -a /dev/ttyS100 Cannot get serial info: Invalid argument I tried setserial with no params and the only other format it presented was setserial -g -a /dev/ttyS100 which gave the same results. I suspect all of this is because it's a virtual port. dmesg | grep -i serial Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing enabled Thanks for the quick response. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 4:22 PM To: RXTX Developers and Users Subject: Re: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > I've moved from a Windows box to a Linux box running Fedora Core 2 and > JDK 1.5.0_03. On Trent's suggestion I'm running the latest > RXTX-2.1-7pre20, have specified the flow control (none) and have > specified the read timeout (disabled). When I run the attached code I > get the following exception: > > > > Java.io.IOException: Input/output error in writeArray > > at gnu.io.RXTXPort.writeArray(Native Method) > > at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) > > at SerialIfTest.runTest(SerialIfTest.java:143) > > at SerialifTest.main(SerialIfTest.java:22) > > > > Attached are the make command, the run command, the test results, and > the code. Any assistance would be appreciated. I'm a really green > Linux user. > > > String portName = "/dev/ttyS100"; Do you really have 101 serial ports? If so could you give the output of ls -lH /dev/ttyS100 statserial -n /dev/ttyS100 setserial -a /dev/ttyS100 dmesg | grep -i serial Usually, COM2 is ttyS1 -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 18:35:51 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 18:35:51 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From CMorpeth at osec.com Fri Jan 27 19:02:53 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Fri, 27 Jan 2006 18:02:53 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: Inline... -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 5:36 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray On Fri, 27 Jan 2006, Morpeth, Chris wrote: > We're using a Digi PortServer so we have 4 "virtual" ports from ttyS100 > - ttyS103. > > ls -lH /dev/ttyS100 > crw------- 1 root root 253, 0 Jan 27 16:07 /dev/ttyS100 > Maybe this relates to the virtual port driver but those major and minor numbers dont look right to me. MAKEDEV /dev/ttyS100 crw-rw---- 1 root uucp 4, 164 Jan 27 18:39 /dev/ttyS100 I assume you are running this as root then? Thats the only user that can read and write to that port. [CM] Yes, everything is run as root. > We're using a 9 pin connector. Hopefully you'll just tell me it's a > cabling error because the pinout came from Digi and is built to spec. I doubt that. But the error suggests a low level write problem. > > statserial -n /dev/ttyS100 > Device: /dev/ttyS100 > > Signal Pin Pin Direction Status Full > Name (25) (9) (computer) Name > ----- --- --- --------- ------ ----- > FG 1 - - - Frame Ground > TxD 2 3 out - Transmit Data > RxD 3 2 in - Receive Data > RTS 4 7 out 1 Request To Send > CTS 5 8 in 0 Clear To Send > DSR 6 6 in 0 Data Set Ready > GND 7 5 - - Signal Ground > DCD 8 1 in 0 Data Carrier Detect > DTR 20 4 out 0 Data Terminal Ready > RI 22 9 in 0 Ring Indicator Looks like a serial port. > > setserial -a /dev/ttyS100 > Cannot get serial info: Invalid argument Hmm. Probably missing ioctls (TIOCGSERIAL?) in the virtual ports. Just a guess but that just means no custome baud rates (which are not working anyhow). strace -eioctl setserial -a /dev/ttyS100 any ioctl call returning something other than 0 failed. [CM] ioctl(3, TIOCGSERIAL, 0x7ffffff57f7f70) = -1 EINVAL (Invalid argument) Cannot get serial info: Invalid argument > > I tried setserial with no params and the only other format it presented > was setserial -g -a /dev/ttyS100 which gave the same results. I suspect > all of this is because it's a virtual port. nods > > dmesg | grep -i serial > Serial: 8250/16550 driver $Revision: 1.90 $ 76 ports, IRQ sharing > enabled Thats just the UART on the mb. Have you tried the system port just to see how its going? With multiport cards, make sure you have the latest driver. The onboard UARTs get tested silly in linux. The multiport options? .. [CM] Nope. But I'll be out of town until next Thursday and won't get to try it until then. In the mean time I'll check with Digi to see if they have any clues. But they're admittedly Java ignorant so not much hope there. This may be a simple case of the virtual ports almost being like a serial port and there is some deficiency in the driver thats possible to work around on our end. If thats the case, maybe digi could provide us with some hints. Try the PC UART though. > > Thanks for the quick response. > > Chris > -----Original Message----- > From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf > Of Trent Jarvi > Sent: Friday, January 27, 2006 4:22 PM > To: RXTX Developers and Users > Subject: Re: [Rxtx] I/O error in writeArray > > On Fri, 27 Jan 2006, Morpeth, Chris wrote: > >> I've moved from a Windows box to a Linux box running Fedora Core 2 and >> JDK 1.5.0_03. On Trent's suggestion I'm running the latest >> RXTX-2.1-7pre20, have specified the flow control (none) and have >> specified the read timeout (disabled). When I run the attached code I >> get the following exception: >> >> >> >> Java.io.IOException: Input/output error in writeArray >> >> at gnu.io.RXTXPort.writeArray(Native Method) >> >> at gnu.io.RXTXPort$SerialOutputStream.write(RXTXPort.java:1137) >> >> at SerialIfTest.runTest(SerialIfTest.java:143) >> >> at SerialifTest.main(SerialIfTest.java:22) >> >> >> >> Attached are the make command, the run command, the test results, and >> the code. Any assistance would be appreciated. I'm a really green >> Linux user. >> >> >> > > String portName = "/dev/ttyS100"; > > Do you really have 101 serial ports? If so could you give the output of > > ls -lH /dev/ttyS100 > statserial -n /dev/ttyS100 > setserial -a /dev/ttyS100 > dmesg | grep -i serial > > Usually, COM2 is ttyS1 > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Fri Jan 27 19:32:38 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Fri, 27 Jan 2006 19:32:38 -0700 (MST) Subject: [Rxtx] I/O error in writeArray In-Reply-To: References: Message-ID: runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org From CMorpeth at osec.com Sat Jan 28 11:16:00 2006 From: CMorpeth at osec.com (Morpeth, Chris) Date: Sat, 28 Jan 2006 10:16:00 -0800 Subject: [Rxtx] I/O error in writeArray Message-ID: I have more data. In order to ensure that the native code prints appear in order I added a 5 second sleep at the front of the test. I already had 5 second sleeps between each write. I also added flush() calls after each write(). Now the JNI_OnLoad appears before the "Devel Library" line. The exception, however, occurs after the THIRD write() rather than after the fourth. AND, if I increase the sleep between the writes from 5 seconds to 10 seconds the exception occurs after the SECOND write. So it seems as if there's some timeout occurring rather than something related to the AMOUNT of data being written. Again, I'll try using the hardware serial port instead of this virtual serial port next Thursday or see if I can get someone else to do it for me before I get back in town. Thanks. Chris -----Original Message----- From: rxtx-bounces at qbang.org [mailto:rxtx-bounces at qbang.org] On Behalf Of Trent Jarvi Sent: Friday, January 27, 2006 6:33 PM To: RXTX Developers and Users Subject: RE: [Rxtx] I/O error in writeArray runTest: Configuring port /dev/ttyS100 Devel Library ========================================= Native lib Version = RXTX-2.1-7pre20 Java lib Version = RXTX-2.1-7pre20 Command: 81 01 06 52 14 14 00 00 00 00 00 00 00 00 00 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 04 02 01 0d 00 0c 03 05 00 ff Command: 81 01 06 52 14 14 00 03 01 09 05 00 0c 03 05 00 ff runTest: IO Exception (/dev/ttyS100). Experimental: JNI_OnLoad called. The strange thing is it appears the first 3 writes did work. The JNI_OnLoad is the native library loading. The messages are always out of order when the native code prints. It looks like the first 3 writes had to complete to get that far though. The message you showed off the list which I assume was the execption message is from the C library saying write() just failed. Just an idea but you may try to flush() after the write(). -- Trent Jarvi tjarvi at qbang.org _______________________________________________ Rxtx mailing list Rxtx at qbang.org http://mailman.qbang.org/mailman/listinfo/rxtx From tjarvi at qbang.org Sat Jan 28 11:50:11 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 11:50:11 -0700 (MST) Subject: [Rxtx] RXTX 2.1.7 Release Options. Message-ID: I'll be going through and adding the patches (2?) that have been submitted and nobody complained about today. My schedual is going to be a bit goofy. May is probably the earliest full testing can be done here. That said, I think the rxtx 2.1 code we currently have in CVS is going to help many projects. My thoughts are we should release 2.1.7 this weekend as is. This will really help projects like debian that only take the 'solid' releases. I have a list of ~20 tasks I'll be going through. Much of this is going to involve confirmation of bugs or no bugs using test hardware. This work can be released as rxtx 2.1.8 in ~May. Would anyone object to this? -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 13:32:24 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 15:32:24 -0500 Subject: [Rxtx] universal binaries for Mac OS X Message-ID: Hi I added file LibSerialUniversal.xcodeproj.sitx.hqx into the CVS's folder rxtx-devel/MACOSX_IDE/PB this is a XCode 2.2.1 project for building universal libraries I didn't test built libraries (I don't have the appropriate hardware) enjoy Dmitry Markman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20060128/077bb5d1/attachment-0096.html From tjarvi at qbang.org Sat Jan 28 14:20:05 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 14:20:05 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi > I added file LibSerialUniversal.xcodeproj.sitx.hqx > into the CVS's folder rxtx-devel/MACOSX_IDE/PB > > this is a XCode 2.2.1 project for building universal libraries > I didn't test built libraries (I don't have the appropriate hardware) > > enjoy > Thanks Dmitry With the Mac OS X, we have the build tree with binaries in rxtx source. Would you be interested in rebuilding that tree tomorrow or early next week so they have 2.1.7 binaries in the tree? I could also put those in the binary package for people like Doug working on installers then. The auto* tools should also work with Mac OS X now too. -- Trent Jarvi tjarvi at qbang.org From dmarkman at mac.com Sat Jan 28 15:16:20 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 17:16:20 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: Message-ID: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Hi, Trent how I can access that tree? I can't see it inside of the rxtx-devel folder thanks On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi >> I added file LibSerialUniversal.xcodeproj.sitx.hqx >> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >> >> this is a XCode 2.2.1 project for building universal libraries >> I didn't test built libraries (I don't have the appropriate hardware) >> >> enjoy >> > > Thanks Dmitry > > With the Mac OS X, we have the build tree with binaries in rxtx > source. Would you be interested in rebuilding that tree tomorrow or > early next week so they have 2.1.7 binaries in the tree? I could > also put those in the binary package for people like Doug working > on installers then. > > The auto* tools should also work with Mac OS X now too. > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 15:24:01 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 15:24:01 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: Hi Dmitry With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I was thinking of the following: rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/libSerial.jnilib These tend to be older releases if we dont sync and some folks pull them out for installs. I still need to get two patches in today but it will be ready first thing tomorrow for sure. On Sat, 28 Jan 2006, Dmitry Markman wrote: > Hi, Trent > > how I can access that tree? > I can't see it inside of the rxtx-devel folder > > thanks > > > On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: > >> On Sat, 28 Jan 2006, Dmitry Markman wrote: >> >>> Hi >>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>> >>> this is a XCode 2.2.1 project for building universal libraries >>> I didn't test built libraries (I don't have the appropriate hardware) >>> >>> enjoy >>> >> >> Thanks Dmitry >> >> With the Mac OS X, we have the build tree with binaries in rxtx source. >> Would you be interested in rebuilding that tree tomorrow or early next week >> so they have 2.1.7 binaries in the tree? I could also put those in the >> binary package for people like Doug working on installers then. >> >> The auto* tools should also work with Mac OS X now too. >> >> -- >> Trent Jarvi >> tjarvi at qbang.org >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx > From dmarkman at mac.com Sat Jan 28 16:20:53 2006 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 28 Jan 2006 18:20:53 -0500 Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> Message-ID: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> well I already did it (but I think the name should be librxtxSerial.jnilib, at least RXTXPort class has static initialization that call System.loadLibrary( "rxtxSerial" ) ) problem is that that library will be good only for mac os x 10.4 and higher it probably won't work for 10.3 or 10.2 also I didn't check that library, so if somebody can do that I'd be very grateful thanks however CVS has the file LibSerial.pbproj.sit.hqx that contains the project that builds binaries for the 10.3 and 10.2 On Jan 28, 2006, at 5:24 PM, Trent Jarvi wrote: > > Hi Dmitry > > With rxtx 2.1 (using cvs checkout -r commapi-0-0-1 rxtx-devel) I > was thinking of the following: > > rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/ > Extensions/libSerial.jnilib > > These tend to be older releases if we dont sync and some folks pull > them out for installs. > > I still need to get two patches in today but it will be ready first > thing tomorrow for sure. > > On Sat, 28 Jan 2006, Dmitry Markman wrote: > >> Hi, Trent >> >> how I can access that tree? >> I can't see it inside of the rxtx-devel folder >> >> thanks >> >> >> On Jan 28, 2006, at 4:20 PM, Trent Jarvi wrote: >> >>> On Sat, 28 Jan 2006, Dmitry Markman wrote: >>>> Hi >>>> I added file LibSerialUniversal.xcodeproj.sitx.hqx >>>> into the CVS's folder rxtx-devel/MACOSX_IDE/PB >>>> this is a XCode 2.2.1 project for building universal libraries >>>> I didn't test built libraries (I don't have the appropriate >>>> hardware) >>>> enjoy >>> Thanks Dmitry >>> With the Mac OS X, we have the build tree with binaries in rxtx >>> source. Would you be interested in rebuilding that tree tomorrow >>> or early next week so they have 2.1.7 binaries in the tree? I >>> could also put those in the binary package for people like Doug >>> working on installers then. >>> The auto* tools should also work with Mac OS X now too. >>> -- >>> Trent Jarvi >>> tjarvi at qbang.org >>> _______________________________________________ >>> Rxtx mailing list >>> Rxtx at qbang.org >>> http://mailman.qbang.org/mailman/listinfo/rxtx >> >> Dmitry Markman >> >> _______________________________________________ >> Rxtx mailing list >> Rxtx at qbang.org >> http://mailman.qbang.org/mailman/listinfo/rxtx >> > _______________________________________________ > Rxtx mailing list > Rxtx at qbang.org > http://mailman.qbang.org/mailman/listinfo/rxtx Dmitry Markman From tjarvi at qbang.org Sat Jan 28 16:30:16 2006 From: tjarvi at qbang.org (Trent Jarvi) Date: Sat, 28 Jan 2006 16:30:16 -0700 (MST) Subject: [Rxtx] universal binaries for Mac OS X In-Reply-To: <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> References: <24138A8B-A962-4D43-975E-5771B33E2BA0@mac.com> <68325EEB-7923-4583-ACBA-2A53D539B264@mac.com> Message-ID: Hi Dmitry Perhaps we should doing a cvs delete on a few files. For instance: $ diff ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/RXTXcomm.jar Binary files ./rxtx-devel/MACOSX_IDE/CW/RXTXcomm.jar and ./rxtx-devel/MACOSX_IDE/ForPackageMaker/Install/Library/Java/