Smart Remote 3 nRF52 v1.2
HID report descriptor

This section describes how the Human Interface Device (HID) interfaces are configured. It is assumed that the reader is familiar with USB HID and the Bluetooth low energy equivalent - HID over GATT (HoG). For more information about USB HID, visit USB.org's developer section. To learn more about the HID over GATT Profile, see the Bluetooth SIG's adopted specifications.

HID over GATT (HoG) descriptor

Smart Remote has one HoG Service used for audio, touchpad, keyboard, and gyro operations. The HID descriptor, also referred to as Report Map, is detailed below and can be configured in the file m_coms.c.

#if CONFIG_AUDIO_ENABLED && CONFIG_AUDIO_HID_ENABLED
/*
Audio
*/
0x06, 0x00, 0xFF, // Usage Page (Vendor Defined Page 1)
0x09, AUDIO_CONFIG_ID, // Usage (Vendor Usage)
0xA1, 0x01, // Collection (Application)
0x85, AUDIO_IN_REP_ID, // Report ID (AUDIO_IN_REP_ID)
0x15, 0x00, // Logical Minimum (0)
0x25, 0xFF, // Logical Maximum (255)
0x75, AUDIO_IN_REP_SIZE, // Report Size (AUDIO_IN_REP_SIZE)
0x95, AUDIO_IN_REP_COUNT, // Report Count (AUDIO_IN_REP_COUNT)
0x09, 0x00, // Usage (Vendor Usage 1)
0x81, 0x02, // Input (Data, Var, Abs)
#if (AUDIO_IN_REP_ID != AUDIO_OUT_REP_ID)
0x85, AUDIO_OUT_REP_ID, // Report ID (AUDIO_OUT_REP_ID)
#endif
0x95, AUDIO_OUT_REP_COUNT, // Report Count (AUDIO_OUT_REP_COUNT)
0x75, AUDIO_OUT_REP_SIZE, // Report Size (AUDIO_OUT_REP_SIZE)
0x09, 0x00, // Usage (Vendor Usage 1)
0x91, 0x02, // Output (Data, Var, Abs)
0xC0, // End Collection
#endif /* CONFIG_AUDIO_ENABLED && CONFIG_AUDIO_HID_ENABLED */
/*
Keyboard
*/
0x05, 0x01, // Usage Page (Generic Desktop)
0x09, 0x06, // Usage (Keyboard)
0xA1, 0x01, // Collection (Application)
0x85, KEYBOARD_IN_REP_ID, // Report ID (KEYBOARD_IN_REP_ID)
0x75, KEYBOARD_IN_REP_SIZE, // Report Size (KEYBOARD_IN_REP_SIZE)
0x95, KEYBOARD_IN_REP_COUNT, // Report Count (KEYBOARD_IN_REP_COUNT)
0x15, 0x00, // Logical Minimum (0)
0x25, 0xFF, // Logical Maximum (255)
0x05, 0x07, // Usage Page (Keyboard)
0x19, 0x00, // Usage Minimum (0)
0x29, 0xFF, // Usage Maximum (255)
0x81, 0x00, // Input (Data, Ary, Abs)
0xC0, // End Collection
/*
Consumer Control
*/
0x05, 0x0C, // Usage Page (Consumer Devices)
0x09, 0x01, // Usage (Consumer Control)
0xA1, 0x01, // Collection (Application)
0x85, CONSUMER_CTRL_IN_REP_ID, // Report ID (CONSUMER_CTRL_IN_REP_ID)
0x75, CONSUMER_CTRL_IN_REP_SIZE,// Report Size (CONSUMER_CTRL_IN_REP_SIZE)
0x95, CONSUMER_CTRL_IN_REP_COUNT,// Report Count (CONSUMER_CTRL_IN_REP_COUNT)
0x15, 0x00, // Logical Minimum (0)
0x26, 0xFF, 0x07, // Logical Maximum (2047)
0x19, 0x00, // Usage Minimum (0)
0x2A, 0xFF, 0x07, // Usage Maximum (2047)
0x81, 0x00, // Input (Data, Ary, Abs)
0xC0, // End Collection
/*
Mouse
*/
0x05, 0x01, // Usage Page (Generic Desktop)
0x09, 0x02, // Usage (Mouse)
0xA1, 0x01, // Collection (Application)
0x09, 0x01, // Usage (Pointer)
0xA1, 0x00, // Collection (Physical)
0x85, MOUSE_BTN_IN_REP_ID, // Report ID (MOUSE_BTN_IN_REP_ID)
0x75, MOUSE_BTN_IN_REP_SIZE, // Report Size (MOUSE_BTN_IN_REP_SIZE)
0x95, MOUSE_BTN_IN_REP_COUNT, // Report Count (MOUSE_BTN_IN_REP_COUNT)
0x15, 0x00, // Logical Minimum (0)
0x25, 0x01, // Logical Maximum (1)
0x05, 0x09, // Usage Page (Button)
0x19, 0x01, // Usage Minimum (Button 1)
0x29, 0x08, // Usage Maximum (Button 8)
0x81, 0x02, // Input (Data, Var, Abs)
0xC0, // End Collection
0xA1, 0x00, // Collection (Physical)
0x85, MOUSE_XY_IN_REP_ID, // Report ID (MOUSE_XY_IN_REP_ID)
0x75, MOUSE_XY_IN_REP_SIZE, // Report Size (MOUSE_XY_IN_REP_SIZE)
0x95, MOUSE_XY_IN_REP_COUNT, // Report Count (MOUSE_XY_IN_REP_COUNT)
0x16, 0x01, 0xF8, // Logical Minimum (-2047)
0x26, 0xFF, 0x07, // Logical Maximum (2047)
0x05, 0x01, // Usage Page (Generic Desktop)
0x09, 0x30, // Usage (X)
0x09, 0x31, // Usage (Y)
0x81, 0x06, // Input (Data, Var, Rel)
0xC0, // End Collection
0xA1, 0x00, // Collection (Physical)
0x85, MOUSE_WP_IN_REP_ID, // Report ID (MOUSE_WP_IN_REP_ID)
0x75, MOUSE_WP_IN_REP_SIZE, // Report Size (MOUSE_WP_IN_REP_SIZE)
0x95, 0x01, // Report Count (1)
0x15, 0x81, // Logical Minimum (-127)
0x25, 0x7F, // Logical Maximum (127)
0x05, 0x01, // Usage Page (Generic Desktop)
0x09, 0x38, // Usage (Wheel)
0x81, 0x06, // Input (Data, Var, Rel)
0x75, MOUSE_WP_IN_REP_SIZE, // Report Size (MOUSE_WP_IN_REP_SIZE)
0x95, 0x01, // Report Count (1)
0x15, 0x81, // Logical Minimum (-127)
0x25, 0x7F, // Logical Maximum (127)
0x05, 0x0C, // Usage Page (Consumer Devices)
0x0A, 0x38, 0x02, // Usage (AC Pan)
0x81, 0x06, // Input (Data, Var, Rel)
0xC0, // End Collection
0xC0, // End Collection


