How can I uniquely identify which device is on USB `hub 6-0:1.0: port 2`?

5,553

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:

udevadm info -q all -p /sys/bus/usb/devices/6-0:1.0

This will give you output of which one of the lines will look like the following (obviously this output won't match your system):

E: DEVICE=/proc/bus/usb/006/053

Then run lsusb and look for the device at Bus 006 Device 053 (from the 006/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 the udevadm command to udevadm info -a -p ... instead which will walk up the udev tree.

Share:
5,553

Related videos on Youtube

jippie
Author by

jippie

I'm into: Linux; Networking; IT Security; Perl; System integration; Arduino; ATtiny & ATmega Microcontrollers (AVR); Analog electronics;

Updated on September 18, 2022

Comments

  • jippie
    jippie over 1 year

    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
    
  • jippie
    jippie about 12 years
    Added my comment to the question. With your help I am able to figure out that 6-0:1.0 is a hub, but what's on port 2?
  • phemmer
    phemmer about 12 years
    @jippie are you sure the problem isnt with the hub? Each device on the hub gets its own device ID, so if the device has a problem, it should give you the device ID of the device having the problem.
  • jippie
    jippie about 12 years
    Starting to look like it indeed.
  • jippie
    jippie about 12 years
    Changed the cabling to the hub, haven´ t had problems yet