[Rxtx] read() not blocking?
Trent Jarvi
tjarvi at qbang.org
Sat Sep 23 18:29:06 MDT 2006
On Sat, 23 Sep 2006, Knute Johnson wrote:
> I'm converting from javax.comm to rxtx and have run in to a snag. My
> code needs to block indefinitely on a serial port read() but is
> returning -1. Both read timeout and read threshold are disabled. It
> doesn't seem to matter if I call disableReceiveTimeout() or
> enableReceiveTimeout(0). Behavior appears normal if timeout is set
> to some normal value. For now I have enabled receive timeout and set
> the value to Integer.MAX_VALUE.
>
> Is this a bug or?
>
> My computer is running XP SP2 and RXTX is 2.1-7.
>
> Any ideas would be greatly appreciated.
>
> Thanks,
>
>
Hi Knute
I would expect that to work. Is your serial port unusual? Perhaps
multiport or a USB dongle?
--
Trent Jarvi
tjarvi at qbang.org
More information about the Rxtx
mailing list