-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't get it working with a CP2112 from SiLabs #33
Comments
@micjoc00, your device HID descriptor has non consistent usage ids, the Windows HID descriptor parser is kind of picky about value arrays, and looks like the Silicon Labs took a shortcut trying to simplify the descriptor. Anyway... by default, Actually here, everything is usage id '1', even for some items that are not value arrays, like you mentioned as in feature report 3 (report_count=1), which doesn't even follow the AN495 specification that states that there are actually 2 bytes on it, is likely windows matches the wrong capabilities due the id/page match but different report count field: result, the usage in report 3 is not a value array as reported in report 5. If this is about something you can provide technical feedback, try suggesting using consistent (separate values, specially dedicated ones for different fields not actually only for full reports) usage IDs. This would avoid the "byte and offset" specification at all, the HID descriptor would provide the right schema for how to access and find specific fields. This is the purpose of having standard usage pages, and that's why your USB HID button controls for volume just work, regardless of the report id a device would use or the actual byte and bit offset for button toggles. Anyway, just use raw reports to avoid the broken device descriptor Windows can't cope with. Try calling |
I suspected that the device is the cause of this, but i don't have enough knowledge about the HID descriptors. I will try to give feedback to SiLabs for future devices. Sadly the firmware is programmed by the vendor and cannot be changed by the user. I will have to live with it. I already tried to specify the |
Fixing do_process_raw_reports parameter, this allows to read reports in a totally transparent way.
Hi @rene-aguirre, it's working perfectly now. Thank you! |
I'm trying to get the CP2112 (I2C and GPIO interface chip) from SiLabs working. The HID interface is documented here: http://www.silabs.com/Support%20Documents/TechnicalDocs/AN495.pdf Here is the output of the show_hids.py example: show_hids.txt My environment is Win7(64-bit) and python 3.4.4 (32-bit).
I already got the LEDs on the board blinking, but I'm running into problems when the HidP_GetUsageValueArray function is called in getting a report:
The interesting thing is that it is working for report_id 0x03, but not for report_id 0x05. If I comment out the section where HidP_GetUsageValueArray is called, it works.
Here is the code I'm using:
The text was updated successfully, but these errors were encountered: