Author Topic: WinUsb_QueryDeviceInformation()  (Read 9342 times)

lcpoon

  • Frequent Contributor
  • ****
  • Posts: 58
WinUsb_QueryDeviceInformation()
« on: June 09, 2015, 11:13:41 pm »
Is there other way (using VB.net) to read actual USB device speed because WinUsb_QueryDeviceInformation() returned "1" for LS/FS and "3" for HS/SS? It is good if we can separate LS/FS and HS/SS.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: WinUsb_QueryDeviceInformation()
« Reply #1 on: June 10, 2015, 09:45:45 am »
If WinUsb_QueryDeviceInformation returns 1 AND any of these is true, the device is full speed:

The device has a bulk or isochronous endpoint.

wMaxPacketSize for the control endpoint = 16, 32, or 64.

The device has > 2 endpoint addresses in addition to the control endpoint.

The device has an interrupt endpoint with bInterval < 10 or max packet size > 8.

If none are true, the device may be low or full speed.

***

If WinUsb_QueryDeviceInformation returns 3 AND this is true, the device is high speed:

wMaxPacketSize for the control endpoint = 64.

Otherwise the device is operating at SuperSpeed or SuperSpeedPlus.