How to tell if the host opens/closes CDC serial port #2614
-
Hi, I'm using CDC serial ports on rp2040. So I'm wondering, is it a mission impossible, or was I going a wrong direction? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I'm afraid it's impossible to detect it reliability at least on Windows, there is only one If you have your own host software then you can set DTR=1 at opening, then you can use DTR as closing detection. |
Beta Was this translation helpful? Give feedback.
-
Thank you! |
Beta Was this translation helpful? Give feedback.
I'm afraid it's impossible to detect it reliability at least on Windows, there is only one
SET_CONTROL_LINE_STATE
request sent from host with both DTR and RTS equal to 0 on port closing.If you have your own host software then you can set DTR=1 at opening, then you can use DTR as closing detection.