<p>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.</p>

<p>One of my biggest problems is that the <code>RxTx SerialPortEvent.OUTPUT_BUFFER_EMPTY</code> does not work on linux over usb serial.</p>

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

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

Using RxTx over usb-to-serial you can't set notifyOnOutput to true otherwise it locks up completely.
I've learned this the hard way.  This problem is documented on a few web sites over the internet.
I'm running it on Linux and I believe that this is a Linux only issue, although I can't confirm that.
As for the link you've given me... I've seen the SimpleReader and SimpleWriter examples, but these don't represent a real world application.  It is not multi-threaded, assumes a read has the full data it needs instead of buffering reads, etc.
Thanks,
Jeach!