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.
My application has several threads and one of my biggest problems is that out of nowhere, I seem to be getting one to two extra bytes on my stream. I can't figure out where they come from or why. This problem seems to occur a lot more frequently when I write to the RxTx stream using another thread.
So I was wonder if I should process the read on the current RxTx thread or should I process the read on another thread when I get the DATA_AVAILABLE event.
I'm hoping someone might have good or bad reasons for doing it one way or the other.