Writing data over RxTx using usbserial?

Posted by Jeach on Stack Overflow See other posts from Stack Overflow or by Jeach
Published on 2008-09-17T16:05:45Z Indexed on 2010/04/16 6:13 UTC
Read the original article Hit count: 584

I'm using the RxTx library over usbserial on a Linux distro. The RxTx lib seems to behave quite differently (in a bad way) than how it works over serial.

One of my biggest problems is that the RxTx SerialPortEvent.OUTPUT_BUFFER_EMPTY does not work on linux over usbserial.

How do I know when I should write to the stream? Any indicators I might have missed?

So far my experience with writing and reading concurrently have not been great. Does anyone know if I should lock the DATA_AVAILABLE handler from being invoked while I'm writing on the stream? Or RxTx accepts concurrent read/writes?

Thanks in advance

© Stack Overflow or respective owner

Related posts about linux

Related posts about usbserial