USBInfo

Tree overview Device information Configuration Text output Command line options Download

USBInfo is a Perl script with a GTK+ 2 interface that provides a graphical overview of USB devices connected to your Linux system. It does this by parsing the special /proc/bus/usb/devices file and displaying the results in window.

Note however that USBInfo does not require the presence of GTK or X and will produce comprehensive textual output when run on a console, or when the gtk2-perl modules are not available.

Tree overview

When run USBInfo will display a window with the USB device tree overview. It will list the USB busses, its root hubs, and any devices connected to the system.

This is a screenshot of how USBInfo looks on my system without any devices connected. It show the two USB busses, and the two root hubs that are the basis of every bus.

(Click on images to see a larger screenshot)

Then when I plug in a Logitech mouse the window will update automatically after a short while and show the new information. The mouse is connected to port 0 of the root hub of the second USB bus. That is the bus with the connectors on the front of the computer on my system.

Device information

For every device connected to the computer Linux provides a number of technical details. This information can be requested from the tree overview by activating a device line, by double clicking, pressing space or return, or by using the right mouse button pop-up menu.

The information for a device will be displayed in a separate window. This screenshot shows the window with all the technical details for the Logitech mouse.

Configuration

Every application needs some configuration options you can tinker with, and USBInfo is no exception. The menu option Configuration opens a new window with the following options.

USB devices file
The file from which the USB device information will be read. Normally this will be /proc/bus/usb/devices, but you can change it to any file that contains a dump of this special file.
Poll time
The time in 10ths of a second between checks for changes to the USB devices file. A value of 0 will disable this continuous polling. When polling is disabled you can use the Refresh menu option to force a redraw.
Show free ports in the USB device tree
Show every port of every hub in the device tree, even when there is no device connected to it. Use it to find out how many ports a hub has, or where you can connect your new USB device. (See the screenshot for an example)
Mark devices without a driver
Devices that have not been claimed by a driver can be marked with a different colour to distinguish them from the rest. USBInfo as downloaded from this page will display those devices in red. (See the screenshot for an example)
Use a file with USB ID's to name mappings
Not every USB device provides textual information as to what kind of device it is. In such a situation the only thing known about a device are its USB ID's. By using a file that has mappings from those ID's to human readable names the USB device tree will be a lot easier to understand. Compare the difference between the first screenshot with the option turned off, and the second screenshot with the option turned on.
USB ID's file
The file that contains the mappings from USB ID's to human readable names. USBInfo as downloaded from this page will use the Debian default location.
The selected options can be saved to a personal configuration file that will be used the next time USBInfo is run.
Screenshot of the configuration editing dialog

Text output

When USBInfo cannot detect X running or cannot find the gtk2-perl modules it will run in text mode. It will print the USB tree overview and a dump of the device information for every device to stdout and then exit.

Note that when USBInfo is running in graphics mode this same text output can be requested and saved to a file by using the Save as text menu option.

See below for the text output produced for the example with the Logitech mouse connected to my system.

USB tree overview
=================

USB bus 1
    Linux 2.6.12.3 uhci_hcd - VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
USB bus 2
    Linux 2.6.12.3 uhci_hcd - VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#2)
        Port 0: Logitech - USB-PS/2 Optical Mouse


USB devices information
=======================

USB device info for Linux 2.6.12.3 uhci_hcd - VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller:
 Bus number:                            1
 Device number:                         1
 Speed:                                 12 Mb/s (Full)
 Max children:                          2
 Bandwidth allocated:                   0/900 us (0%)
 Number of interrupt requests:          0
 Number of isochronous requests:        0
 USB version:                           1.10
 Class:                                 09 (Hub)
 Subclass:                              00 (Unused)
 Protocol:                              00
 Max default packet size:               8
 Vendor ID:                             0000
 Product ID:                            0000
 Revision:                              2.06
 Manufacturer string:                   Linux 2.6.12.3 uhci_hcd
 Product string:                        VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
 Serialnumber string:                   0000:00:07.2
 Configuration 1 (active)
     Attributes:                        c0 (self powered)
     Max power:                         0 mA
     Interface 0
         Alternative 0
             Class:                     09 (Hub)
             Subclass:                  00 (Unused)
             Protocol:                  00
             Driver:                    hub
             Endpoint 0
                 Address:               81 (input)
                 Attributes:            03 (interrupt)
                 Max packet size:       2
                 Interval:              255 ms

USB device info for Linux 2.6.12.3 uhci_hcd - VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#2):
 Bus number:                            2
 Device number:                         1
 Speed:                                 12 Mb/s (Full)
 Max children:                          2
 Bandwidth allocated:                   0/900 us (0%)
 Number of interrupt requests:          0
 Number of isochronous requests:        0
 USB version:                           1.10
 Class:                                 09 (Hub)
 Subclass:                              00 (Unused)
 Protocol:                              00
 Max default packet size:               8
 Vendor ID:                             0000
 Product ID:                            0000
 Revision:                              2.06
 Manufacturer string:                   Linux 2.6.12.3 uhci_hcd
 Product string:                        VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#2)
 Serialnumber string:                   0000:00:07.3
 Configuration 1 (active)
     Attributes:                        c0 (self powered)
     Max power:                         0 mA
     Interface 0
         Alternative 0
             Class:                     09 (Hub)
             Subclass:                  00 (Unused)
             Protocol:                  00
             Driver:                    hub
             Endpoint 0
                 Address:               81 (input)
                 Attributes:            03 (interrupt)
                 Max packet size:       2
                 Interval:              255 ms

USB device info for Logitech - USB-PS/2 Optical Mouse:
 Bus number:                            2
 Device number:                         2
 Speed:                                 1.5 Mb/s (Low)
 Max children:                          0
 USB version:                           2.00
 Class:                                 00 (Defined at Interface level)
 Subclass:                              00
 Protocol:                              00
 Max default packet size:               8
 Vendor ID:                             046d
 Product ID:                            c00e
 Revision:                              11.10
 Manufacturer string:                   Logitech
 Product string:                        USB-PS/2 Optical Mouse
 Configuration 1 (active)
     Attributes:                        a0 (remote wakeup)
     Max power:                         98 mA
     Interface 0
         Alternative 0
             Class:                     03 (Human Interface Devices)
             Subclass:                  01 (Boot Interface Subclass)
             Protocol:                  02 (Mouse)
             Driver:                    (none)
             Endpoint 0
                 Address:               81 (input)
                 Attributes:            03 (interrupt)
                 Max packet size:       4
                 Interval:              10 ms

Command line options

When invoking USBInfo there are several command line options that can be used to change the configuration. Command line parameters take precedence over built in defaults and over a personal configuration file.

-h, --help
Show the command line help text.
-d, --devices_file=FILE
Read USB devices information from FILE.
-p, --poll_time=N
Wait N 10ths of a second between checking for changes to the devices file.
-f, --free_ports
Show free ports in the USB device tree overview.
-n, --no_driver
Mark devices without a driver.
-u, --use_usb_ids
Use a file with USB ID's to name mappings.
-i, --ids_file=FILE
Read the USB ID's to name mappings from FILE.

Download

This is the "works for me" ™ 0.1 release that runs on my Debian unstable system: USBInfo-0.1

Required extra software:

Optional extra software: Even more optional:

On a Debian system the usb.ids file is part of the usbutils package. But it can also be downloaded from here.

Feedback

When you have problems running USBInfo or you want to send me money or praise you can email me: arjan AT opmeer DOT net.