I have 2 USB RS-232 dongles that will be installed on a Ubuntu
system, one per USB port. I determined which one was ttyUSB0 by
trial and error, rebooted the system and it was still ttyUSB0.
That's a very good thing, but my question is, is it likely to
always boot up and assign the 2 dongles their tty numbers in the
I am sure that if one removed ttyUSB0, the dongle that
is now ttyUSB1 would become ttyUSB0 on the next reboot.
Normally, they will be connected at all times and will be
connected to 2 different RS-232 streams. If there was a question
on reboot, I would need to figure out some strategy to make sure
each application got the right stream each time.
Martin McCormick WB5AGZ Stillwater, OK
OSU Information Technology Department Telecommunications Services Group
ubuntu-users mailing list
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
12-11-2008, 06:58 AM
USB Serial RS-232 Converter Question
Martin McCormick wrote:
> I have 2 USB RS-232 dongles that will be installed on a Ubuntu
> system, one per USB port. I determined which one was ttyUSB0 by
> trial and error, rebooted the system and it was still ttyUSB0.
> That's a very good thing, but my question is, is it likely to
> always boot up and assign the 2 dongles their tty numbers in the
> same order?
You can't rely on constant association of device and device name. The
kernel gives the device name ttyUSB0 to the first device detected. If
both devices are different models you can make your own udev rules which
would create the wanted device name. See "man udev" and / or . If both
devices are the same type it isn't likely that you can distinguish them
from the USB device information. With the command "sudo lsusb -v" you can
check if there is a difference between the devices. If both devices look
the same you would probably have to probe the device on the other end of
the cable to find out which device is connected to which device name. You
could then setup symbolic links to the correct device names and use the
symbolic links instead of the device names directly.