Keypad Service

This is a design overview the the proprietary keypad service.

Overview

The keypad service allows direct integration with the keypad button presses.

GATT Characteristics

The following are the proprietary service characteristcs for this service.

  • Nexus Base UUID: 9A9B0000-B1EA-49BE-A682-634D01A3CC09
  • Service UUID: 0x0200
  • Characteristic UUID: 0x0201 (Notification Enabled)

Characteristic Model

The keypad characteristic returns a single byte representing the following data model. The individual bits within the byte have been broken into sections. Each section provides information about the button press action.

  • Bits 0-0: Action (Short or Long Press)
  • Bits 1-4: Key Identifier (Buttons 1 - 12)
  • Bits 5-7: Sequence Reference (Currently Unvailable)
typedef union {
    uint8_t Byte;
    struct PACKED {
        uint8_t ACTION :1; /**< 0=Short, 1=Long > */
        uint8_t KEY    :4; /**< Identify Key Press */
        uint8_t SEQ    :3; /**< Sequenc Count */
    } Bits;
} m_ble_kps_report_t;

Button Mapping

Key Number Key Binary Button
1 0001 1
2 0010 2
3 0011 3
4 0100 4
5 0101 5
6 0110 6
7 0111 7
8 1000 8
9 1001 9
10 1010 LF
11 1011 10
12 1100 RF

Example 1

Byte: 0x06

  • Action: Short Press
  • Button: Button 3
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
0 0 0 0 0 1 1 0

Example 2

Byte: 0x19

  • Action: Long Press
  • Button: Right Function Button
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
0 0 0 1 1 0 0 1
Last modified October 23, 2024: V2 Initial Check-in (93e819c)