Skip to content

USB HID Set Report and Get Report #145

@frankmeho

Description

@frankmeho

Describe the bug
A clear and concise description of what the bug is.
Recently I developed my owned Java PC tool to send USB HID commands with hid4java-0.7.0.jar library. It works well on most of embedded systems such as Qualcomm platform. But one specific platform needs to send Set Report command first, then send another Get Report to receive the correct response. However, this specific platform can be sent Set Report correctly, but failed to send the Get Report, which means when I send Get Report, there's no any response. Use USB analyzer to capture USB packets, only the Set Report can be seen, not any Get Report packet was sent out.

To Reproduce
Steps to reproduce the behavior:

  1. hidDevice.write(data, len, (byte)ReportID) to send USB HID command
  2. hidDevice.read(data, 500) to receive the response data.
  3. For the specific platform, I send hidDevice.write(data, len, (byte)SetReportID), and then hidDevice.write(data, len, (byte)GetReportID), it's failed to send Get Report, its returned code is wrong.

Expected behavior
How can I let the specific platform to work with my owned Java PC tool? Use another C/C++ SimpleHIDWrite to Set Report, and then Get Report, both can work.

Screenshots
If applicable, add screenshots to help explain your problem.
None

Desktop (please complete the following information):
Windows 10

Smartphone (please complete the following information):
None

Additional context
None

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions