nRF51 SDK - S110 SoftDevice
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
BLE S110 Functions

0x34 - sd_power_system_off

Function packet format.

Frame format encoding of the sd_power_system_off packet.

The parameters are encoded in the following order:

Length Parameter Value
1 byte Operation Code 0x34


system_power_off.png
Figure 1: Packet format for sd_system_power_off function.


Response packet format

There is no response for this command.

0x52 - sd_temp_get

Function packet format.

Frame format encoding of the sd_temp_get packet.

The parameters are encoded in the following order:

Length Parameter Value
1 byte Operation Code 0x52
1 byte Temperature Present 0x00 Field not present, 0x01 Field present


temp_get.png
Figure 1: Packet format for sd_temp_get function.


Response packet format

Frame format encoding of the sd_temp_get response packet:

Length Parameter Value
1 byte Operation Code 0x52
4 bytes nRF Error Code see sd_temp_get
4 bytes Measured Temperature Value see sd_temp_get


temp_get_response.png
Figure 2: Packet format for sd_temp_get response.


0x62 - sd_ble_tx_buffer_count_get

Function packet format

Frame format encoding of the sd_ble_tx_buffer_count_get packet.

The parameters are encoded in the following order:

Length Parameter Value
1 byte Operation Code 0x62, see BLE_COMMON_SVCS
1 byte Tx Buffer Count Present 0x00 Field not present, 0x01 Field present


tx_buffer_count_get_packet.png
Figure 1: Packet format for sd_ble_tx_buffer_count_get function.


Response packet format

In case of a successful command, i.e. 'nRF Error Code' = NRF_SUCCESS nRF Error Code is followed by conditional data.

Frame format encoding of the sd_ble_tx_buffer_count_get response packet:

Length Parameter Value
1 byte Operation Code 0x62, see BLE_COMMON_SVCS
4 bytes nRF Error Code see sd_ble_tx_buffer_count_get
1 byte Conditional: Tx Buffer Count Present 0x00 Field not present, 0x01 Field present
1 byte Conditional: Tx Buffer Count see sd_ble_tx_buffer_count_get


tx_buffer_count_get_response.png
Figure 2: Packet format for sd_ble_tx_buffer_count_get function response.


0x63 - sd_ble_uuid_vs_add

Function packet format

Frame format encoding of the sd_ble_uuid_vs_add packet.

The parameters are encoded in the following order:

Length Parameter Value
1 byte Operation Code 0x63, see BLE_COMMON_SVCS
1 byte UUID Present 0x00 Field not present, 0x01 Field present
16 bytes Conditional: Vendor Specific UUID see ble_uuid128_t
1 byte UUID type Present 0x00 Field not present, 0x01 Field present


uuid_vs_add_packet.png
Figure 1: Packet format for sd_ble_uuid_vs_add function.


Response packet format

In case of a successful command, i.e. 'nRF Error Code' = NRF_SUCCESS nRF Error Code is followed by conditional data.

Frame format encoding of the sd_ble_uuid_vs_add response packet:

Length Parameter Value
1 byte Operation Code 0x63, see BLE_COMMON_SVCS
4 bytes nRF Error Code see sd_ble_uuid_vs_add
1 byte UUID Type Present 0x00 Field not present, 0x01 Field present
1 byte Conditional: UUID Type index to Vendor Specific UUID


uuid_vs_add_response.png
Figure 2: Packet format for sd_ble_uuid_vs_add response.


0x64 - sd_ble_uuid_decode

Function packet format

Frame format encoding of the sd_ble_uuid_decode packet.

The parameters are encoded in the following order:

Length Parameter Value
1 byte Operation Code 0x64, see BLE_COMMON_SVCS
1 byte Length of Raw UUID Shall be 2 or 16 bytes
1 byte Raw UUID Present 0x00 Field not present, 0x01 Field present
2 or 16 bytes Raw UUID Raw UUID to be decoded
1 byte UUID Result Struct Present 0x00 Field not present, 0x01 Field present


