title: python: How can I determine the HID collections of a USB device on windows
body: <p>Is there a way to use python to determine the HID collections that a USB device supports on a windows system? I know the PID and VID if that helps.</p>
  
  <p>Is there a python library that supports getting this information from a windows OS?</p>
  
  <p>I want to see the information that is reported in a USB report descriptor, like TELEPHONY DEVICE PAGE (0X0B)  or  CONSUMER PAGE (0X0C) as listed in the “Universal Serial Bus HID Usage Tables” specification provided by usb.org. If I could see the report descriptor that is reported to the OS at enumeration (what I see on a USB bus analyzer), I could interpret this info myself. </p>
  
  <p><strong>This information is also reported in windows "device manager" if there is a way to access that programmatically with python.</strong></p>
  
  <p><strong>Here's a sample of info from windows "device manager" that I'm trying to get</strong></p>
  
  <pre><code>HID\VID_047F&amp;PID_4304&amp;REV_1030&amp;MI_03&amp;Col01
  HID\VID_047F&amp;PID_4304&amp;MI_03&amp;Col01
  HID\VID_047F&amp;UP:000C_U:0001
  HID_DEVICE_SYSTEM_CONSUMER
  HID_DEVICE_UP:000C_U:0001
  HID_DEVICE
  </code></pre>
  
  <p><strong>here is another example, the vendor unique page 0xFFA2, collection 3</strong></p>
  
  <pre><code>HID\VID_047F&amp;PID_4304&amp;REV_1030&amp;MI_03&amp;Col03
  HID\VID_047F&amp;PID_4304&amp;MI_03&amp;Col03
  HID\VID_047F&amp;UP:FFA2_U:0003
  HID_DEVICE_UP:FFA2_U:0003
  HID_DEVICE_UPR:FF00-FFFF
  HID_DEVICE
  </code></pre>