1

I am looking forward to capture USB traffic with Wireshark. The tutorials I have seen use lsusb together with Wireshark. However, I'm on Windows.

From an lbusb equivalent I expect

  • it is gratis
  • it is a console application
  • it shows USB device descriptors and the port it is connected to
  • runs on Windows 7 (x64 needed) and higher, if possible
3

I just recalled that I used the graphical tool NirSoft USBDeview. Looking at the vendor's website, I find it can also be run as a command line tool.

Command line options:

/stext <Filename>    Save the list of all USB devices into a regular text file.
/stab <Filename>     Save the list of all USB devices into a tab-delimited text file.
/scomma <Filename>   Save the list of all USB devices into a comma-delimited text file.
/stabular <Filename> Save the list of all USB devices into a tabular text file.
/shtml <Filename>    Save the list of all USB devices into HTML file (Horizontal).
/sverhtml <Filename> Save the list of all USB devices into HTML file (Vertical).
/sxml <Filename>     Save the list of all USB devices to XML file. 

License:

This utility is released as freeware. You are allowed to freely distribute this utility via floppy disk, CD-ROM, Internet, or in any other way, as long as you don't charge anything for this. If you distribute this utility, you must include all files in the distribution package, without any modification !

System requirements:

This utility works on Windows 2000, Windows XP, Windows 2003, Windows Vista, Windows Server 2008, Windows 7, Windows 8, and Windows 10. Both 32-bit and 64-bit systems are supported. Windows 98/ME is not supported.

0

There are several tools available for this purpose. However, and unfortunately there is not one single tool like lsusb which does it all. Here are your options:

  • DevCon.exe (CLI) which is available in sources from the github repo, or alternatively can be obtained from the Windows SDK, WDK (Windows Driver Kit) or EDWK. To download the wdksetup.exe run and extract the WDK for use on a separate computer. Then extract and run only the Windows Driver Kit-x86_en-us.msi installer. The binaries are now available under:
    C:\Users\XXXX\Downloads\Windows Kits\10\WDK\Installers\Tools\x64\devcon.exe

  • USBview.exe (GUI & CLI) - available in same location as above. And described here.

  • listdevs.exe (CLI) - You can use some of the libusb based tools found in their github. To get the latest binaries, extract the 7z release and look in examples directory.
    Example usages:


# listdevs.exe

0bda:0139 (bus 2, device 1) path: 8
8086:8c26 (bus 3, device 0)
8087:8008 (bus 1, device 1) path: 1
13d3:3402 (bus 2, device 3) path: 5
16c0:05df (bus 2, device 14) path: 2
8087:8000 (bus 3, device 1) path: 1
04f2:b3fd (bus 2, device 2) path: 7
046d:c52b (bus 2, device 4) path: 3
8086:8c2d (bus 1, device 0)
8086:8c31 (bus 2, device 0)

# Then use xusb to get details of the VID/PID:
# xusb.exe -i 16c0:05df

Using libusb v1.0.22.11312
Opening device 16C0:05DF...
Device properties:
        bus number: 2
         port path: 2 (from root hub)
             speed: 1.5 Mbit/s (USB LowSpeed)

Reading device descriptor:
            length: 18
      device class: 0
               S/N: 0
           VID:PID: 16C0:05DF
         bcdDevice: 0100
   iMan:iProd:iSer: 1:2:0
          nb confs: 1

Reading BOS descriptor: no descriptor

Reading first configuration descriptor:
             nb interfaces: 1
              interface[0]: id = 0
interface[0].altsetting[0]: num endpoints = 1
   Class.SubClass.Protocol: 03.00.00
       endpoint[0].address: 81
           max packet size: 0008
          polling interval: 0A

Claiming interface 0...

Reading string descriptors:
   String (0x01): "digistump.com"
   String (0x02): "DigiUSB"

Releasing interface 0...
Closing device...
libusb: error [parse_bos] unexpected descriptor 0 (expected f)

  • On this site we appreciate one answer per tool, as long as they are independent of each other. This makes it possible to vote and accept one of the tools only. If you post 3 tools in one answer, I might want to give you 1 upvote and 2 downvotes (which is not possible) and nobody will know which tool actually solved my problem. – Thomas Weller Jan 17 at 15:39
  • This usage on this site should be described in some meta post as well. – Thomas Weller Jan 17 at 15:40
  • @ThomasWeller Aha, ok, I didn't know. I'm obviously new to this site. Either way, as I mentioned, there is not any single tool that does what lsusb does, at least not unless the OP state what exact info he's looking for. In addition, the answer also depend on what you are willing to go through to get those tools. Are you willing to compile from scratch, or you just want to click and download? Do you want GUI or CLI, only? (Here he wanted CLI, AFAICT.) – not2qubit Jan 17 at 17:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.