HID issue with multiple report id
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-01-13 8:59 AM
Hi Everyone,
I am currently using STM32F103 for making a usb hid which acts as both, a keyboard and a gamepad.
Please take a look at the descriptor and code below.
Both of these work properly when used individually but when I combine them both and add report ID no input is detected. In my main function I detect the key press and then assign the data in buttons and keys.
uint8_t id;
uint16_t buttons;
uint16_t x,y,z,rx;
}usbData;
uint8_t reportId;
uint32_t keys;
}m_keyboardData;
- Labels:
-
STM32F1 Series
-
USB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-01-13 10:13 AM
This should work if done properly. There are online tools to display and validate HID report descriptors, try these. Try also chatgpt & Co. They boast so much recently, take them to a challenge ))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-01-13 7:27 PM
Thanks for the reply Pavel.
I tried searching for HID validators online but could not find any.
If you know any or have their links can you please share them with me?
Also tried chatgpt but it didn't help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-01-14 5:38 AM - edited 2024-01-14 5:44 AM
Let me google this for you ))
https://eleccelerator.com/usbdescreqparser/
https://www.usb.org/document-library/hid-descriptor-tool
Now, the AI. Let's take the new free Windows Copilot:
Me: - Dear Copilot, I want to ask how to find online parser or USB HID report descriptor but do not know how to ask. Please generate me a prompt.
Copilot:
"A possible prompt for your question is:
How can I use an online tool to parse the binary data of a USB HID report descriptor and convert it into a human-readable format?
You can also try searching the web for some keywords related to your topic, such as “USB HID report descriptor parser” or “USB HID report descriptor tool”. I found some relevant results for you:
- USB Descriptor and Request Parser - Eleccelerator, a web page that can parse USB standard descriptors, USB standard requests, and USB HID report descriptors using the official documents from USB.org. It also provides sample datasets and code examples for different devices.
- How to parse hid report descriptor? - Stack Overflow, a question and answer site where a user asked a similar question and received a detailed answer with links to the official specifications and documents for HID report descriptors.
- HID Descriptor Tool | USB-IF, a downloadable tool that allows you to create, edit and validate HID report descriptors. It supports a variety of output formats and vendor defined pages.
- HID report descriptor I/O library and conversion tool - GitHub, a repository that contains a library and a command-line tool for reading, writing, and converting HID report descriptors. It supports XML, NATIVE, and SPEC formats."
