Skip to content

How to tell if the host opens/closes CDC serial port #2614

Closed Answered by HiFiPhile
whowechina asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by whowechina
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants