Re: /dev/ttyUSB0 spontaneously changes to /dev/ttyUSB1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-port0
But 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-port0
is 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
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux