nRF51 SDK
|
Frame format encoding of the BLE_GAP_EVT_DISCONNECTED packet.
Event ID = 0x11 for BLE_GAP_EVT_DISCONNECTED.
All BLE Events, ble_evt_t, are encoded with the header ble_evt_hdr_t first, containing only the 'Event ID', followed by the event. The 'Event Length' will not be encoded as the size of the event could be of different sizes depending on decoder architecture.
The BLE GAP event contains a connection handle, and for the BLE GAP Disconnected event, the ble_gap_evt_disconnected_t is encoded after connection handle as seen in Figure 1.
The order of the encoding is:
- 2 bytes: | Connection Handle | |
- 7 bytes: | ble_gap_addr_t | Peer Address (See Figure 3 for details on encoding) |
- 1 byte: | Reason, Bluetooth status codes |