PORTS Forum

Ports and Interfaces => USB => Topic started by: yefimg on January 24, 2017, 10:50:19 am

Title: Communicating with HID device
Post by: yefimg on January 24, 2017, 10:50:19 am
Hello,
I am trying to communicate with HID device. I found yours Generic_HID_50 sample for vb.net. Is there a way in your sample to send a specific string to the device and analyze the response?
Thank You very much.
Yefim
Title: Re: Communicating with HID device
Post by: Jan Axelson on January 24, 2017, 01:14:31 pm
In the project, look at the routine ExchangeInputAndOutputReports.

You will need to modify the project to fill outputReportBuffer with the data you want to send and to display or process the contents of inputReportBuffer as needed.

You will also need to convert your strings to and from byte arrays.

Be aware that all HID data travels in reports, which have defined lengths.