nRF51 SDK - S110 SoftDevice
|
Frame format encoding of the BLE_GAP_EVT_CONNECTED packet.
Event ID = 0x10 for BLE_GAP_EVT_CONNECTED.
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 Connected event, the ble_gap_evt_connected_t is encoded after connection handle as seen in Figure 1.
The order of the encoding is:
Length | Parameter | Value |
---|---|---|
2 bytes | Connection Handle | see ble_gap_evt_t::conn_handle |
7 bytes | Peer Address: ble_gap_addr_t | (See Figure 2 for details on encoding) |
1 byte | Bitfields: - IRK Index: 7 bits, - IRK Match: 1 bit | (See Figure 3 for details on encoding) |
8 bytes | GAP Connection Parameters: ble_gap_conn_params_t | (See Figure 4 for details on encoding) |
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:
Length | Parameter | Value |
---|---|---|
2 bytes | Connection Handle | see ble_gap_evt_t::conn_handle |
1 byte | Reason | see ble_gap_evt_disconnected_t::reason |
Frame format encoding of the BLE_GAP_EVT_CONN_PARAM_UPDATE packet.
Event ID = 0x12 for BLE_GAP_EVT_CONN_PARAM_UPDATE
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 Connect Parameter Update event, the ble_gap_evt_conn_param_update_t is encoded after connection handle as seen in Figure 1.
The order of the encoding is:
Length | Parameter | Value |
---|---|---|
2 bytes | Connection Handle | see ble_gap_evt_t::conn_handle |
8 bytes | GAP Connection Parameters ble_gap_conn_params_t | (See Figure 1 for details on encoding) |
Frame format encoding of the BLE_GAP_EVT_SEC_PARAMS_REQUEST packet.
Event ID = 0x13 for BLE_GAP_EVT_SEC_PARAMS_REQUEST
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 Security Parameters Request event, the ble_gap_evt_sec_params_request_t is encoded after connection handle as seen in Figure 1.
The Bond, MITM, IO Capabilities and OOB fields are all bitfields inside 1 byte as seen in Figure 2.
The order of the encoding is:
Length | Parameter | Value |
---|---|---|
2 bytes | Connection Handle | see ble_gap_evt_t::conn_handle |
2 bytes | Timeout | see ble_gap_sec_params_t::timeout |
1 byte | Bitfields: - Bond: 1 bit, - MITM: 1 bit, - IO Capabilities: 3 bits, - OOB: 1 bit | (See Figure 2 for details on encoding) |
1 byte | Minimum Keysize | see ble_gap_sec_params_t::min_key_size |
1 byte | Maximum Keysize | see ble_gap_sec_params_t::max_key_size |
Frame format encoding of the BLE_GAP_EVT_SEC_INFO_REQUEST packet.
Event ID = 0x14 for BLE_GAP_EVT_SEC_PARAMS_REQUEST
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 Security Info Request event, the ble_gap_evt_sec_info_request_t is encoded after connection handle as seen in Figure 1.
The "Encryption info present", "Identity info present", and "Signing info present" flags are all bitfields inside 1 byte as seen in Figure 2.
The order of the encoding is:
Length | Parameter | Value |
---|---|---|
2 bytes | Connection Handle | see ble_gap_evt_t::conn_handle |
1 byte | Address Type | see ble_gap_addr_t::addr_type |
6 bytes | Address | see ble_gap_addr_t::addr |
2 bytes | Encryption Diversifier | see ble_gap_evt_sec_info_request_t::div |
1 byte | Bitfields: - Encryption info: 1 bit, - Identity info: 1 bit, - Signing info: 1 bit | (See Figure 2 for details on encoding) |
Frame format encoding of the BLE_GAP_EVT_PASSKEY_DISPLAY packet.
Event ID = 0x15 for BLE_GAP_EVT_PASSKEY_DISPLAY.
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 Passkey display event, the ble_gap_evt_passkey_display_t is encoded after connection handle as seen in Figure 1.
The order of the encoding is:
Length | Parameter | Value |
---|---|---|
2 bytes | Connection Handle | see ble_gap_evt_t::conn_handle |
6 bytes | Passkey | see ble_gap_evt_passkey_display_t::passkey |
Frame format encoding of the BLE_GAP_EVT_AUTH_KEY_REQUEST packet.
Event ID = 0x16 for BLE_GAP_EVT_AUTH_KEY_REQUEST.
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 key request event, the ble_gap_evt_auth_key_request_t is encoded after connection handle as seen in Figure 1.
The order of the encoding is:
Length | Parameter | Value |
---|---|---|
2 bytes | Connection Handle | see ble_gap_evt_t::conn_handle |
1 byte | Key type | see ble_gap_evt_auth_key_request_t::key_type |
Frame format encoding of the BLE_GAP_EVT_AUTH_STATUS packet.
Event ID = 0x17 for BLE_GAP_EVT_AUTH_STATUS
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 Authentication Status event, the ble_gap_evt_auth_status_t is encoded after connection handle as seen in Figure 1.
The security mode levels 1 and 2 are both bitfields inside 1 byte as seen in Figure 1. The same goes for The long term authentication and length.
The order of the encoding is:
Length | Parameter | Value |
---|---|---|
2 bytes | Connection Handle | see ble_gap_evt_t::conn_handle |
1 byte | Authentication Status | |
1 byte | Error Source | |
1 byte | Security Mode levels | sm1 and sm2 |
1 byte | Peripheral Key Exchange | |
1 byte | Central Key Exchange | |
2 bytes | Encryption Diversifier | |
16 bytes | Long Term Key | |
1 byte | LTK length and Auth | auth - 1bit, len - 7 bits |
16 bytes | Identify Resolution Key | |
1 byte | Address Type | |
6 bytes | Address (LSB first) |
Frame format encoding of the BLE_GAP_EVT_CONN_SEC_UPDATE packet.
Event ID = 0x18 for BLE_GAP_EVT_CONN_SEC_UPDATE
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 Security Info Request event, the ble_gap_evt_conn_sec_update_t is encoded after connection handle as seen in Figure 1.
The security mode and level are both bitfields inside 1 byte as seen in Figure 2.
The order of the encoding is:
Length | Parameter | Value |
---|---|---|
2 bytes | Connection Handle | see ble_gap_evt_t::conn_handle |
1 byte | Security Mode bitfields: - Security mode (sm): 4 bits, - Level (lv): 4 bits | (See Figure 2 for details on encoding) |
1 byte | Encryption Key Size | see ble_gap_conn_sec_t::encr_key_size |
Frame format encoding of the BLE_GAP_EVT_TIMEOUT packet.
Event ID = 0x19 for BLE_GAP_EVT_TIMEOUT
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 Timeout event, the ble_gap_evt_timeout_t is encoded after connection handle as seen in Figure 1.
The order of the encoding is:
Length | Parameter | Value |
---|---|---|
2 bytes | Connection Handle | see ble_gap_evt_t::conn_handle |
1 byte | Timeout Source | see ble_gap_evt_timeout_t::src |
Frame format encoding of the BLE_GAP_EVT_RSSI_CHANGED packet.
Event ID = 0x1A for BLE_GAP_EVT_RSSI_CHANGED
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 RSSI Changed event, the ble_gap_evt_rssi_changed_t is encoded after connection handle as seen in Figure 1.
The order of the encoding is:
Length | Parameter | Value |
---|---|---|
2 bytes | Connection Handle | see ble_gap_evt_t::conn_handle |
1 byte | RSSI | see ble_gap_evt_rssi_changed_t::rssi |