The Thunderboard Forum is no longer active. If you would like to post a question regarding Thunderboard Kits, please use the Bluetooth Forum.

This discussion and its replies are closed

Hi all,

 

Can anyone give me a point in the right direction for creating a HID game controller with the board?

 

 

James

 

  • Discussion Forums
  • Thunderboard Kits
Unanswered
  • Hi James,

    There are a few HID projects in the Thunderboard forum under this filtering.
    And there is another forum post about BGM111, i think it can serve as an example.

    Let me know if these were the answer to your question.

    Regards,
    Adam
    0
  • Hi Adam,

     

    Thanks for the pointer — I have managed to get the HID keyboard example working.

    I am having issues getting the correct GATT settings for a game controller.

     

    James

     

     

    0
  • Does anyone have any other example GATT files?

    I've taken the keyboard one and changed the report map to an example I found online — but after that, whilst it appears when looking for BLE devices it refuses to connect.

     

    0
  • So, I've managed to get the device recognised as a game controller — editing the hex report map inside the GATT configurator didn't work — but editing it in the xml file and then importing did work. 

    Still haven't managed to make it press any buttons yet — but that's a start.

    0
  • Hi all,

     

    I'm using this as my report map — but it refuses to show as a game controller.

     

    uint8_t bg_gattdb_data_attribute_field_22_data[25]={

     

        0x05, 0x01,                    // USAGE_PAGE (Generic Desktop)

        0x09, 0x05,                    // USAGE (Game Pad)

        0xa1, 0x01,                    // COLLECTION (Application)

        0x85, 0x03,                    //     REPORT_ID (3)

        0x05, 0x09,                    //     USAGE_PAGE (Button)

        0x19, 0x01,                    //     USAGE_MINIMUM (Button 1)

        0x29, 0x10,                    //     USAGE_MAXIMUM (Button 16)

        0x15, 0x00,                    //     LOGICAL_MINIMUM (0)

        0x25, 0x01,                    //     LOGICAL_MAXIMUM (1)

        0x95, 0x10,                    //     REPORT_COUNT (16)

        0x75, 0x01,                    //     REPORT_SIZE (1)

        0x81, 0x02,                    //     INPUT (Data,Var,Abs)

        0xc0,                          //   END_COLLECTION

    };

    0
  • The strange thing is that the computer doesn't appear to discover the correct characteristics for the HID service:

    22:57:38.0420: connected in underlying BLE layer.
    22:57:38.0440: discovered services: (
        "Device Information",
        "Human Interface Device",
        "1D14D6EE-FD63-4FA1-BFA4-8F47B42119F0",
        Battery
    )
    22:57:38.0450: discovered services: (
        "Device Information",
        "Human Interface Device",
        "1D14D6EE-FD63-4FA1-BFA4-8F47B42119F0",
        Battery
    )
    22:57:38.2700: discovered characteristics for service 1D14D6EE-FD63-4FA1-BFA4-8F47B42119F0: (
        "F7BF3564-FB6D-4E53-88A4-5E37E0326063"
    )
    22:57:38.2920: discovered characteristics for service 180F: (
        "Battery Level"
    )
    22:57:38.3150: discovered characteristics for service 180A: (
        "Manufacturer Name String",
        "Model Number String",
        "Serial Number String",
        "Hardware Revision String",
        "Firmware Revision String",
        "Software Revision String",
        "System ID",
        "PnP ID"
    )
    22:57:38.3160: state changed to 'Connected'.

     

    0