HID Reports

The above descriptors specify the following reports.

Mouse X/Y Input Report
ByteBit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
0X movement delta [0:7]
1Y movement delta [0:3]X movement delta [8:11]
2Y movement delta [4:11]



Mouse Button Input Report
ByteBit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
0Button 8Button 7Button 6Button 5Button 4Button 3Button 2

Button 1



Mouse Wheel/Pan Input Report
ByteBit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
0Wheel
1AC Pan



Consumer Control Input Report
ByteBit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
0Key code [0:7]
1Key code [0:3]Key code [8:11]
2Key code [4:11]



Keyboard Input Report
ByteBit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
0Key code
1Key code
2Key code



Audio data report
ByteBit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
0Encoded audio
1Encoded audio
2Encoded audio
3Encoded audio
4Encoded audio
5Encoded audio
6Encoded audio
7Encoded audio
8Encoded audio
9Encoded audio
10Encoded audio
11Encoded audio
12Encoded audio
13Encoded audio
14Encoded audio
15Encoded audio
16Encoded audio
17Encoded audio
18Encoded audio
19Encoded audio
...Encoded audio


Note
The audio report can be larger than 20 bytes if a large MTU is used.


Audio command report
ByteBit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
0Command value

Documentation feedback | Developer Zone | Subscribe | Updated