Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

HID over GATT - 2 byte consumer control

the following report map is working when i try to increase volume on windows system (send 1 byte == 0xe9)

0x05, 0x0c,                     // USAGE_PAGE (Consumer Devices)
0x09, 0x01,                     // USAGE (Consumer Control)
0xa1, 0x01,                     // COLLECTION (Application)
0x85, 0x02,                     //   REPORT_ID (2)
0x75, 0x08,                     //   REPORT_SIZE (8)
0x95, 0x01,                     //   REPORT_COUNT (1)
0x15, 0x00,                     //   LOGICAL_MINIMUM (0x00)
0x25, 0xff,                     //   LOGICAL_MAXIMUM (0xff)
0x19, 0x00,                     //   USAGE_MINIMUM (0x0)
0x29, 0xff,                     //   USAGE_MAXIMUM (0xff)
0x81, 0x00,                     //   INPUT (Data,Array,Abs)
0xc0,                           // END_COLLECTION

i try to change the report map to 2 bytes and it doesn't work anymore. already tried switching byte 0 and byte 1 just in case it might be an endian issue, but both are not working.

0x05, 0x0c,                     // USAGE_PAGE (Consumer Devices)
0x09, 0x01,                     // USAGE (Consumer Control)
0xa1, 0x01,                     // COLLECTION (Application)
0x85, 0x02,                     //   REPORT_ID (2)
0x75, 0x10,                     //   REPORT_SIZE (16)
0x95, 0x01,                     //   REPORT_COUNT (1)
0x15, 0x00,                     //   LOGICAL_MINIMUM (0x0)
0x26, 0xff, 0xff,               //   LOGICAL_MAXIMUM (0xffff)
0x19, 0x00,                     //   USAGE_MINIMUM (0x0)
0x2a, 0xff, 0xff,               //   USAGE_MAXIMUM (0xffff)
0x81, 0x00,                     //   INPUT (Data,Array,Abs)
0xc0, // END_COLLECTION

can anyone say what's wrong here? thanks! tried both on windows and andriod

  • Hi

    When I use the HID Descriptor Tool to replicate your descriptor I notice that Logical Maximum 0xFFFF is decoded like this:

    0x27, 0xFF, 0xFF, 0x00, 0x00, // LOGICAL_MAXIMUM (65535)

    Essentially any value larger than 0x7FFF will be stored in 4 bytes rather than 2. 

    I expect the same goes for USAGE_MAXIMUM, but the tool doesn't let me specify this manually. You could try to define that like this:

    0x2B, 0xFF, 0xFF, 0x00, 0x00,

    Best regards
    Torbjørn

Related