nRF51 SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
0x6A - sd_ble_gap_ppcp_set

Function packet format

Frame format encoding of the sd_ble_gap_ppcp_set packet.

Operation Code = 0x6A (106) for sd_ble_gap_ppcp_set, see BLE_GAP_SVCS.

The parameter provided as input to sd_ble_gap_ppcp_set is encoded in the following order:

- 1 byte: Operation Code, Value = 0x6A (106)
- 1 byte: GAP Connection Parameters Present
0x00 Field not present
0x01 Field present and follows immediately in the packet
- 8 bytes:ble_gap_conn_params_t GAP Connection Parameters (See Figure 1 for details on encoding)


As shown in Figure 1, each of the 2 byte variable inside ble_gap_conn_params_t are encoded as:

- 2 bytes:ble_gap_conn_params_t::min_conn_interval Minimum Connection Interval
- 2 bytes:ble_gap_conn_params_t::max_conn_interval Maximum Connection Interval
- 2 bytes:ble_gap_conn_params_t::slave_latency Slave Latency
- 2 bytes:ble_gap_conn_params_t::conn_sup_timeout Connection Supervision Timeout


ppcp_set_packet.png
Figure 1: Packet format for sd_ble_gap_ppcp_set function.

Response packet format

Frame format encoding of the sd_ble_gap_ppcp_set response packet.

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

- 1 byte:Operation Code, Value = 0x6A (106)
- 4 byte:nRF Error Code


default_error_response_packet.png
Figure 2: Packet format for sd_ble_gap_ppcp_set 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 = 0x6A (106)
- 4 bytes:nRF Error Code


default_success_response_packet.png
Figure 3: Packet format for sd_ble_gap_ppcp_set success response.