Skip to content
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 Windows #670

Open
oistra-ah opened this issue Mar 22, 2024 · 2 comments
Open
Labels
enhancement New feature or request question Information is requested Windows Related to Windows backend

Comments

@oistra-ah
Copy link

Hi, could please someone give a hint: is it possible to increase timeout for send_feature_report() on Windows? I have the device, which takes a more than 5 sec sometimes for response. Thanks.

@mcuee mcuee added the Windows Related to Windows backend label Mar 23, 2024
@Youw Youw added enhancement New feature or request question Information is requested labels Apr 6, 2024
@Youw
Copy link
Member

Youw commented Apr 6, 2024

As of this moment that is not possible.

Theoretically if could have been possible, but it would require 2 things:

  1. Refactor hid_send_feature_report to switch from HidD_SetFeature to using DeviceIoControl directly;
  2. Introduce new API to specify the timeout.

I have the device, which takes a more than 5 sec sometimes for response.

That is astucally weird from system design POV. If that is your device and you know for a fact that by setting a specific feature your device needs to perform a long-going operation, that is advisable not to perform that action directly during the send_feature_report handling, but rather immediately acknowledge that the operation has started, and send the result later in some async matter (e.g. using the interrupt input report).

@Youw
Copy link
Member

Youw commented Apr 6, 2024

I any case I don't see much point keeping this ticket opened for now, unless someone volunteers to design the API and implement the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Information is requested Windows Related to Windows backend
Projects
None yet
Development

No branches or pull requests

3 participants