You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sending an output report to an HID device (it is a kind of USB-dongle) results in an hanging communication.
I investigated a little bit and found a workaround for my problem. The described modification are working on my side.
My workaround looks like this:
In the member function send_output_report(self, data) (file core.py) I replaced lines 534 - 567 by the following 2 lines: result = hid_dll.HiD_SetOutputReport(int(self.hid_handle), byref(raw_data), len(raw_data))
return result
As I do not know very much about HID devices, my question is: Is the change I did OK ?
It can also be that my USB device has some issues and the original code is fully OK.
For me it is a logical step to use the API-call from the DLL to communicate with the USB device. The same is done for the member function send_featue_report(self, data), which also calls the API-function hid_dll.HidD_SetFeature(int(self.hid_handle), byref(raw_data), len(raw_data)).
The text was updated successfully, but these errors were encountered:
Chris0074
pushed a commit
to Chris0074/pywinhid
that referenced
this issue
Sep 25, 2024
Sending an output report to an HID device (it is a kind of USB-dongle) results in an hanging communication.
I investigated a little bit and found a workaround for my problem. The described modification are working on my side.
My workaround looks like this:
In the member function send_output_report(self, data) (file core.py) I replaced lines 534 - 567 by the following 2 lines:
result = hid_dll.HiD_SetOutputReport(int(self.hid_handle), byref(raw_data), len(raw_data))
return result
As I do not know very much about HID devices, my question is: Is the change I did OK ?
It can also be that my USB device has some issues and the original code is fully OK.
For me it is a logical step to use the API-call from the DLL to communicate with the USB device. The same is done for the member function send_featue_report(self, data), which also calls the API-function hid_dll.HidD_SetFeature(int(self.hid_handle), byref(raw_data), len(raw_data)).
The text was updated successfully, but these errors were encountered: