Page 1 of 1

Arduino Micro Help

PostPosted: Tue Mar 24, 2020 5:05 pm
by SaintLucifer
Hello Everyone.

I have a USB button box for sim racing. Actually I have two. The one I can't get working with my Titan is configured as a keyboard. It's recognized as HID:K, but the buttons do nothing. Is there any advice on what I can do? I'll post my descriptor below.

One more thing, I can only get 13 buttons to recognize the HID:G device, how can I map all 32 buttons.

Thanks!

[USB DESCRIPTOR]
12 01 00 02 EF 02 01 40 41 23 37 80 00 01 01 02 03 01 09 02 64 00 03 01 00 A0 FA 08 0B 00 02 02 02 00 00 09 04 00 00 01 02 02 00 00 05 24 00 10 01 05 24 01 01 01 04 24 02 06 05 24 06 00 01 07 05 81 03 10 00 40 09 04 01 00 02 0A 00 00 00 07 05 02 02 40 00 00 07 05 83 02 40 00 00 09 04 02 00 01 03 00 00 00 09 21 01 01 00 01 22 2F 00 07 05 84 03 40 00 01

[STRING 1 DESCRIPTOR]
00 00 00 02 00 00 02 01 80 06 03 01 04 09 00 18
18 03 41 00 72 00 64 00 75 00 69 00 6E 00 6F 00 20 00 4C 00 4C 00 43 00

[STRING 2 DESCRIPTOR]
00 00 00 02 00 00 02 01 80 06 03 02 04 09 00 1C
1C 03 41 00 72 00 64 00 75 00 69 00 6E 00 6F 00 20 00 4D 00 69 00 63 00 72 00 6F 00

[STRING 3 DESCRIPTOR]
00 00 00 02 00 00 02 01 80 06 03 03 04 09 00 0C
0C 03 48 00 49 00 44 00 50 00 43 00

[INTERFACE 2 HID DESCRIPTOR]
00 00 00 02 00 00 02 01 81 06 22 00 00 02 00 2F
05 01 09 06 A1 01 85 02 05 07 19 E0 29 E7 15 00 25 01 75 01 95 08 81 02 95 01 75 08 81 03 95 06 75 08 15 00 25 73 05 07 19 00 29 73 81 00 C0

Re: Arduino Micro Help

PostPosted: Wed Mar 25, 2020 10:11 am
by J2Kbr
SaintLucifer wrote:The one I can't get working with my Titan is configured as a keyboard. It's recognized as HID:K, but the buttons do nothing. Is there any advice on what I can do? I'll post my descriptor below.

The descriptor looks good and should work with the Titan Two. Please note only few keys have default mapping, is is needed configure an input translator or script.

There is an example script available for download which prints the keycode for any pressed key, you can use it to test your keyboard:

https://www.consoletuner.com/greslib/?w97

Re: Arduino Micro Help

PostPosted: Thu Mar 26, 2020 2:43 pm
by SaintLucifer
Thanks J2kbr!!

I used the script to get the button key codes. The problem is that they appear as two character codes instead of the actual keys (1E,1F, 12, etc). I'm struggling to understand how to map these buttons to a controller. Any thoughts?

Also, after lots of tinkering with the HID Gpad device, there are 8 buttons I can't make work. These button boxes have 32 buttons, but anything above 21 seems unusable. Any tricks to making a 32 button gamepad work?

Re: Arduino Micro Help

PostPosted: Thu Mar 26, 2020 3:09 pm
by Scachi
For a list of keycode -> keynames:
https://www.consoletuner.com/wiki/index ... yboard_gph
example: (0x)1E is KEY_1