How to find USB VID/PID on various operating systems


Linux users can, of course, just use lsusb or usbview.   Run as root because on some systems, this doesn’t show all the information otherwise.

lsusb (short form)

$ sudo lsusb

Bus 002 Device 049: ID eb1a:1760 eMPIA Technology, Inc.

Bus 002 Device 007: ID 04e8:323a Samsung Electronics Co., Ltd ML-1710 Printer

Bus 002 Device 005: ID 055f:0006 Mustek Systems, Inc. ScanExpress 1200 UB

Bus 002 Device 003: ID 0409:0058 NEC Corp. HighSpeed Hub

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 001 Device 028: ID 0518:0001 EzKEY Corp. USB to PS2 Adaptor v1.09

Bus 001 Device 003: ID 046d:c03f Logitech, Inc. UltraX Optical Mouse

Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

The “sudo” command is used to run the command as root (Adminstrative User) and is needed on systems where you don’t normally log in as root.   If you are already root, you can just run lsusb without the sudo.   The “$” is just the command prompt and will vary depending on system configuration.   It is normally a “$” if you are an ordinary user or “#” if you are root and is often preceeded by the name of the current directory and sometimes the machine name and username.

   If you can’t tell which device is the device you are interested in, unplug the device and repeat the listing then plug it back in and do the listing again.   Compare the listings; the device which disappears and then reappears from the listing is the device you want.

lsusb (long form)

   For this, you need the VID/PID obtained using the short form of lsusb.  In this example, it was “eb1a:1760”. If you use lsusb -v without this, you get the long form listing for all devices which can be very long indeed and include a lot of irrelevant information.

$ sudo lsusb -v -d eb1a:1760

To save the information above to a file use:

  # lsusb -v eb1a:1760 > output.txt

The verbose listing not only decodes the USB device descriptor, it also decodes the class descriptors for hub, audio, HID, communications, chipcard, and video classes.

   If you are using a Knoppix or Ubunto Live CD, you need a way to share this information with the outside world.   You can run the firefox web browser (if your network adapter is working) and paste the information into a web form if that is all you need.    Or you can save the info on a usb flash drive or to a windows hard disk partition.

   If you create a USB flash drive to boot Knoppix or ubunto (directions on the net), create a small FAT32 partition on the flash drive so windows can easily see it.


usbview should not be mistaken for the similarly named utility on windows, although the names are the same and their purpose is similar.  Usbview is a GUI application.   It does not provide as much detail as lsusb -v but it provides it in a nice tree format.

Incidently, usbview also give you hints as to whether your device is plugged into a slow USB full speed port or a fast USB 2.0 high speed port.  Some devices don’t work reliably or run slower when not plugged into a high speed port.  On my system the same device shows up under EHCI Host controller on a slow port but under USB 2.0 Hub Controller under EHCI host controller on a fast port.   If it shows up under an OHCI Host Controller or UHCI Host Controller, it is connected to a slow port.  Oddly, when plugged into the same port a webcam showed up under the EHCI Host Controller/USB2.0 Hub Controller but the keyboard shows up under OHCI Host Controller; this probably has something to do with emulation as the keyboard and mouse are used prior to booting.

usbview also reports the driver associated with each device, using the less than clear format “Name: uvcvideo”

 # sudo usbview &


   cat /proc/bus/usb/devices will give a listing for all usb devices.     It is more detailed than a plain lsusb and more succinct than a lsusb -v.    You have to pick the approprate block of information (separated by blank lines) from the output.   This is the form that it submitted to and is suitable for posting where you can’t post the full lsusb -v output.    For a USB Video Class Device, it doesn’t list supported resolutions, bitrates, encoding formats, or user controls which the lsusb -v listing does.

T:  Bus=02 Lev=02 Prnt=03 Port=01 Cnt=02 Dev#= 12 Spd=480 MxCh= 0

D:  Ver= 2.00 Cls=ef(unk. ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1

P:  Vendor=eb1a “ProdID” =1760 Rev= 6.08

S:  Manufacturer=Infoxelle

S:  Product=Digital Microscope

S:  SerialNumber=VT1760

C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA

A:  FirstIf#= 0 IfCount= 2 Cls=0e(video) Sub=03 Prot=00

I:* If#= 0 Alt= 0 #EPs= 1 Cls=0e(video) Sub=01 Prot=00 Driver=uvcvideo

E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=32ms

I:* If#= 1 Alt= 0 #EPs= 1 Cls=0e(video) Sub=02 Prot=00 Driver=uvcvideo

E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms


   If you run lshw with the -numeric option, it will show the vendor device ID t the end of the product: line.   Leading zeros are supressed rather than printing as 4 digit hex.


    The file /var/log/messages contains syslog information including messages printed by device drivers when they recognize a device.    To use, unplug the device.   Then run:


       $ sudo tail -n 0 -f /var/log/messages


       $  sudo tail -n 0 -f /var/log/messages | tee /tmp/logmessages

Wait ten seconds or so after you plug in the device and then hit control-C to stop the program.   The tail program with these options will just show you the new information as it is added to the file.    The tee program saves the output of the tail program in a file (/tmp/logmessages) while simultaneously showing the output to you.

Here is some sample output:

Apr 15 22:11:48 cervantes kernel: [1380806.451378] usb 2-8.2: USB disconnect, address 67

Apr 15 22:11:52 cervantes kernel: [1380812.296497] usb 2-8.2: new high speed USB device using ehci_hcd and address 68

Apr 15 22:11:52 cervantes kernel: [1380812.982274] usb 2-8.2: configuration #1 chosen from 1 choice

Apr 15 22:11:53 cervantes kernel: [1380812.982891] uvcvideo: Found UVC 1.00 device Digital Microscope (eb1a:1760)

Apr 15 22:11:53 cervantes kernel: [1380813.490404] input: Digital Microscope as /class/input/input1430

Apr 15 22:11:53 cervantes kernel: [1380813.490666] usb 2-8.2: New USB device found, idVendor=eb1a, idProduct=1760

Apr 15 22:11:53 cervantes kernel: [1380813.490673] usb 2-8.2: New USB device strings: Mfr=2, Product=1, SerialNumber=3

Apr 15 22:11:53 cervantes kernel: [1380813.490676] usb 2-8.2: Product: Digital Microscope

Apr 15 22:11:53 cervantes kernel: [1380813.490679] usb 2-8.2: Manufacturer: Infoxelle

Apr 15 22:11:53 cervantes kernel: [1380813.490681] usb 2-8.2: SerialNumber: VT1760

PostgreSQL and soap / xpath
How To Tar Files And Folders Easily