How can I uniquely identify which device is on USB hub 6-0:1.0: port 2
?
I receive messages in my dmesg
every now and then and I want the system to tell me which device is connected to that port.
EDIT: OK, I can figure out which hub it is, but how can I figure out which device is on port 2 (out of four).
udevadm info -q all -p /sys/bus/usb/devices/6-0:1.0
P: /devices/pci0000:00/0000:00:1d.0/usb6/6-0:1.0
E: DEVPATH=/devices/pci0000:00/0000:00:1d.0/usb6/6-0:1.0
E: DEVTYPE=usb_interface
E: DRIVER=hub
E: INTERFACE=9/0/0
E: MODALIAS=usb:v1D6Bp0001d0302dc09dsc00dp00ic09isc00ip00
E: PRODUCT=1d6b/1/302
E: SUBSYSTEM=usb
E: TYPE=9/0/0
E: UDEV_LOG=3
Best Answer
I don't know of any utility that can give you this information directly, but you can get it by using a few different utilities.
Shortest route:
This will give you output of which one of the lines will look like the following (obviously this output won't match your system):
Then run
lsusb
and look for the device atBus 006
Device 053
(from the006/053
in the above line), this will be your device..
For more info, you can poke around in that
/sys/bus/usb/devices/6-0:1.0
if you want. You can also change theudevadm
command toudevadm info -a -p ...
instead which will walk up the udev tree.