Two USB serial adapters get different /dev/ttyUSBn names after reboot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
udev (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
I have a laptop with four USB ports. Into one of these ports is plugged a no-name USB widget with 2 more USB ports, a serial port and a parallel port; I guess there is a USB hub in there also. Into one of these new USB ports, I plug a BAFO USB-serial adapter, so there are two USB serial ports.
When I start the computer, these two serial ports are assigned to /dev/ttyUSB0 and /dev/ttyUSB1 randomly.
I have a modem connected to one of the adapters. Every time I restart, it is a hit-and-miss whether I can connect to the internet without changing a configuration file to point to the other /dev/ttyUSB port.
Windows manages to assign the same com port number to the same USB serial device. How do I make Ubuntu do the same?
Edgy 2.6.17-11-generic, all up to date recently.
viper:~$ lsusb
Bus 005 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 004 Device 009: ID 0403:6001 Future Technology Devices International, Ltd 8-bit FIFO
Bus 004 Device 008: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 004 Device 003: ID 413c:8103 Dell Computer Corp. Wireless 350 Bluetooth
Bus 004 Device 007: ID 067b:2305 Prolific Technology, Inc. PL2305 Parallel Port
Bus 004 Device 002: ID 03eb:3301 Atmel Corp. at43301 4-port Hub
Bus 004 Device 004: ID 04fc:0005 Sunplus Technology Co., Ltd
Bus 004 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
viper:~$
This is not a kernel issue, this is a by default behaviour:
You can/should use udev to force your kernel assign arbitrary names to devices as it finds them. rules.d/ 50-local. rules:
Take a look at my file /etc/udev/
# REGLAS PARA LOS DISPOSITIVOS QUE QUEREMOS CONTROLAR POR NOMBRE rer}==" Prolific Technology Inc.", SYSFS{product} =="USB- Serial Controller" ,KERNEL= ="ttyUSB[ 0123]", SYMLINK+ ="misterhouse" rer}==" FTDI", KERNEL= ="ttyUSB[ 0123]", SYMLINK+="wmr918"
BUS=="usb", SYSFS{manufactu
BUS=="usb", SYSFS{manufactu
You must find unique SYSFS strings to each of your devices and SYMLINK an arbitrary name to it (this are my serial to USB adapters for serial misterhouse home control software and a WMR918 weather Station with serial output). Take a look at udev's HOWTOs all over the net, they're quite useful.
Hope this helps!