Custom Request Type

61 Views Asked by At

I am trying to develop a basic Proof of Concept for a Fingerprint reader with WebUSB.

I can connect to the device, and the basic functions work. Using Wireshark, I managed to sniff the USB packets and noticed that it uses a different value for the USBRequestType that isn't in the enum. In this case, it uses a value of 3, and Wireshark lists it as "Unknown"

Is there no way to actually send "raw" control transfers? or is this a roadblock?

I don't remember the initial WebUSB having this limitation.

  1. Managed to open the device.
  2. I Managed to test with GET DESCRIPTOR and it works.
  3. Tried to call a ControlTransferIn, and failed
1

There are 1 best solutions below

1
Reilly Grant On

According to the USB specification a value of 3 in that field of bmRequestType is a reserved value, devices implementing vendor-specific control transfers should be using a value of 2, for "vendor".

It is not possible to set reserved bits of the USB setup packet through the WebUSB API.