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

0x90 - sd_ble_gattc_primary_services_discover

Function packet format

Frame format encoding of the sd_ble_gattc_primary_services_discover packet.

The parameters are encoded in the following order:

Length Parameter Value
1 byte Operation Code 0x90, see BLE_GATTC_SVCS
2 bytes Connection Handle See sd_ble_gattc_primary_services_discover
2 bytes Start Handle See sd_ble_gattc_primary_services_discover
1 byte Service UUID Information Present 0x00 - not present, 0x01 - present
3 bytes Conditional: UUID See ble_uuid_t


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

Length Parameter Value
2 bytes UUID Value See ble_uuid_t::uuid
1 byte UUID Type See ble_uuid_t::type


gattc_primary_services_discover_packet.png
Figure 1: Packet format for sd_ble_gattc_primary_services_discover function.


Response packet format

Frame format encoding of the sd_ble_gattc_primary_services_discover response packet:

Length Parameter Value
1 byte Operation Code 0x90, see BLE_GATTC_SVCS
4 bytes nRF Error Code See sd_ble_gattc_primary_services_discover


default_error_response_packet.png
Figure 2: Packet format for sd_ble_gattc_primary_services_discover error response.


0x91 - sd_ble_gattc_relationships_discover

Function packet format

Frame format encoding of the sd_ble_gattc_relationships_discover packet.

The parameters are encoded in the following order:

Length Parameter Value
1 byte Operation Code 0x91, see BLE_GATTC_SVCS
2 bytes Connection Handle See sd_ble_gattc_primary_services_discover
1 byte Handle Range Present 0x00 - not present, 0x01 - present
4 bytes Conditional: Handle Range See ble_gattc_handle_range_t


As can also be seen inside Figure 1, the 4 bytes inside ble_gattc_handle_range_t are encoded as:

Length Parameter Value
2 bytes Start handle See ble_gattc_handle_range_t::start_handle
2 bytes End handle See ble_gattc_handle_range_t::end_handle


gattc_relationships_discover_packet.png
Figure 1: Packet format for sd_ble_gattc_relationships_discover function.


Response packet format

Frame format encoding of the sd_ble_gattc_relationships_discover response packet:

Length Parameter Value
1 byte Operation Code 0x91, see BLE_GATTC_SVCS
4 bytes nRF Error Code See sd_ble_gattc_relationships_discover


default_error_response_packet.png
Figure 2: Packet format for sd_ble_gattc_relationships_discover error response.


0x92 - sd_ble_gattc_characteristics_discover

Function packet format

Frame format encoding of the sd_ble_gattc_characteristics_discover packet.

The parameters are encoded in the following order:

Length Parameter Value
1 byte Operation Code 0x92, see BLE_GATTC_SVCS
2 bytes Connection Handle See sd_ble_gattc_characteristics_discover
1 byte Handle Range Present 0x00 - not present, 0x01 - present
4 bytes Conditional: Handle Range See ble_gattc_handle_range_t


As can also be seen inside Figure 1, the 4 bytes inside ble_gattc_handle_range_t are encoded as:

Length Parameter Value
2 bytes Start handle See ble_gattc_handle_range_t::start_handle
2 bytes End handle See ble_gattc_handle_range_t::end_handle


gattc_characteristics_discover_packet.png
Figure 1: Packet format for sd_ble_gattc_characteristics_discover function.


Response packet format

Frame format encoding of the sd_ble_gattc_characteristics_discover response packet:

Length Parameter Value
1 byte Operation Code 0x92, see BLE_GATTC_SVCS
4 bytes nRF Error Code See sd_ble_gattc_characteristics_discover


default_error_response_packet.png
Figure 2: Packet format for sd_ble_gattc_characteristics_discover error response.


0x93 - sd_ble_gattc_descriptors_discover

Function packet format

Frame format encoding of the sd_ble_gattc_descriptors_discover packet.

The parameters are encoded in the following order:

Length Parameter Value
1 byte Operation Code 0x93, see BLE_GATTC_SVCS
2 bytes Connection Handle See sd_ble_gattc_descriptors_discover
1 byte Handle range Present 0x00 - not present, 0x01 - present
4 bytes Conditional: Handle range See sd_ble_gattc_descriptors_discover


As can also be seen inside Figure 1, ble_gattc_handle_range_t is encoded as:

Length Parameter Value
2 bytes Start handle See ble_gattc_handle_range_t::start_handle
2 bytes End handle See ble_gattc_handle_range_t::end_handle


gattc_characteristics_discover_packet.png
Figure 1: Packet format for sd_ble_gattc_descriptors_discover function.


Response packet format

Frame format encoding of the sd_ble_gattc_descriptors_discover response packet:

Length Parameter Value
1 byte Operation Code 0x93, see BLE_GATTC_SVCS
4 bytes nRF Error Code See sd_ble_gattc_descriptors_discover


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


0x94 - sd_ble_gattc_char_value_by_uuid_read

Function packet format

Frame format encoding of the sd_ble_gattc_char_value_by_uuid_read packet.

The parameters are encoded in the following order:

