Closed vdg-glitch closed 2 years ago
Have you tried listening to 'port disconnected' event? See: http://fazecast.github.io/jSerialComm/javadoc/com/fazecast/jSerialComm/SerialPort.html#LISTENING_EVENT_PORT_DISCONNECTED
My project was using the 2.7.0 library version and that event was not part of it.
I upgraded it to 2.9.1, implemented the listener to LISTENING_EVENT_PORT_DISCONNECTED and it seems to work.
Will make some more experiments.
Thanks very much
Thanks for the community help on this one!
Hi,
pulling out the USB cable (RS232 to USB cable) or equivalently detaching the RS232 physical port from QEMU emulating a Window 7 32 bit guest OS doesn't force SerialPort.isOpen() to return false. How to detect (without attempting to read or write any bytes) that the port is not valid anymore?
Thank you