PORTS Forum

Ports and Interfaces => USB => Topic started by: Renate on January 06, 2022, 03:56:25 pm

Title: Windows gives GetLastError() of 0x490, Android does fine
Post by: Renate 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.
Title: Re: Windows gives GetLastError() of 0x490, Android does fine
Post by: Renate 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.
Title: Re: Windows gives GetLastError() of 0x490, Android does fine
Post by: Jan Axelson on January 20, 2022, 10:08:04 am
Thanks for reporting what you found!