Blog‎ > ‎Tech Blog‎ > ‎

How to check usb device speed

posted 2 May 2013, 04:18 by Flip Pipe   [ updated 26 Jun 2013, 13:39 ]
Sometimes we need to see if a device is connect at USB 2.0 speeds or not.

Unfortunately, lsusb do not give this information out of the box. We need to check the /sys/bus/usb and find the right device.

So a create a simple script to do it in a simple way.

$ ./checkUsbSpeed.sh <string>

The string is just part of the output of lsusb.

For example. Check the output of lsusb.

$ lsusb
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 003 Device 003: ID 0fe6:9700 Kontron (Industrial Computer Source / ICS Advent) DM9601 Fast Ethernet Adapter
Bus 003 Device 002: ID 046d:c526 Logitech, Inc. Nano Receiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 138a:003c Validity Sensors, Inc.
Bus 001 Device 004: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 002 Device 003: ID 1bcf:0c31 Sunplus Innovation Technology Inc.
Bus 001 Device 005: ID 046d:c52e Logitech, Inc. 
Choose a device, for example Sunplus

and the run the script

$ ./checkUsbSpeed.sh Sunplus
/sys/bus/usb/devices/2-1.2
Sunplus Innovation Technology.: 480Mbps

It will tell you where in /sys/bus/usb the device is, the name of the manufacturer and the speed.

ċ
Flip Pipe,
2 May 2013, 04:18
Comments