3

I've created a custom HID gamepad using an STM32L151C8T6 (probably irrelevant) and my computer recognizes the device using the gamepad tester application built into Windows 10.

Built-in Gamepad tester

I can verify the functionality by moving the joystick around and pushing a button and the application will display the joystick position and button indications. However, when I go to use this gamepad in a game, every game I try will not recognize it (not even Steam).

In order to rule out a couple of things I am posting what I believe to be important information:

  • USB Report Descriptor

         0x05, 0x01,     //USAGE_PAGE (Generic Desktop)
         0x09, 0x05,     //USAGE (Gamepad)
         0xA1, 0x01,     //COLLECTION (Application)
         0x09, 0x04,     // USAGE (Pointer)
         0xA1, 0x00,     // COLLECTION (Physical)
         0x09, 0x30,     // USAGE (X)
         0x09, 0x31,     // USAGE (Y)
         0x16, 0x01, 0x80,   // LOGICAL_MINIMUM (-32767)
         0x26, 0xFF, 0x7F,   // LOGICAL_MAXIMUM (32767)
         0x36, 0x01, 0x80,   // PHYSICAL_MINIMUM (-32767)
         0x46, 0xFF, 0x7F,   // PHYSICAL_MAXIMUM (32767)
         0x75, 0x10,     // REPORT_SIZE (16)
         0x95, 0x02,     // REPORT_COUNT (2)
         0x81, 0x02,     // INPUT (Data,Var,Abs)
         0xC0,           // END_COLLECTION
         0x05, 0x09,     // USAGE_PAGE (Button)
         0x19, 0x01,     // USAGE_MINIMUM (Button 1)
         0x29, 0x06,     // USAGE_MAXIMUM (Button 6)
         0x15, 0x00,     // LOGICAL_MINIMUM (0)
         0x25, 0x01,     // LOGICAL_MAXIMUM (1)
         0x75, 0x01,     // REPORT_SIZE (1)
         0x95, 0x06,     // REPORT_COUNT (6)
         0x81, 0x02,     // INPUT (Data,Var,Abs)
         0x95, 0x02,     // REPORT_COUNT (2)
         0x81, 0x03,     // INPUT (Constant,Var,Abs)
         0xC0    /*     END_COLLECTION                */
    
  • USB Configuration

    USB Configuration

I am hoping that there is a simple answer to my problem, such as Steam and games only recognizing certain controllers (i.e. Xbox 360, Xbox 1, PS4...).

Perhaps there is an application I could use to bridge my controller to a virtual gamepad that could be used as a workaround?

Perhaps my USB HID Report Descriptor is faulty in some way that prevents it from being used in-game?

I would be more than happy to share details with my project, please ask away. Thanks a million!

GitHub Repository: GMK-Lite

Edit: This is not a usage question. proof

  • possible workaround http://andersmalmgren.github.io/FreePIE/ – jsotola Feb 27 '21 at 20:06
  • 1
    You might want to check that your descriptors are interpreted the way you want. I like to use this: https://www.thesycon.de/eng/usb_descriptordumper.shtml – Dzarda Feb 27 '21 at 20:20
  • 1
    You can also compare with another HID controller (Don't trust ST) – Dzarda Feb 27 '21 at 20:22
  • 4
    OP is creating an electronic device from scratch and someone voted to close this as a usage question. What happened to the site... – Passerby Feb 27 '21 at 22:25
  • 1
    Only thing I see weird is the usage pointer. But I see the same descriptor in microchip example. Are you sure the games you are trying allow usb-hid controllers and not expecting specific 360 controllers? – Passerby Feb 27 '21 at 22:35
  • 2
    And yes there is overlay software that you can use but that normally maps usb hid controllers to keycodes for games that don't have games support but do have keyboard support. – Passerby Feb 27 '21 at 22:37
  • I've used applications like [AntiMicro](https://github.com/AntiMicro/antimicro) to "mask" the controller with no avail. I need to try the descriptor dump as suggested by Dzarda. Will update soon before looking into if the games only allow specific controllers. – Tanner Hollis Mar 01 '21 at 13:18

0 Answers0