Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How catch Lost Serial port(for example USB virtual rs-232 unplug) #121

Open
irbismaestro opened this issue Sep 23, 2021 · 1 comment
Open

Comments

@irbismaestro
Copy link

Hi
Thanks for library.
I have a question. My environment: Linux Centos 7x 64 .
Usb Virtual rs-232 . Its mapped as /dev/USB0(1,2,3..) or /dev/ACM0(1,2,3...)
library work but when USB device unplug, my application have crashed and exit. How I can catch this event(unplug) and reconnect(or wait connection),?

@FObersteiner
Copy link

I think that calls for a state machine that catches the error and goes into a (re)connect state when the connection is lost. But I guess that should not be part of a basic serial port library such as this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants