Jim Wagner
2017-02-25 19:22:24 UTC
Greetings folks -
The project I am working on uses multiple USB virtual COM ports. As the code configures itself, it checks whether or not the serial port for each channel can be opened, When it is opened, then it proceeds with link validation. That is working well.
My puzzle, now, is how to tell if a link is broken after it was opened. In the case of a USB virtual COM port, I would expect the port to close itself when the USB link is broken. There does not seem to be a way to tell whether or not a port is open without trying to open it. Yes, you can periodically try to open it, but that makes little sense while it is operating and I fear that may mess up an already established open condition. Or, is that what you have to do?
Many thanks
Jim
James Wagner
Oregon Research Electronics
http://www.orelectronics.net <http://www.orelectronics.net/>
_______________________________________________
Xojo forum:
https://forum.xojo.com/
The project I am working on uses multiple USB virtual COM ports. As the code configures itself, it checks whether or not the serial port for each channel can be opened, When it is opened, then it proceeds with link validation. That is working well.
My puzzle, now, is how to tell if a link is broken after it was opened. In the case of a USB virtual COM port, I would expect the port to close itself when the USB link is broken. There does not seem to be a way to tell whether or not a port is open without trying to open it. Yes, you can periodically try to open it, but that makes little sense while it is operating and I fear that may mess up an already established open condition. Or, is that what you have to do?
Many thanks
Jim
James Wagner
Oregon Research Electronics
http://www.orelectronics.net <http://www.orelectronics.net/>
_______________________________________________
Xojo forum:
https://forum.xojo.com/