uuid_decode_packet.png
Figure 1: Packet format for sd_ble_uuid_decode request function.


Response packet format

In case of a successful command, i.e. 'nRF Error Code' = NRF_SUCCESS nRF Error Code is followed by conditional data.

Frame format encoding of the sd_ble_uuid_decode response packet:

Length Parameter Value
1 byte Operation Code 0x64, see BLE_COMMON_SVCS
4 bytes nRF Error Code see sd_ble_uuid_decode
1 byte Conditional: ble_uuid_t Present0x00 Field not present, 0x01 Field present
3 bytes Conditional: Encoded UUID Raw UUID decoded to ble_uuid_t


ble_uuid_t is encoded in the following order:

Length Parameter Value
2 bytes UUID UUID Value
1 byte Type UUID Type


uuid_decode_response.png
Figure 2: Packet format for sd_ble_uuid_decode response.


0x65 - sd_ble_uuid_encode

Function packet format

Frame format encoding of the sd_ble_uuid_encode packet.

The parameters are encoded in the following order:

Length Parameter Value
1 byte Operation Code 0x65, see BLE_COMMON_SVCS
1 byte UUID Present 0x00 Field not present, 0x01 Field present
3 bytes Conditional: UUID see ble_uuid_t
1 byte Length Present 0x00 Field not present, 0x01 Field present
1 byte UUID Result Buffer Present 0x00 Field not present, 0x01 Field present


As can also be seen inside Figure 1 the 3 bytes inside ble_uuid_t are encoded as:

Length Parameter Value
2 bytes UUID UUID Value
1 byte Type UUID Type


uuid_encode_packet.png
Figure 1: Packet format for sd_ble_uuid_encode function.


Response packet format

In case of a successful command, i.e. 'nRF Error Code' = NRF_SUCCESS nRF Error Code is followed by conditional data.

Frame format encoding of the sd_ble_uuid_encode response packet:

Length Parameter Value
1 byte Operation Code 0x65, see BLE_COMMON_SVCS
4 bytes nRF Error Code see sd_ble_uuid_encode
1 byte Conditional: Length of encoded UUID 2 or 16
2 or 16 bytes Conditional: Encoded UUID UUID Value


uuid_encode_response.png
Figure 2: Packet format for sd_ble_uuid_encode response.


0x66 - sd_ble_version_get

Function packet format

Frame format encoding of the sd_ble_version_get packet.

The parameters are encoded in the following order:

Length Parameter Value
1 byte Operation Code 0x66, see BLE_COMMON_SVCS
1 byte Version Present 0x00 Field not present, 0x01 Field present


version_get_packet.png
Figure 1: Packet format for sd_ble_version_get function.


Response packet format

In case of a successful command, i.e. 'nRF Error Code' = NRF_SUCCESS nRF Error Code is followed by conditional data.

Frame format encoding of the sd_ble_version_get response packet:

Length Parameter Value
1 byte Operation Code 0x66, see BLE_COMMON_SVCS
4 bytes nRF Error Code see sd_ble_version_get
1 byte Conditional: Version Number see ble_version_t::version_number
2 bytes Conditional: Company ID see ble_version_t::company_id
2 bytes Conditional: Subversion Number see ble_version_t::subversion_number


version_get_response.png
Figure 2: Packet format for sd_ble_version_get response.


0x60 - sd_ble_enable

Function packet format

Frame format encoding of the sd_ble_enable packet.

The parameters are encoded in the following order:

Length Parameter Value
1 byte Operation Code 0x60, see BLE_COMMON_SVCS
1 byte Enable Params Present 0x00 Field not present, 0x01 Field present
1 byte Conditional: Enable Params see ble_enable_params_t


ble_enable_packet.png
Figure 1: Packet format for sd_ble_enable function.


Response packet format

Frame format encoding of the sd_ble_enable response packet:

