2

I am trying to access an HID device class using webusb api on chrome.

So far i am able to detect the device, open it, claim the interface. But when issuing a simple HID report i constantly get "transfer failed".

For instance, to retrieve the current version of if , issuing the HID report 0x05 to it, it will answer back with it.

result = await device.controlTransferOut({
        requestType: 'standard', // tried all combinations: standard / class / vendor
        recipient: 'endpoint', // tried all combinations: device / interface / endpoint / other
        request: 0x05,
        value: 0,
        index: 1
     });

result = await device.controlTransferIn({
        requestType: 'standard',
        recipient: 'endpoint', 
        request: 0x05,
        value: 0,
        index: 1
  }, 64);

NetworkError: A transfer error has occured.

Also, using the standard TransferIn and TransferOut commands, i run into this issue: both in and out endpoints have the same endpointNumber:

Endpoints

Could anybody point me in the right direction?


EDIT:

While I manage to get some data from OS X (windows is still caliming the error), the data is always the same despite the HID report I send.

blackmiaool
  • 5,234
  • 2
  • 22
  • 39
  • 1
    On Windows, what driver is loaded for the device? You can see this in the Device Manager. If it is not winusb.sys then this is not supported by Chrome. – Reilly Grant Oct 25 '17 at 22:54
  • I made a custom driver to force the device to load winusb.sys. I followed the instructions on this post: https://stackoverflow.com/a/46186495/6470742 and loaded the driver. I just bought another device because I think it is broken. Sometimes it behaves strange event the manufacturer software. I will update the psot. as soon I have more information.Thank you – Fernando Rodríguez Nov 07 '17 at 09:59

0 Answers0