Need help with combining mouse, keyboard and media into one HID.

Hello,
I have combine mouse with keyboard HID_12 and keyboard with media HID_23,
but not able to combine mouse with media and all 3 together!
Here are my HID_12  and HID_23:

HID_12  
0x05, 0x01, /* USAGE_PAGE (Generic Desktop) */
0x09, 0x02, /* USAGE (Mouse) */
0xa1, 0x01, /* COLLECTION (Application) */
0x85, MOUSE_REPORT_ID, /* Report ID (1) */
0x09, 0x01, /* USAGE (Pointer) */
0xa1, 0x00, /* COLLECTION (Physical) */
0x05, 0x09, /* USAGE_PAGE (Button) */
0x19, 0x01, /* USAGE_MINIMUM (Button 1) */
0x29, 0x03, /* USAGE_MAXIMUM (Button 3) */
0x15, 0x00, /* LOGICAL_MINIMUM (0) */
0x25, 0x01, /* LOGICAL_MAXIMUM (1) */
0x95, 0x03, /* REPORT_COUNT (3) */
0x75, 0x01, /* REPORT_SIZE (1) */
0x81, 0x02, /* INPUT (Data,Var,Abs) */
0x95, 0x01, /* REPORT_COUNT (1) */
0x75, 0x05, /* REPORT_SIZE (5) */
0x81, 0x03, /* INPUT (Cnst,Var,Abs) */
0x05, 0x01, /* USAGE_PAGE (Generic Desktop) */
0x09, 0x30, /* USAGE (X) */
0x09, 0x31, /* USAGE (Y) */
0x09, 0x38, /* USAGE (Wheel) */
0x15, 0x81, /* LOGICAL_MINIMUM (-127) */
0x25, 0x7f, /* LOGICAL_MAXIMUM (127) */
0x75, 0x08, /* REPORT_SIZE (8) */
0x95, 0x03, /* REPORT_COUNT (3) */
0x81, 0x06, /* INPUT (Data,Var,Rel) */
0xc0, /* END_COLLECTION (Physical) */
0xc0, /* END_COLLECTION (Application) */

0x09, 0x06, /* USAGE (Keyboard) */
0xa1, 0x01, /* COLLECTION (Application) */
0x85, KEYBOARD_REPORT_ID, /* REPORT ID (0x02) */
0x05, 0x07, /* USAGE_PAGE (Keyboard) */
0xa1, 0x01, /* COLLECTION (Application) */
0x95, 0x08, /* REPORT_COUNT (8) */
0x75, 0x08, /* REPORT_SIZE (8) */
0x15, 0x00, /* LOGICAL_MINIMUM (0) */
0x25, 0xff, /* LOGICAL_MAXIMUM (255) */
0x19, 0x00, /* USAGE_MINIMUM (0) */
0x29, 0xff, /* USAGE_MAXIMUM (255) */
0x81, 0x00, /* INPUT (Data,Var,Abs) */
0xc0, /* END_COLLECTION (Application) */
0xc0, /* END_COLLECTION (Application) */

HID_23
0x05, 0x01, /* USAGE_PAGE (Generic Desktop)*/
0x09, 0x06, /* USAGE (Keyboard) */
0xa1, 0x01, /* COLLECTION (Application) */
0x85, KEYBOARD_REPORT_ID, /* REPORT ID (0x02) */
0x05, 0x07, /* USAGE_PAGE (Keyboard) */
0xa1, 0x01, /* COLLECTION (Application) */
0x95, 0x08, /* REPORT_COUNT (8) */
0x75, 0x08, /* REPORT_SIZE (8) */
0x15, 0x00, /* LOGICAL_MINIMUM (0) */
0x25, 0xff, /* LOGICAL_MAXIMUM (255) */
0x19, 0x00, /* USAGE_MINIMUM (0) */
0x29, 0xff, /* USAGE_MAXIMUM (255) */
0x81, 0x00, /* INPUT (Data,Var,Abs) */
0xc0, /* END_COLLECTION (Application) */
0xc0, /* END_COLLECTION (Application) */

