Gentoo Archives: gentoo-user

From: Graham Murray <graham@×××××××××××.uk>
To: gentoo-user@l.g.o
Subject: [gentoo-user] udev and multiple usb-serial devices
Date: Thu, 17 Aug 2006 13:04:56
Message-Id: 87ejvfpli4.fsf@newton.gmurray.org.uk
1 Is there any logic to the order in which usb-serial devices are
2 enumerated when a system starts?
3
4 When using multiple usb-serial devices, the program(s) have to know to
5 which port each particular external device is connected. When
6 initially connecting, the first to be plugged in will be /dev/ttyUSB0
7 and so on. Having connected them all, looking at the output of
8 udevinfo, I can see the bus address to which each port is connected
9 and can create udev rules to create aliases to 'fixed' names which the
10 programs can reference. However when the system was restarted, the
11 mappings were wrong and the bus addresses for some of the ports were
12 swapped. I expected the /dev/ttyUSBx names to change, that is why I
13 tried mapping to the bus ID (eg 1-4.1:1.0).
14
15 Is there any way to write udev rules which will map the usb-serial
16 device connected to a particular socket on either the PC or a hub to a
17 known name? So that if the usb connector is removed and replaced (in
18 the same socket) or the system is rebooted that programs will be able
19 to open the correct device connected to each usb serial adaptor?
20 --
21 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] udev and multiple usb-serial devices Neil Bothwick <neil@××××××××××.uk>