Length Parameter Value
1 byte Operation Code 0x60, see BLE_COMMON_SVCS
4 bytes nRF Error Code see sd_ble_enable


default_response_packet_generic.png
Figure 2: Packet format for sd_ble_enabale response.


0x68 - sd_ble_opt_set

Function packet format

Frame format encoding of the sd_ble_opt_set packet.

The parameters are encoded in the following order:

Length Parameter Value
1 byte Operation Code 0x68, see BLE_COMMON_SVCS
4 bytes GAP Option ID see sd_ble_opt_set
1 byte GAP Option present 0x00 Field not present, 0x01 Field present
3 ... 19 bytes Conditional: GAP Option see ble_opt_t


opt_set_request_packet.png
Figure 1: Packet format for sd_ble_opt_set function.


Encoding of GAP Option

The GAP Option field (if present) is encoded depending on the GAP Option ID field:

if 'GAP Option ID' equals BLE_GAP_OPT_LOCAL_CONN_LATENCY, GAP Option is encoded as follows:

Length Parameter Value
2 bytes Connection Handle see ble_gap_opt_local_conn_latency_t
2 bytes Requested Latency see ble_gap_opt_local_conn_latency_t
1 byte Actual Latency present 0x00 Field not present, 0x01 Field present
2 bytes Conditional: Actual Latency see ble_gap_opt_local_conn_latency_t


opt_set_local_conn_latency_encoding.png
Figure 2: Encoding of GAP Option when Option ID equals BLE_GAP_OPT_LOCAL_CONN_LATENCY.


if 'GAP Option ID' = BLE_GAP_OPT_PASSKEY, GAP Option is encoded as follows:

Length Parameter Value
6 bytes Passkey see ble_gap_opt_passkey_t


opt_set_passkey_encoding.png
Figure 3: Encoding of GAP Option when Option ID equals BLE_GAP_OPT_PASSKEY.


if 'GAP Option ID' = BLE_GAP_OPT_PRIVACY, GAP Option is encoded as follows:

Length Parameter Value
1 byte IRK present 0x00 Field not present, 0x01 Field present
16 bytes Conditional: IRK see ble_gap_opt_privacy_t
2 bytes Interval see ble_gap_opt_privacy_t


opt_set_privacy_encoding.png
Figure 4: Encoding of GAP Option when Option ID equals BLE_GAP_OPT_PRIVACY.


Response packet format

Frame encoding of the sd_ble_opt_set response packet:

Length Parameter Value
1 byte Operation Code 0x68, see BLE_COMMON_SVCS
4 bytes nRF Error Code see sd_ble_opt_set


default_response_packet_generic.png
Figure 5: Packet format for sd_ble_opt_set response.


0x69 - sd_ble_opt_get

Function packet format

Frame format encoding of the sd_ble_opt_get packet.

The parameters are encoded in the following order:

Length Parameter Value
1 byte Operation Code 0x69, see BLE_COMMON_SVCS
4 bytes GAP Option ID see sd_ble_opt_get
1 byte GAP Option present 0x00 Field not present, 0x01 Field present


opt_get_request_packet.png
Figure 1: Packet format for sd_ble_opt_get function.


Response packet format

In case of a successful command, i.e. 'nRF Error Code' = NRF_SUCCESS nRF Error Code is followed by conditional data.

Frame encoding of the sd_ble_opt_get response packet:

Length Parameter Value
1 byte Operation Code 0x69, see BLE_COMMON_SVCS
4 bytes nRF Error Code see sd_ble_opt_get
4 bytes Conditional: GAP Option ID see sd_ble_opt_get
3 ... 19 bytes Conditional: GAP Option see ble_opt_t


opt_get_response_packet.png
Figure 2: Packet format for sd_ble_opt_get response.


Encoding of the conditional field "GAP Option" is done in the same way as in sd_ble_opt_set request packet, which is described in detail in section Encoding of GAP Option