Author Topic: Windows gives GetLastError() of 0x490, Android does fine  (Read 11719 times)

Renate

  • Frequent Contributor
  • ****
  • Posts: 97
Windows gives GetLastError() of 0x490, Android does fine
« on: January 06, 2022, 03:56:25 pm »
I'm beating my head against another wacky problem. It's a simple USB HID with a one byte report. I can see that it's coming through fine on my Beagle. I push a button, I can see a report. When I try to read this report in Windows (10) either synchronously or OVERLAPPED I get GetLastError() of 0x490 (1168), "Element not found". On Android it works functionally 100% fine.

No, I'm not getting the old 0x57 for reading the wrong report size.

Any ideas? I've never even heard of 0x490.

Renate

  • Frequent Contributor
  • ****
  • Posts: 97
Re: Windows gives GetLastError() of 0x490, Android does fine
« Reply #1 on: January 06, 2022, 07:19:56 pm »
Solved it.

Windows likes to snarf everything as a systems input device.
I was using this as HID, UsagePage=0x20 Sensors, Usage=0x01 Sensors for my Collection.
It looked good enough for Windows to peg as being about the same as a system keyboard and it snarfed it.
I changed Usage to 0x26 Voltage (even though it isn't).
Still, you can't beat "Element not found" as an ambiguous error description.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Windows gives GetLastError() of 0x490, Android does fine
« Reply #2 on: January 20, 2022, 10:08:04 am »
Thanks for reporting what you found!