Embassy
nrf-softdevice-s132

Crates

git

Versions

default

Flavors

pub unsafe fn sd_ble_gattc_primary_services_discover(
conn_handle: u16,
start_handle: u16,
p_srvc_uuid: *const ble_uuid_t
) -> u32
Expand description

@brief Initiate or continue a GATT Primary Service Discovery procedure.

@details This function initiates or resumes a Primary Service discovery procedure, starting from the supplied handle. If the last service has not been reached, this function must be called again with an updated start handle value to continue the search.

@note If any of the discovered services have 128-bit UUIDs which are not present in the table provided to ble_vs_uuids_assign, a UUID structure with type @ref BLE_UUID_TYPE_UNKNOWN will be received in the corresponding event.

@events @event{@ref BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP} @endevents

@mscs @mmsc{@ref BLE_GATTC_PRIM_SRVC_DISC_MSC} @endmscs

@param[in] conn_handle The connection handle identifying the connection to perform this procedure on. @param[in] start_handle Handle to start searching from. @param[in] p_srvc_uuid Pointer to the service UUID to be found. If it is NULL, all primary services will be returned.

@retval ::NRF_SUCCESS Successfully started or resumed the Primary Service Discovery procedure. @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle. @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State. @retval ::NRF_ERROR_INVALID_PARAM Invalid parameter(s) supplied. @retval ::NRF_ERROR_BUSY Client procedure already in progress. @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection.