Thank you so much for this reply!
Let me point out some follow up subjects that came up.
1. I tried this code snippet inside the receiveAndProcessMouseHIDReport() function, in order to log every mouse event.
Even with this, I still get nothing when i scroll up and down. No output in serial. Is this to be expected?
2. As for the issue of performing a HID request beforehand..
I am actually using two different libraries:
PIO-USB → To act as a USB host and talk to the mouse.
Adafruit TinyUSB Arduino core → Which is used to act as a USB device, emulating a keyboard or mouse to the PC.
Will I be able to perform a HID request with PIO-USB? Since The TinyUSB is used for a different purpose.
ChatGPT told me this:
-Can PIO-USB retrieve HID descriptors?
3. Complicating things even further, I am actually using a USB hub to connect both a keyboard and a mouse to the pico's PIO USB. Does this complicate things even further for a HID request but only for the mouse?
Thank you very much!
Let me point out some follow up subjects that came up.
1. I tried this code snippet inside the receiveAndProcessMouseHIDReport() function, in order to log every mouse event.
Code:
// Debug output to inspect the raw report Serial.print("Mouse report (len = "); Serial.print(len); Serial.print("): "); for (uint8_t i = 0; i < len; i++) { if (report[i] < 0x10) Serial.print("0x0"); else Serial.print("0x"); Serial.print(report[i], HEX); Serial.print(" "); } Serial.println();2. As for the issue of performing a HID request beforehand..
I am actually using two different libraries:
PIO-USB → To act as a USB host and talk to the mouse.
Adafruit TinyUSB Arduino core → Which is used to act as a USB device, emulating a keyboard or mouse to the PC.
Will I be able to perform a HID request with PIO-USB? Since The TinyUSB is used for a different purpose.
ChatGPT told me this:
-Can PIO-USB retrieve HID descriptors?
What's your take on this?-No, not directly.
PIO-USB is a very low-level, minimal USB host implementation. It doesn't include HID class parsing or descriptor handling logic out of the box. You’d need to implement:
The GET_DESCRIPTOR control transfer for HID (type 0x22),
Descriptor parsing logic manually.
So you'd have to code that yourself if you stay on PIO-USB.
3. Complicating things even further, I am actually using a USB hub to connect both a keyboard and a mouse to the pico's PIO USB. Does this complicate things even further for a HID request but only for the mouse?
Thank you very much!
Statistics: Posted by nikolakos — Sun May 04, 2025 8:01 pm