nRF51 SDK
|
Frame format encoding of the sd_ble_gatts_value_set packet.
Operation Code = 0xA4 (164) for sd_ble_gatts_value_set, see BLE_GATTS_SVCS.
The parameter provided as input to sd_ble_gatts_value_set is encoded in the following order:
- 1 byte: | Operation Code, Value = 0xA4 (164) | |
- 2 bytes: | Attribute Handle | |
- 2 bytes: | Offset | |
- 1 byte: | Length Present | |
0x00 Field not present | ||
0x01 Field present and follows immediately in the packet | ||
- 2 byte: | Conditional: Length | |
- 1 byte: | Attribute Value Present | |
0x00 Field not present | ||
0x01 Field present and follows immediately in the packet | ||
- 0...Length bytes: | Conditional: The number of bytes encoded is specified by the Length field. |
Frame format encoding of the sd_ble_gatts_value_set response packet.
In case of an error, the following data is encoded:
- 1 byte: | Operation Code, Value = 0xA4 (164) | |
- 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 = 0xA4 (164) | |
- 4 bytes: | Return Code | |
- 2 bytes: | Length of bytes written |