............ Have a nice day............

Sunday 20 April 2014

USB Device Tree Viewer, a Microsoft USBView based program

The USB Device Tree Viewer, short UsbTreeView is based upon the Microsoft "USBView" sample application found in the Windows Driver Development Kits and now standalone here: USBView sample application
But it is source code only, there is no executable for end users provided.
UsbTreeView started with the USBView source code from the DDK for Server 2003. Here are the improvements I've done:
  • TreeView with handmade 16x16 icons, USBView used 32x32 icons scaled down to 15x15
  • Informations from the Windows Device Management are collected and matched with the found USB devices; Therefore UsbTreeView can show the child devcies, including drive letters and COM-ports
  • Window position is saved
  • Background color and font of the right pane can be set (the font shown in the screenshots is DOSLike 7)
  • Text output rearranged
  • Keeps the tree item selection over refresh
  • Some more descriptors are decoded
  • Hexdump of the descriptors can be shown
  • Safe removal, device restart and port restart
  • Extended USB information available under Windows 8 (taken from the latest USBView sample application)
  • Extended information about host controllers
  • Enumeration of the USB devices accelerated and independent from the treeview
  • Failed USB requests are re-tried in the background, e.g. if a USB mouse was moved while requesting its properties
  • Toolbar with jump-lists for easily finding devices in complex trees
  • many minor improvements
Todo:
  • USB Video Class H.264 information
  • Maybe Unicode support if someone shows me that it is required

HISTORY:
 V1.2
  • works with Windows 2000 again
V1.3
  • shows some more information about USB 3.0 devices
V1.3.1
  • minor fixes
V1.3.2
  • workaround for TI root hubs
V1.4.0
  • device safe removal and restart
  • saves window position
V1.4.1
  • shows driver version and date
  • custom font and color for the right pane
  • removed some redundant information
V1.4.2
  • keeps tree item selection over refresh
V1.5.0
  • More USB information
  • Extended USB information available under Windows 8
  • Rearranged the text output
  • Some minor improvements
V2.0.0
  • USB enumeration rewritten; faster and independent from the treeview
  • Extended host controller information
  • nearly flicker free refresh and resize
  • many minor improvements
V2.0.1
  • Bugfix: Crash on complex descriptors
V2.0.2
  • Bugfix: Multiple volumes on one disk not shown correcty
  • Bugfix: String descriptors which are referenced more than once was shown multiple times each
V2.1.0
  • New: Decoding of USB Video Class (UVC) 1.1 descriptors (not complete yet)
  • New: Toolbar with jump-lists for easily finding devices in complex trees
  • New: Drive letters and COM-Ports shown in the device tree
V2.1.1
  • Bugfix: Crash on root-hubs which are not a child device of the host controller
V2.1.2
  • Bugfix: When pressing the Windows application key (or Shift+F10) the contextmenu opens now over the selected tree item
V2.1.3
  • Bugfix: V2.1.2 always showed wrong error for the device's Address property
  • Bugfix: Workaround for font problem
V2.1.4
  • Bugfix: V2.1.3 switched back to the default font
V2.1.5
  • New: Can write a report
  • New: Improved device names in the treeview
V2.1.6
  • Bugfix: Crash on decoding USB3 standard hub information
  • Bugfix: Some format glitches decoding USB3 standard hub information
V2.1.7
  • Bugfix: Decoding of bmAttributes in USB 2.0 Extension Descriptor was wrong
V2.1.8
  • Bugfix: Decoding of SuperSpeed Endpoint Companion Descriptors was done only for MSC devices
V2.1.9
  • Bugfix: Crash on USB-Hubs with more than 16 Ports
  • New: Commandline parameter for writing a report, e.g. /R:U:\UsbTreeView-Report.txt
V2.2.0
  • New: Shows some more device properties
  • New: Can show the Windows device properties dialog
V2.2.1
  • Bugfix: V2.2.0 worked under Windows 7 and 8 only
V2.3.0 V2.3.1
  • Bugfix: Font color setting had no effect
V2.3.2
  • Bugfix: Device Descriptor was called Device Qualifier Descriptor and a Device Qualifier Descriptor was not decoded
V2.3.3
    Bugfix: Crash when configuration descritor fails to be read
V2.3.4
    Bugfix: Crash with some USB over network products
V2.3.5
    New: Can save report for selected device only
USB 1.1
Here we have an old XP Computer with one single USB 1.1 host controller. As every USB host controller it has exactly one USB root-hub. The root-hub has two ports, at port 1 there is a USB mass storage device attached which is mounted at drive letter Z:. Even the USB drive is USB 2.0 it is running at Full-Speed only because it is attached to a USB 1.1 hub.
 
usbtreeview_1.png

USB 2.0
Here we have Win7 Computer with an Intel P35 chipset which has 8 USB 2.0 High-Speed capable ports. The 8 physical ports are split here: 4 USB 1.1 controllers deal with USB low and Full-Speed devices while one USB "Enhanced" controller deals with the High-Speed devices. I don't know why the 1.1 ports are split over 4 controllers with 2 ports each. Since all manufactures do this, there must be a good reason...
The USB High-Speed controllers usually have the keyword "Enhanced" in their device name. Since Vista the "USB Hub Capabilities" can be checked for the "HighSpeed" flag.
At port 1 of the Enhanced controller there is a USB High-Speed hub attached and at his port 4 there is a USB mass storage device attached which is thanks to USBDLM mounted at drive letter Z: again. Here it is running at High-Speed.
Newer Intel chipset have no more USB1 root hubs. Insteead there are two integrated standard hubs which translate Low and Full-Speed into High-Speed. Intel calls them "Integrated USB 2.0 Rate Matching Hub".  
usbtreeview_2.png

USB 3.0
Here we have a Win8 Computer with a Texas Instrumens TUSB7340 USB SuperSpeed controller card. Windows 8 has native support for USB 3.0 SuperSpeed and an enhanced USB stack which delivers more information, e.g. which speed each port supports. Therefore UsbTreeView can show a 'H' in the icon of the high-speed ports and an 'S' for the SuperSpeed ports.
The TUSB7340 has 4 physical ports. 4 logical ports are for low, full and high-speed devices and another 4 for SuperSpeed devices. Windows 8 also delivers information about which logical ports belong together. In the screenshot you see that the selected port 4 has the CompanionPortNumber 8, this means that port 4 and 8 share the same physical port.
 
usbtreeview_3.png

Download it from its home page.

1 comment: