I develop a linux application, which works with
ttyACM* devices. Now I have a task:
I have to find a way, how to restore communication with device, when connection is temporary lost. Now I see such a behaviour: if port is opened in the app, and device is re-pluged at this moment, the device's name changes, and app can not complete current operation. So, I wrote
udev rule to add symlink to device, and the rule works. But app crashes all the same. The reason is that device changes it's
ttyACM0->tyyACM1) after re-plugging, and symlink does not help, because file descriptor becames wrong.
Does anybody know a way, how can I replug device without need to restart my app? Are there any settings in Linux to allow device to re-plug to the same
tty even if it was opened in the application in the moment of disconnection?