How to close Rxtx serial port?

2019-02-20 04:06发布

问题:

When retrieving available serial ports using the Rxtx library (see second example), the close() method will block, even if the port has been successfully opened.

How do I set a timeout on the close operation so I won't be stuck? Note that these methods are very poorly documented.

Note that I just found this relevant thread. I'll report back soon.

Update -

Here's another thread. Still no luck yet...