I have a device plugged to a CentOS server that changes randomly from /dev/ttyUSB0 to /dev/ttyUSB1 and vice versa.
The device I'm trying to connect is this one.
How can I debug this?
The device probably gets disconnected while you're using it; check your dmesg
output after it changed to /dev/ttyUSB1
. When it gets disconnected, the old name /dev/ttyUSB0
is not immediately released (I'm not sure why, maybe because some program still has an open handle to the device file...?). Then the device reconnects but now the kernel can't reuse this name so it uses the next free name, so you now it's /dev/ttyUSB1
.
Possible reasons for this could be a defective USB device or a defective USB port.
changes randomly
? what do you mean?? i doubt that it changes while the device is plugged in. – umläute Nov 28 '13 at 14:33udev
but something else sounds suspicious, as if the device is faulty and is getting erroneously re-detected. – slm Nov 28 '13 at 14:48dmesg
tell you? – umläute Nov 28 '13 at 16:08udev
resources: Where is the official udev source and other dev information? – slm Nov 28 '13 at 17:29