felis / USB_Host_Shield_2.0

Revision 2.0 of USB Host Library for Arduino.
https://chome.nerpa.tech
1.79k stars 780 forks source link

My mouse detected as a keypad on USBHID_desc #825

Open willtanoe opened 2 weeks ago

willtanoe commented 2 weeks ago

i have 2 mouse, logitech and lamzu the logitech one works well with usb host shield because USBHID_desc reports it as a mouse. but on my other mouse report says it's a keypad.

like this Start 0000: 05 01 09 06 A1 01 05 08 19 01 29 03 15 00 25 01 0010: 75 01 95 03 91 02 95 05 91 01 05 07 19 E0 29 E7 0020: 95 08 81 02 75 08 95 01 81 01 05 07 19 00 2A FF 0030: 00 26 FF 00 95 06 81 00 C0 Usage Page Gen Desktop Ctrls(01) Usage Keypad Collection Application Usage Page LEDs(08) Usage Min(01) Usage Max(03) Logical Min(00) Logical Max(01) Report Size(01) Report Count(03) Output(00000010) Report Count(05) Output(00000001) Usage Page Kbrd/Keypad(07) Usage Min(E0) Usage Max(E7) Report Count(08) Input(00000010) Report Size(08) Report Count(01) Input(00000001) Usage Page Kbrd/Keypad(07) Usage Min(00) Usage Max(FF00) Logical Max(FF00) Report Count(06) Input(00000000) End Collection

i wonder how i interpret that mouse if the usbhid_desc report it as a keypad, or is there a reference for me to make a custom interpreter if the problem is from my other mouse?

Jtonna commented 1 week ago

this is because the mouse reports multiple HID devices, the one thats being selected by default is device 0 and your device reports the first device which is 0 as the keyboard. your mouse is likely reported as a sequential HID device.

im running into this same thing with the Pulsar X2A and currently researching how to select the proper HID and or interface.

If youre interested in debugging check out Device Monitoring Studio they let you debug and see all the devices and the data transmitted when connected directly to your windows PC.

ping me in a few days and ill report back with a solution that worked for me if i find one,