nRF51 SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
0x71 - sd_ble_gap_sec_info_reply

Function packet format

Frame format encoding of the sd_ble_gap_sec_info_reply packet.

Operation Code = 0x71 (113) for sd_ble_gap_sec_info_reply, see BLE_GAP_SVCS.

The parameters provided as input to sd_ble_gap_sec_info_reply are encoded in the following order:

- 1 byte: Operation Code, Value = 0x71 (113)
- 2 bytes: Connection Handle
- 1 byte: Encryption Information Present
0x00 Field not present
0x01 Field present and follows immediately in the packet
- 19 bytes: Conditional: Encryption Information
- 1 byte: Signing Information Present
0x00 Field not present
0x01 Field present and follows immediately in the packet
- 16 bytes: Conditional: Signing Information


sec_info_reply_packet.png
Figure 1: Packet format for sd_ble_gap_sec_info_reply function.


The bit fields of Encryption Information are encoded as below and depicted in Figure 2 and Figure 3:

sec_info_reply_packet2.png
Figure 2: Contents of Encryption information.


- bit 0:ble_gap_enc_info_t::auth Authenticated Key
- bit 1 to 7:ble_gap_enc_info_t::ltk_len LTK length in octets


sec_info_reply_packet3.png
Figure 3: Bit Ordering of LTK and Authenticated Key fields.


Response packet format

Frame format encoding of the sd_ble_gap_sec_info_reply response packet.

In case of an error, the following data is encoded:

- 1 byte:Operation Code, Value = 0x71 (113)
- 4 byte:nRF Error Code


default_error_response_packet.png
Figure 4: Packet format for sd_ble_gap_sec_info_reply error response.

In case of a successful command, i.e. 'nRF Error Code' = NRF_SUCCESS, the following data is encoded:

- 1 byte: Operation Code, Value = 0x71 (113)
- 4 bytes:nRF Error Code


default_success_response_packet.png
Figure 5: Packet format for sd_ble_gap_sec_info_reply success response.