Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • Tx @timemage, you saved my day... hell you saved my week! Yes I confirm that just adding DtrEnable = true does the trick. What the hell were they thinking about? This is a damn virtual port where you don't even have to specify the baud rate! And they care about the DTR signal state? Something that you normally leave unconnected in a hardware serial port? cheeeze... Commented Dec 28, 2022 at 11:40
  • 1
    I think get your frustration. But, to be clear with respect to it being virtual: the host computer doesn't know whether logical requests for changes in baud or DTR result in real world changes to signal levels and timing or that they just terminate the USB stack. From .NET's perspective, it doesn't even know the Serial API is being backed by USB peripheral and not an old style serial port.There's a long tradition of hijacking serial signals for purposes that you'd never guess based on their names. Commented Dec 28, 2022 at 14:08
  • 1
    A 1200 baud request together with DTR (and also RTS in the case of the Due and common ESP32/ESP8266 boards) are used in many Arduino type boards both only in the USB stack (where no actual DTR signal or uart timing exists) and also via transceivers to cause entry into bootloaders, to operate chip erasure, etc. I didn't have a specific reason (until testing) to think that the BLE would care (or not) at non-1200 baud (imaginary baud) rates. To the extent that I'm mildly surprised by anything here, it's in the default behaviour of .NET's SerialPort API. Commented Dec 28, 2022 at 14:12