I have a serial device connected, and I’m trying to detect if it has been unplugged.
Using a terminal emulator I see the DCD line drops when I disconnect the device, so I decided to monitor this line state. I unplug the device and the line state drops, plug it in and the line state comes back up.
I added Serial.LineChangeNotification(Serial.LineDCD) to my code, then added a simple "MsgBox “disconnected”’ to the serial ports LineChangedState event. However, it never fires on Mac OS or Windows.
Latest versions of Mavericks, Windows 7, and XOJO.