nRF51 SDK
|
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 |
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 |
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 |