Usb Tree View
Usb Tree View
Usb Tree View
Works under Windows 2000, XP, Windows 7, 8, 10, 11 and Server 2000 to 2022
Usage:
Without parameters it starts with a GUI.
Params:
UsbTreeView [/R=filename] [/X=filename] [/O=filename] [/L[n]=logfile]
UsbTreeView is based upon the USBView sample from the Microsoft Windows Driver Kit
for Windows Server 2003.
Improvements:
- refresh on device change performed asynchronously, per device and selected item
stays selected
- shows additional information gathered from the Windows device management
- shows drive letters/mountpoints and COM ports
- can perform safe removal, device restart and port restart
- shows open handles on failed safe removal
- TreeView highlighting of arrived and removed devices
- better icons in the treeview
- custom font and color for the right pane
- toolbar with jump-lists for easily finding devices in complex trees
- search to find device IDs, device names etc
- nodes of empty hubs kept closed by default
- nodes can be renamed by pressing F2 or by clicking it when already selected
(needs admin privileges)
- additional descriptors are decoded as Audio 2.0, UVC 1.5
- write and read a report in XML format (not compatible with USBview's)
- copy a screenshot of the tree-view to the Windows clipboard
History since V2.5.0, for old history see UsbTreeView.txt in here: http://www.uwe-
sieber.de/files/usbtreeview261.zip
Computer : Computer
blue USB : empty port, with Letters L, F, H, S for Low, Full, High and
SuperSpeed
blue+red USB : port with a device connected (no error, no problem), with Letters
L, F, H, S for Low, Full, High and SuperSpeed
Controller Card: USB host controller
Root : USB root hub
Hub white : Standard Full-Speed hub
Hub green : Standard High-Speed hub
Hub blue : Standard SuperSpeed hub
Green Number : Problem code from Windows device manager (safely removed: 21, 24,
47)
Yellow Number : Problem code from Windows device manager (all others)
D1..D4 : Power state from Windows device manager if not D0 and no problem
code
Red E : Unexpected error
Red OC : Over-current error
Exclamation : Device Connection Status is neither NoDeviceConnected nor
DeviceConnected or
error when reading the USB configuration descriptor or
the 'Current Config Value' is 0
Keyboard shortcuts:
F5 re-enumeration of all information
Ctrl+S save XML report
Ctrl+O open a XML report
Alt+D open the drives list
Alt+O open the "Others" list
Alt+S focus the search edit
Alt+Left/Right cycle thru the search hits
Requesting a USB ports maximum speed is supported by Windows 8 and higher. On older
system there is no way to determine which ports of an xHCI root hub supports
SuperSpeed,
therefore the icons have no letter indicating the speed. Ports of High-Speed hubs
are
assumed to handle High-Speed, ports of SuperSpeed standard hubs to handle
SuperSpeed.
So far the Win32 USB API does not support requesting a USB port's max supported
SuperSpeedPlus speed or a USB version higher than 3.0, see enum USB_PROTOCOLS in
usbioctl.h:
https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/usbioctl/ns-usbioctl-
_usb_protocols
Workaround:
If a device is running at SuperSpeedPlus then the UsbTreeView remembers that the
used port obviously supports that speed.
The Win32 USB API does not provide any more information than "SuperSpeedPlus
capable or higher"
and "operating at SuperSpeedPlus or higher", so UsbTreeView cannot show more than
that.
The only data struct which seem to support to report more than 10 GBits/s is the
"SuperSpeedPlus USB Device Capability Descriptor" (see USB 3.2 spec 9.6.2.5).
But so far this descriptor looks identical for all ever seen devices, including
those
which are running at 20 GBits/s speed: Length of 20 Bytes, reporting exactly one RX
and TX
sub-link at a speed of 10 GBits/s. No idea if this is a limitation of the Windows
USB API
or if this really comes from the devices. But even this would report as expeced, it
still
is the device's capability only, not the actual connection speed.
USB 2.0 devices must support High- and Full-Speed. In the "Device Qualifier
Descriptor"
they report their capabilities for the other speed which for instance is different
for web-cams which support lower resolutions and frame-rates at Full-Speed.
For marketing purposes many non-high-speed devices report a USB version of 2.0 but
that
is wrong because USB 2.0 spec says 9.2.6.6:
"Devices that are high-speed capable must set the version number in the bcdUSB
field of
their descriptors to 0200H. This indicates that such devices support the
other_speed
requests defined by USB 2.0."
So, for USB 2.0 devices UsbTreeView request the "Device Qualifier Descriptor". If
this
causes trouble it can be skipped for Low-Speed devices by setting
SkipDeviceQualiDescForLowSpeedDevs=1
in the UsbTreeView.ini (while it is not running).
There are two reasons why decriptors cannot be decoded and therefore
shown as "Unknown":
- decoding is not implemented
- the device's InterfaceClass is 0xFF (vendor specific), so class specific
descriptors cannot be decoded since their class is unknown
So, if you have an unknown descriptor and the interface class is not 0xFF
then please let me know, maybe I find the right specification document
and can add the decoding for it.
About ERROR_INVALID_FUNCTION
3rd party USB controller and hub drivers usually do no support all the
requests the Microsoft standard drivers do. They fail with ERROR_INVALID_FUNCTION.
For instance that's the case for several USB hub information request, here you
get five ERROR_INVALID_FUNCTION in a row. That's not a problem, just some missing
information.
The USB 2.0 spec states that a USB version 0x200 "indicates that such devices
support
the other_speed requests". But many device which report a USB version 0x200
are in fact simple USB 1.1 full-speed devices which report USB version 2.0 for
pure marketing purposes. This (uncritical) error is the result.
Since V3.3.9 a bcdUSB value of 0x200 is blamed as an error therefore if the device
is full-speed only.
Intel Series 8 xHCI (USB3) controllers are known for having a limitited number of
64 endpoints. The Windows error message is "Not Enough USB Controller Resources"
when attaching a new device.
In all cases UsbTreeView just performs the system call and shows a
message-box if Windows returns an error. But Windows does not always
return an error, even there was one, so sometimes nothing happens at all.
USB Mouses
If a USB mouse is moved while the tool requests its USB properties there
is usually an error because the mouse just has more important things to
do than answering descriptor requests. UsbTreeView tries then for some
seconds to get this information.
You might see the yellow question mark at the mouse's tree node for a
moment which disappears as soon as you stop moving the mouse.
This retry mechanism is done for all type of devices but usually its a
mouse where it helps.
Always On Top
Hints
UsbTreeView is Freeware.
Allowed:
- usage in any environment, including commercial
- include in software products, including commercial
- include on CD/DVD of computer magazines
- distribution by means of packet managers
Not allowed:
- modify any of the files
- offer for download by means of a "downloader" software