cancel
Showing results for 
Search instead for 
Did you mean: 

I would like to be able to detect when the virtual com port gets opened by some program and when it closes the port.

MSipo
Senior II

I would like to be able to detect when the virtual com port gets opened by some program and when it closes the port.

How would I do that?

1 REPLY 1
KnarfB
Principal III

The VCP connection consists only of the RX and TX lines, there is no possibility to find out if someone is listening on the PC side. You can implement your own USB CDC Virtual Com Port if the MCU supports USB, or you can implement some protocol inside VCP, e.g. one side sends periodic "ping" messages and the other side responds.