17. January 2022 · Categories: .NET

When trying to read data from the USB Serial driver used on the Pico, it would not read anything in my C# program. It turned out that the Pico library also simulates the RTS and DTR signals in its CDC driver, unlike the typical FDTI chips, which simply ignore them. This gives us two options to deal with it in the SerialPort class of .NET:

  • Set DtrEnable to true, and keep the Handshake to None
    This ignores the RTS input, which could lead to overflow, but it is a setting that also works with ports that do not use RTS/DTR handshakes.

  • Set DtrEnable and RtsEnable to true, and the Handshake to RequestToSend
    This enables hardware handshaking, and behaves unpredictable when no HW handshake is implemented.