-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
need longer timeout with send_feature_report() for libusb under Linux #493
Comments
I guess it was only a matter of time when that magic number would backfire at us. But we definitely need a workaround for that. I think a libusb-specific option (e.g. P.S.: PR is welcome. |
Thank you for your quick response. I'm afraid I'm not sure if I want to do a PR myself for now. Easiest workaround is to use libhidapi-hidraw instead of libhidapi-libusb . |
I'd say - a perfect one. |
For a historical reference: |
I think we may want to promote the use of the hidraw backend for Linux and not the libusb backend. |
Totally agree. But that does not exclude having a potential fix for libusb backend. |
Hi, |
That is interesting, what is the device? The original issue only mentions Linux and only libusb backend. |
Sorry for asking in this topic. I've just created #670. Device is a tiny USB climate sensor on the stm32f4 |
Some devices may require much longer timeout when submitting hid_send_feature_report() .
for such devices hid_send_feature_report() just notifies failure with return value of -1 .
I checked that internal error code libusb is reporting is LIBUSB_ERROR_TIMEOUT ( -7 ) .
Changing value here, from 1000 to, say, 5000 does make difference.
hidapi/libusb/hid.c
Line 1471 in c3a6150
You curious what the device is?
It is USB-HID control capable LCD monitor from EIZO . ex. FlexScan EV2670
Most requests to the monitor, for example a request to change speaker volume, work fine with short timeout .
But one specific request that is to enable or disable picture-by-picture mode only works with long timeout .
So it is better to have a measure to somehow specify custom value for timeout.
The text was updated successfully, but these errors were encountered: