RXTX serial connection - issue with blocking read()

后端 未结 4 1008
别那么骄傲
别那么骄傲 2021-01-03 11:58

I am trying to use the RXTX library for blocking serial communication on Windows (XP and 7). I have tested the connection with Hyperterminal in both ends, and it works flawl

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-03 12:18

    Use RXTX-2.2pre2, previous versions have had a bug which prevented blocking I/O from working correctly.

    And do not forget to set port to blocking mode:

    serialPort.disableReceiveTimeout();
    serialPort.enableReceiveThreshold(1);
    

提交回复
热议问题