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:
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.