UsbTreeView.txt 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. UsbTreeView V2.3.1.0 - Shows the USB Device Tree
  2. Freeware by Uwe Sieber - www.uwe-sieber.de
  3. Works under Window 2000, XP, and higher
  4. Usage:
  5. UsbTreeView [/R:filename]
  6. /R:filename write (silently) a report to filename
  7. UsbTreeView is based upon the USBView sample from the Windows Driver Kit for Server 2003.
  8. Improvements:
  9. - better icons in the treeview
  10. - refresh on device change performed asynchronously, selected item stays selected
  11. - shows additional information gathered from the Windows device management
  12. - shows drive letters/mountpoints and COM ports
  13. - can perform safe removal, device restart and port restart
  14. - custom font and color for the right pane
  15. - toolbar with jump-lists for easily finding devices in complex trees
  16. History
  17. V1.1 - first published version
  18. V1.2 - works with Windows 2000 again
  19. V1.3 - shows some more information about USB 3.0 devices
  20. V1.3.1 - minor fixes
  21. V1.3.2 - workaround for TI root hubs
  22. V1.4.0 - device safe removal and restart, saves window position
  23. V1.4.1 - shows driver version and date, custom font and color for the right pane,
  24. removed some redundant information
  25. V1.4.2 - keeps tree item selection over refresh
  26. V1.5.0 - More USB information
  27. - Extended USB information available under Windows 8
  28. - Rearranged the text output
  29. - Some minor improvements
  30. V2.0.0 - USB enumeration rewritten; faster and independent from the treeview
  31. - Port restart
  32. - Extended host controller information
  33. - Some failed USB requests are re-tried in the background, e.g. for
  34. mouses
  35. - nearly flicker free refresh and resize
  36. - lots of minor improvements
  37. V2.0.1 - Bugfix: Crash on complex descriptors
  38. V2.0.2 - Bugfix: Multiple volumes per disk not shown correctly
  39. - Bugfix: String descriptors which are referenced more than once was
  40. shown multiple times each
  41. V2.1.0 - Decoding of USB Video Class (UVC) 1.1 descriptors
  42. - Toolbar with jump-lists for easily finding devices in complex trees
  43. - Driveletters, COM-Ports or extended device names shown in the device tree
  44. V2.1.1 - Bugfix: Crash on root-hubs which are not a child device of the host controller
  45. V2.1.2 - Bugfix: Windows 'app key' (or Shift+F10) opened the context menu in the wrong position
  46. V2.1.3 - Bugfix: V2.1.2 always showed wrong error for the device's Address property
  47. Bugfix: Workaround for font problem
  48. V2.1.4 - Bugfix: V2.1.3 switched back to the default font
  49. V2.1.5 - New: Can write a report
  50. New: Improved device names in the treeview
  51. V2.1.6 - Bugfix: Crash on decoding USB3 standard hubs
  52. - Bugfix: some format glitches on USB3 standard hubs
  53. V2.1.7 - Bugfix: Decoding of bmAttributes in USB 2.0 Extension Descriptor was wrong
  54. V2.1.8 - Bugfix: Decoding of SuperSpeed Endpoint Companion Descriptors was done only for MSC devices
  55. V2.1.8.1 - Bugfix: Crash when saving report to 'long' path
  56. V2.1.9 - Bugfix: Crash on USB-Hubs with more than 16 Ports
  57. - New: Commandline parameter for writing a report, e.g. /R:U:\UsbTreeView-Report.txt
  58. V2.2.0 - New: Shows some more device properties
  59. - New: Can show the Windows device properties dialog
  60. V2.2.1 - Bugfix: V2.2.0 worked under Windows 7 and 8 only
  61. V2.3.0 - Bugfix: Several bugs which could cause crashes
  62. - New: Decoding of HID descriptors
  63. V2.3.1 - Bugfix: Font color setting was ignored
  64. ToDo:
  65. - USB Video Class H.264 decoding
  66. - Maybe Unicode support if someone shows me that it is required
  67. About Unknown Descriptors
  68. There are two reasons why decriptors cannot be decoded and therefore
  69. shown as "Unknown":
  70. - decoding is not implemented
  71. - the device's InterfaceClass is 0xFF (vendor specific), so class specific
  72. descriptors cannot be decoded since their class is unknown
  73. So, if you have an unknown descriptor and the interface class is not 0xFF
  74. then please let me know, maybe I find the right specification document
  75. and can add the decoding for it.
  76. For an unknown reason HID descriptors often cannot be read, Windows
  77. returns ERROR_GEN_FAILURE or ERROR_INVALID_PARAMETER. As far as I have
  78. seen it depends alone on the device but another user reported that
  79. some device's hid descriptor can be read under NT6 but not under NT5.
  80. About "Safe Removal" and "Restart"
  81. On Safe Removal UsbTreeView first calls the configuration management call
  82. CM_Query_And_Remove_SubTree. On success the device has the problem code
  83. 21 which is CM_PROB_WILL_BE_REMOVED. A code 21 device can be reactivated
  84. by performing a DIF_PROPERTYCHANGE class installer call. This is what
  85. UsbTreeView does if you select "Restart device".
  86. But CM_Query_And_Remove_SubTree needs admin previleges, otherwise it fails
  87. with CR_ACCESS_DENIED. In this case CM_Request_Device_Eject is called
  88. which works without admin previleges but leads to problem code 47 which
  89. is CM_PROB_HELD_FOR_EJECT. Such a device cannot be reactivated alone.
  90. A reactivation is possible by restarting the port or the whole hub it is
  91. attached to. But the latter of course restarts all devices attached to
  92. the hub.
  93. In all cases UsbTreeView just performs the system call and shows a
  94. message-box if Windows returns an error. But Windows does not always
  95. return an error, even there was one, so sometimes nothing happens at all.
  96. About "Restart Port"
  97. This calls IOCTL_USB_HUB_CYCLE_PORT which simulates a disconnect and
  98. reconnect of the attached device.
  99. It is available under XP but usually only for hubs which run with the
  100. Microsoft default driver. 3rd party drivers usually return
  101. ERROR_UNKNOWN_FUNCTION.
  102. Under Vista and Windows 7 it is no more supported, it always fails
  103. with ERROR_NOT_SUPPORTED.
  104. With Windows 8 it works again but in contrast to XP admin previleges
  105. are required. Without admin previleges it fails as under Vista and Win7
  106. with ERROR_NOT_SUPPORTED.
  107. About the Debug-Port
  108. In Microsoft's USBView sample there is a list of USB host controllers
  109. and their debug port. I've put the table into UsbTreeView, it shows
  110. then in the properties of the host controller a line like so:
  111. DebugPort (from List): 1
  112. Windows 8 has extended USB information, it reports for each port if it
  113. is debug capable and this works indeed (seen on a i945G Chipset with ICH7).
  114. USB Mouses
  115. If an USB mouse is moved while the tool requests its USB properties there
  116. is usually an error because the mouse just has more important things to
  117. do. UsbTreeView tries then for some seconds to get this information.
  118. You might see the yellow question mark at your mouse for a moment which
  119. disappears as soon as you stop moving the mouse. This retry mechanism is
  120. done for all type of devices but usually its a mouse where it helps.
  121. Information shown in the tree-view
  122. UsbTreeView is optimized for speed, therefore USB descriptors are not
  123. gathered before a device is selected in the tree-view. So, information
  124. which come from USB descriptors cannot be shown in the tree-view, it
  125. all comes from the Windows devices manager.
  126. Uwe Sieber, mail@uwe-sieber.de
  127. 2013-10-14