Electronic – USB host requesting invalid descriptor length

usb

Monitoring the traffic to my USB HS device, there is a strange transfer. Host is 64 bit Ubuntu 13.10.

  • The Device Descriptor is always 18 bytes, by USB specification.
  • On each enumeration, the host sends 3 Get Descriptor: Device requests with wLength fields of 18, 8 and 18.
  • Wireshark complains that the second response, in which the device correctly chops the first 8 bytes from the Device Descriptor and sends them, is a Malformed packet.

The device eventually enumerates successfully, but does not appear in the sound menu to stream audio to.

The same device, under 64 bit Windows, again enumerates correctly, but reposts
Error (10): The device cannot start.

So my question is: Is the described situation in the bullet-points abnormal, or is Wireshark wrong?

Best Answer

Requesting 8 bytes for device descriptor is very normal. Windows has been using this to know the exact Endpoint0 max packet size. Since this varies from devices to devices (possible values are 8 ... 64). 8 is chosen because regardless of endpoint0 size, the request will be ended with only one data packet. This should be no problems since device must always return the requested data up to the requested length by the specs. This also applies with configuration descriptor in some OS, the host firstly request only 9 bytes just to know the total length then request the full descriptor afteward.

To sum up, I think your device's problem possibly on something else such as audio class driver