Length Parameter Value
1 byte Operation Code 0x94
2 bytes Connection Handle See sd_ble_gattc_char_value_by_uuid_read
1 byte UUID Present 0x00 - not present, 0x01 - present
3 bytes Conditional: UUID See sd_ble_gattc_char_value_by_uuid_read
1 byte Handle range Present 0x00 - not present, 0x01 - present
4 bytes Conditional: Handle range See sd_ble_gattc_char_value_by_uuid_read


ble_uuid_t is encoded in the following order:

Length Parameter Value
2 bytes UUID See ble_uuid_t::uuid
1 byte Type See ble_uuid_t::type


ble_gattc_handle_range_t is encoded in the following order:

Length Parameter Value
2 bytes Start handle See ble_gattc_handle_range_t::start_handle
2 bytes End handle See ble_gattc_handle_range_t::end_handle


gattc_char_value_by_uuid_read_packet.png
Figure 1: Packet format for sd_ble_gattc_char_value_by_uuid_read function.


Response packet format

Frame format encoding of the sd_ble_gattc_char_value_by_uuid_read response packet:

Length Parameter Value
1 byte Operation Code 0x94
4 bytes nRF Error Code See sd_ble_gattc_char_value_by_uuid_read


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


0x95 - sd_ble_gattc_read

Function packet format

Frame format encoding of the sd_ble_gattc_read packet.

The parameters are encoded in the following order:

Length Parameter Value
1 byte Operation Code 0x95, see BLE_GATTC_SVCS
2 bytes Connection Handle See sd_ble_gattc_read
2 bytes Handle See sd_ble_gattc_read
2 bytes Offset See sd_ble_gattc_read


gattc_read_packet.png
Figure 1: Packet format for sd_ble_gattc_read function.


Response packet format

Frame format encoding of the sd_ble_gattc_read response packet:

Length Parameter Value
1 byte Operation Code 0x95, see BLE_GATTC_SVCS
4 bytes nRF Error Code See sd_ble_gattc_read


default_error_response_packet.png
Figure 2: Packet format for sd_ble_gattc_read response.


0x96 - sd_ble_gattc_char_values_read

Function packet format

Frame format encoding of the sd_ble_gattc_char_values_read packet.

The parameters are encoded in the following order:

Length Parameter Value
1 byte Operation Code 0x96, see BLE_GATTC_SVCS
2 bytes Connection Handle See sd_ble_gattc_char_values_read
2 bytes Handle Count See sd_ble_gattc_char_values_read
1 byte Handles Present 0x00 - not present, 0x01 - present
2 bytes x Handle Count Conditional:Handles Handles values


ble_gattc_char_values_read_packet.png
Figure 1: Packet format for sd_ble_gattc_char_values_read function.


Response packet format

Frame format encoding of the sd_ble_gattc_char_values_read response packet:

Length Parameter Value
1 byte Operation Code 0x96, see BLE_GATTC_SVCS
4 bytes nRF Error Code See sd_ble_gattc_char_values_read


default_error_response_packet.png
Figure 2: Packet format for sd_ble_gattc_read response.


0x97 - sd_ble_gattc_write

Function packet format

Frame format encoding of the sd_ble_gattc_write packet.

The parameters are encoded in the following order:

Length Parameter Value
1 byte Operation Code 0x97, see BLE_GATTC_SVCS
2 bytes Connection Handle See sd_ble_gattc_write
1 byte Write Parameters Present 0x00 - not present, 0x01 - present
9..n bytes Conditional: GATTC Write Parameters See sd_ble_gattc_write


GATTC Write parameters are encoded in the following order:

Length Parameter Value
1 byte Write operation See ble_gattc_write_params_t::write_op
1 bytes Write flags See ble_gattc_write_params_t::flags
2 bytes Handle See ble_gattc_write_params_t::handle
2 bytes Offset See ble_gattc_write_params_t::offset
2 bytes Value length See ble_gattc_write_params_t::len
1 byte Value present 0x00 - not present, 0x01 - present
n bytes Conditional: Value See ble_gattc_write_params_t::p_value


ble_gattc_write_packet.png
Figure 1: Packet format for sd_ble_gattc_write function.


Response packet format

Frame format encoding of the sd_ble_gattc_write response packet:

Length Parameter Value
1 byte Operation Code 0x97, see BLE_GATTC_SVCS
4 bytes nRF Error Code See sd_ble_gattc_write


default_error_response_packet.png
Figure 2: Packet format for sd_ble_gattc_write response.


0x98 - sd_ble_gattc_hv_confirm

Function packet format

Frame format encoding of the sd_ble_gattc_hv_confirm packet:

Length Parameter Value
1 byte Operation Code 0x98, see BLE_GATTC_SVCS
2 bytes Connection Handle See sd_ble_gattc_hv_confirm
2 bytes Handle See sd_ble_gattc_hv_confirm


gattc_hv_confirm.png
Figure 1: Packet format for sd_ble_gattc_hv_confirm function.


Response packet format

Frame format encoding of the sd_ble_gattc_hv_confirm response packet:

Length Parameter Value
1 byte Operation Code 0x98, see BLE_GATTC_SVCS
4 bytes nRF Error Code See sd_ble_gattc_hv_confirm


default_error_response_packet.png
Figure 2: Packet format for sd_ble_gattc_hv_confirm response.