Author Topic: error 997 on reading and writing the report  (Read 11917 times)

sealion

  • Member
  • ***
  • Posts: 2
error 997 on reading and writing the report
« on: September 02, 2011, 09:09:32 am »
Hi Jan,

My USB HID device enumerates. I got its handle on the host side, validated VID & PIID, but I do have problems reading and writing a report to my device. I am getting error 997 on Windows and I do not think it is a problem on the host side. I wrote it using windows overlapped IO.
I also tested it with AnyHID tool from Trace Systems and the tool registers the same result when it tries to read my report. Any clues..?

The report descriptor is currently simplified to one id only with several possible inputs.

Appreciate your response.

Thank you.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: error 997 on reading and writing the report
« Reply #1 on: September 02, 2011, 09:19:58 am »
As you may know, error 997 is "overlapped I/O operation is in progress".

An attempt to read a report returns when the device has sent at least one report of the expected size.

Use whatever debugging tools you have to verify that the interrupt IN endpoint is sending reports. The number of bytes sent should match the number of bytes defined for the report in the report descriptor plus if using report IDs, one byte for the report ID.

If the HID has no more than a single report of each type, use the default report ID of zero and don't send the report ID on the bus.

Jan