0x05, 0x0c, // USAGE_PAGE (Consumer Devices) // 3 - OK - PC Volume Down
0x09, 0x01, // USAGE (Consumer Control)
0xa1, 0x01, /* COLLECTION (Application) */
0x05, 0x0c, /* USAGE_PAGE (Consumer) */
0x09, 0x01, /* USAGE (Consumer Control) */
0xa1, 0x01, /* COLLECTION (Application) */
0x85, MEDIA_REPORT_ID, /* REPORT ID (0x03) */
0x95, 0x02, /* REPORT_COUNT (2) */
0x75, 0x10, /* REPORT_SIZE (16) */
0x15, 0x00, /* LOGICAL_MINIMUM (0) */
0x26, 0x9C, 0x02, /* LOGICAL_MAXIMUM (1) */
0x19, 0x00, /* USAGE_MINIMUM */
0x2A, 0x9C, 0x02, /* USAGE_MAXIMUM */
0x81, 0x00, /* INPUT (Data,Var,Abs) */
0xc0, /* END_COLLECTION (Application) */
0xc0, /* END_COLLECTION (Application) */

Parents
  • Thank you Håkon,

    1. I am using BLE_HID_selfie for keyboard and media and BLE_HID for mouse and keyboard.

    2. How to send all STM32wb55 my project to you?

    3. Not sure.

    4. After connecting to Bluetooth - after few second - it said - driver error!

  • Thank you Håkon,

    3. Yes The HID over GATT profile for Bluetooth USB HID specification

    I am going to use BL651, nrf52810, pca10040 development board with nRF5 SDK v14.1.0 for BLE - nRF desktop application. HID for usb do not depend on SDK or device. Here are reports for given mouse, keyboard and media report descriptors I am using: Can you help?

    typedef struct

    {

    uint8_t ReportID;

    uint8_t buttons;

    int8_t x;

    int8_t y;

    int8_t wheel;

    } mouse_report_t;

    //#ifdef ST_SELFIE

    /* Keybaord key data*/

    typedef struct

    {

    uint8_t ReportID;

    uint8_t Data_0;

    uint8_t Data_1;

    uint8_t Data_2;

    uint8_t Data_3;

    uint8_t Data_4;

    uint8_t Data_5;

    uint8_t Data_6;

    uint8_t Data_7;

    } keyboard_report_t;

    /* Multimedia key data*/

    typedef struct

    {

    uint8_t ReportID;

    uint8_t Data_0;

    uint8_t Data_1;

    uint8_t Data_2;

    uint8_t Data_3;

    } multimedia_report_t;

  • Hi,

     

    Based on your description, it is not easy to map which example specifically you are using in SDK v14.1, so I will assume one of the basic ones in the SDK.

    If you take one of the ble_app_hids samples, lets say ble_app_hids_mouse, there is a main.c::hids_init function that maps each report to a given HID over GATT input, output, or feature report.

    Each new descriptor that you add will need to be mapped to the corresponding p_input_report[index] (or p_output_report) to ensure that it is populated in the GATT database.

     

    When you have any issues, please provide any log output from the nrf side and a detailed description on what occurs on the central side.

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    Based on your description, it is not easy to map which example specifically you are using in SDK v14.1, so I will assume one of the basic ones in the SDK.

    If you take one of the ble_app_hids samples, lets say ble_app_hids_mouse, there is a main.c::hids_init function that maps each report to a given HID over GATT input, output, or feature report.

    Each new descriptor that you add will need to be mapped to the corresponding p_input_report[index] (or p_output_report) to ensure that it is populated in the GATT database.

     

    When you have any issues, please provide any log output from the nrf side and a detailed description on what occurs on the central side.

     

    Kind regards,

    Håkon

Children
No Data
Related