nRF51 SDK
|
Frame format encoding of the sd_ble_gap_sec_params_reply packet.
Operation Code = 0x6F (111) for sd_ble_gap_sec_params_reply, see BLE_GAP_SVCS.
The parameters provided as input to sd_ble_gap_sec_params_reply is encoded in the following order:
- 1 byte: | Operation Code, Value = 0x6F (111) | |
- 2 bytes: | Connection Handle | |
- 1 byte: | GAP Security status | Security status |
- 1 byte: | Security Parameters Present | |
0x00 Field not present | ||
0x01 Field present and follows immediately in the packet | ||
- 2 bytes: | ble_gap_sec_params_t::timeout | Conditional: Timeout for SMP transactions or Security Request in seconds |
- 1 byte: | ble_gap_sec_params_t | Conditional: Bond, MITM, IO capabilites and OOB bitfield |
- 1 byte: | ble_gap_sec_params_t::min_key_size | Conditional: Minimum encryption key size in octets |
- 1 byte: | ble_gap_sec_params_t::max_key_size | Conditional: Maximum encryption key size in octets |
The Bond, MITM, IO Capabilities and OOB fields are all bitfields inside 1 byte as seen in Figure 2.
Frame format encoding of the sd_ble_gap_sec_params_reply response packet.
In case of an error, the following data is encoded:
- 1 byte: | Operation Code, Value = 0x6F (111) | |
- 4 byte: | nRF Error Code |
In case of a successful command, i.e. 'nRF Error Code' = NRF_SUCCESS
, the following data is encoded:
- 1 byte: | Operation Code, Value = 0x6F (111) | |
- 4 bytes: | nRF Error Code |