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.

I worked around it by adding a timer that checks for a lack of incoming data (my device sends a stream of data).

i’m hijacking this thread!

i have this working with a timer also, but i’m wondering why the event doesn’t fire.
anyone have an example of how its supposed to work??