[libhid-discuss] Determining output report total size and selecting reports

Charles Lepple clepple at ghz.cc
Wed Feb 11 03:11:33 UTC 2009


On Feb 10, 2009, at 7:20 PM, Jeff M wrote:

> For my device I am able to send and receive data with no issues if  
> I hardcode the ReportID in hid_set_output_report.  I am stuck on  
> how to programatically determine the total size of an output report  
> and then to specify using a specific report.

In order to do this in libhid, you need different Usage IDs for each  
report. I was under the impression that the Usages for each report  
had to be unique, but I could be wrong about that.

>   For my device I am supposed to find an appropriately sized report  
> and use that report for the message that I want to send.  Right now  
> I am just sending all messages to the same report.

It's going to take more work to make libhid work with this device  
than it would to simply use the underlying libusb calls directly in  
your code (by hardcoding the parameters for a given report ID). Hint:  
you don't need hidparser/ at all for this, and most of what you need  
is in hid_exchange.c



More information about the libhid-discuss mailing list