SerialPort not receiving any data

    ComPort.Handshake = Handshake.None;

The problem is not that the DataReceived event doesn’t fire, the problem is that the serial port isn’t receiving any data. There are very, very few serial devices that use no handshaking at all. If you set it to None then the driver won’t turn on the DTR (Data Terminal Ready) and RTS (Request To Send) signals. Which a serial port device interprets as “the machine is turned off (DTR)” or “the machine isn’t ready to receive data (RTS)”. So it won’t send anything and your DataReceived event won’t fire.

If you really want None then set the DTREnable and RTSEnable properties to true. But it is likely you want HandShake.RequestToSend since the device appears to be paying attention to the handshake signals.

If you still have trouble then use another serial port program like Putty or HyperTerminal to ensure the connection and communication parameters are good and the device is responsive. SysInternals’ PortMon utility gives a low-level view of the driver interaction so you can compare good vs bad.

Leave a Comment