Skip to content

hid_get_feature_report() needs to be call two times to get a report #592

Description

@sdegrande

I have an issue getting a feature report from a HMD device: a first call to hid_get_feature_report() reports an error (On Windows, it is a ERROR_GEN_FAILURE - A device attached to the system is not functioning) while a second call returns the expected buffer.

I have the same issue on Linux (Fedora 38).

Even if I close and re-open the device between the 2 requests. For instance, a first use of 'hidapitester' returns -1 bytes, while a second use returns the 64 expected bytes.

And that behavior is cyclic: a third call fails, a forth call succeeds, and so one.

I tried with the hid client test from Microsoft (hclient), which uses an other API (HidD_GetFeature), and I have the exact same behavior.

Could any of you have an explanation ?

Activity

  1. mcuee commented on Jun 22, 2023

    @mcuee
    Member

    You may need to provide more details about the device (eg: the output of hidtest of your device under Linux) and the your test results.

    Do you know the detail communication protocol of the device? It can be that the device is broken. It can be that you need to send a set feature request before sending the get feature request.

  2. mcuee commented on Jun 25, 2023

    @mcuee
    Member

    Move this to discussion as it is unlikely hidapi issue.

  3. locked and limited conversation to collaborators on Jun 25, 2023
  4. converted this issue into a discussion #594 on Jun 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionInformation is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions