Jonathan Ryshpan writes:
I have tried the obvious, to open what ought to be the permanent location of the device, namely:/dev/serial/by-id/usb- Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0But the software stops working when the change takes place, evidently because/dev/serial/by-id/usb- Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0is a dynamically updated symbolic link to /dev/ttyUSB0 or /dev/ttyUSB1, as the case may be. The server can only be made to work again by restarting it.
That strongly suggests that, even if the device reconnects under the same name, your software app will still choke. If your app still chokes if it's told to open /dev/serial/by-id, then it's going to have a problem when your USB device disconnects and reconnects, even if it keeps the same /dev/ttyUSB? name. You've just proven this yourself: by pointing your software to open /dev/serial/by-id. After all, the device name now, as far as your software is concerned, remains the same. The fact that the underlying symlink changes is irrelevant; unless your software manually checks if it is opening a symlink, then reads it and proceeds to use the real path. This seems very unlikely.
So, your real problem is that your software is unable to handle the device disconnecting and reconnecting. The different device name is a red herring. Either the software needs to get fixed, so at least it can recover by reopening the device (and you pointing it to the unchanged /dev/serial/by-id path), or the underlying root cause of your USB device disconnect must be identified, and fixed.
Attachment:
pgpsKXREQZapK.pgp
Description: PGP signature
-- users mailing list users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org