[purejavacomm] Detect usb cable unplugged?

  • From: ant elder <ant.elder@xxxxxxxxx>
  • To: purejavacomm@xxxxxxxxxxxxx
  • Date: Thu, 21 Nov 2013 10:32:06 +0000

Is there any way to have an application notified by PureJavaComm when a usb
serial port is unplugged?

Presently unplugging the cable without first closing the PureJavaComm
SerialPort can cause a hang if a read is done on the still open port. It
would be nice if the application could be notified when the cable is
unplugged and so close the SerialPort, or at least if a read on a
SerialPort thats been unplugged would throw an exception.


Other related posts: