Faced with:
root@conserver01:/home/owen# lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
|__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
|__ Port 2: Dev 4, If 0, Class=Hub, Driver=hub/4p, 5000M
|__ Port 3: Dev 5, If 0, Class=Hub, Driver=hub/4p, 5000M
|__ Port 4: Dev 6, If 0, Class=Hub, Driver=hub/4p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 3: Dev 13, If 0, Class=Vendor Specific Class, Driver=ftdi_sio, 12M
|__ Port 1: Dev 6, If 0, Class=Vendor Specific Class, Driver=ftdi_sio, 12M
|__ Port 4: Dev 15, If 0, Class=Vendor Specific Class, Driver=ftdi_sio, 12M
|__ Port 2: Dev 9, If 0, Class=Vendor Specific Class, Driver=ftdi_sio, 12M
|__ Port 2: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 4: Dev 16, If 0, Class=Vendor Specific Class, Driver=ftdi_sio, 12M
|__ Port 2: Dev 12, If 0, Class=Vendor Specific Class, Driver=ftdi_sio, 12M
|__ Port 3: Dev 14, If 0, Class=Vendor Specific Class, Driver=ftdi_sio, 12M
|__ Port 1: Dev 8, If 0, Class=Vendor Specific Class, Driver=ftdi_sio, 12M
|__ Port 3: Dev 7, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 11, If 0, Class=Vendor Specific Class, Driver=ftdi_sio, 12M
|__ Port 4: Dev 10, If 0, Class=Hub, Driver=hub/4p, 480M
And:
root@conserver01:/home/owen# ls -al /dev/ttyUSB*
crw-rw---- 1 root dialout 188, 0 Jun 17 03:49 /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 1 Jun 17 03:50 /dev/ttyUSB1
crw-rw---- 1 root dialout 188, 2 Jun 17 03:51 /dev/ttyUSB2
crw-rw---- 1 root dialout 188, 3 Jun 17 03:54 /dev/ttyUSB3
crw-rw---- 1 root dialout 188, 4 Jun 17 03:54 /dev/ttyUSB4
crw-rw---- 1 root dialout 188, 5 Jun 17 03:55 /dev/ttyUSB5
crw-rw---- 1 root dialout 188, 6 Jun 14 20:20 /dev/ttyUSB6
crw-rw---- 1 root dialout 188, 7 Jun 14 20:20 /dev/ttyUSB7
crw-rw---- 1 root dialout 188, 8 Jun 14 20:20 /dev/ttyUSB8
I'd like to accomplish two things:
- A way to match the lsusb output line to the /dev entry.
- A way to create a consistent relationship between a port on the USB hub (or the particular FTDI adapter, either is acceptable/useful) and the /dev/ entry.
Any help much appreciated. I know this is similar to at least one other previously posted question, but the question was vague and the answers look like they approach, but don't quite achieve what I want. I'm hoping that my question is more clear.
Please note, also, I'm not opposed to answers that use Linux resources outside of lsusb to achieve this, that's just the tool I'm most familiar with. The non-FTDI devices are included for completeness, but they are plugged into a 16 port Genesys Logic hub which appears to be implemented as 5 4-port Genesys Logic hubs stacked together internally.
lsusb -v
will list the serial numbers./dev/serial/by-{id,path...}
on your system.