nRF51 SDK
|
Frame format encoding of the sd_ble_gap_adv_data_set packet.
Operation Code = 0x62 (98) for sd_ble_gap_adv_data_set, see BLE_GAP_SVCS.
The parameters provided as input to sd_ble_gap_adv_data_set are encoded in the following order:
- 1 byte: | Operation Code, Value = 0x62 (98) |
- 1 byte: | Length of Advertising data |
- 0 ... 31 bytes: | Advertising Data array |
The number of bytes encoded are specified in the 'Advertising Data Length' field | |
If 'Advertising Data Length' = 0, no data are encoded, and the following byte will be the 'Scan Response Data Length' field, see Figure 2 | |
- 1 byte: | Length of Scan Response data |
- 0 ... 31 bytes: | Scan Response Data array |
The number of bytes encoded are specified in the 'Scan Response Data Length' field | |
If 'Scan Response Data Length' = 0, no data are encoded, and no more bytes are encoded in the packet, see Figure 2 |
Frame format encoding of the sd_ble_gap_adv_data_set response packet.
In case of an error, the following data is encoded:
- 1 byte: | Operation Code, Value = 0x62 (98) | |
- 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 = 0x62 (98) | |
- 4 bytes: | nRF Error Code |