signal11 / hidapi

A Simple library for communicating with USB and Bluetooth HID devices on Linux, Mac, and Windows.
http://www.signal11.us/oss/hidapi/
Other
2.46k stars 901 forks source link

Windows 10: get_feature_report encounters "OSError: read error" #475

Closed wagnerism closed 2 years ago

wagnerism commented 2 years ago

I have a USB relay HID device that works on linux but does not work on Windows 10. It appears to be a permissions issue but I cannot find any way to change permissions. This is not a mouse or keyboard, so I am hoping that this HID is not protected by the Windows OS.

>>> h.get_manufacturer_string()
'www.dcttech.com'
>>> h.get_product_string()
'USBRelay4'
>>> h.get_serial_number_string()
''
>>> h.get_feature_report(1,8)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "hid.pyx", line 346, in hid.device.get_feature_report
OSError: read error
wagnerism commented 2 years ago

Here's the desired result that I obtained in linux (where I added permissions to the HID)

>>> h.get_feature_report(1,8)
[81, 65, 65, 77, 90, 0, 0, 1]

So can this be made to work in windows?