nRF Connect SDK Bare Metal API 2.0.99
Loading...
Searching...
No Matches

◆ ble_db_discovery_service_register()

uint32_t ble_db_discovery_service_register ( struct ble_db_discovery * db_discovery,
const ble_uuid_t * uuid )

#include <ble_db_discovery.h>

Register service UUID with the DB Discovery instance.

The application should use this function to inform which service it is interested in discovering at the server.

Parameters
[in,out]db_discoveryDB discovery instance.
[in]uuidUUID of the service to be discovered at the server.
Note
The total number of services that can be discovered by this library is CONFIG_BLE_DB_DISCOVERY_MAX_SRV. This effectively means that the maximum number of registrations possible is equal to CONFIG_BLE_DB_DISCOVERY_MAX_SRV. Registering an already registered service UUID will not have any effect.
Return values
NRF_SUCCESSOn success.
NRF_ERROR_NULLIf db_discovery is NULL.
NRF_ERROR_INVALID_STATEIf this function is called without calling the ble_db_discovery_init function.
NRF_ERROR_NO_MEMIf the maximum number of allowed registrations has been reached.