nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ bt_fast_pair_enable()

int bt_fast_pair_enable ( void )

#include <include/bluetooth/services/fast_pair/fast_pair.h>

Enable Fast Pair.

This function shall only be used after calling the bt_enable and the settings_load functions. The Fast Pair operations require the enabled Bluetooth subsystem (see the bt_is_ready function) and the load operation of the settings subsystem.

Mandatory callbacks must be registered before the user enables the Fast Pair module with this API. The mandatory callback set may depend on the chosen Fast Pair extension set that is selected in the application Kconfig configuration. The enable API fails with an error if mandatory callbacks are not registered. An example of a mandatory callback is the bt_fast_pair_fmdn_ring_cb structure defined in the API header of the Find My Device Network extension when this extension is configured to support ringing operations. The Fast Pair module configuration without any extensions does not require any mandatory callbacks.

If the application uses non-mandatory callbacks, like the bt_fast_pair_fmdn_ring_cb structure, these callbacks must also be registered before the bt_fast_pair_enable API call.

This function must be called in the cooperative thread context.

Returns
0 if the operation was successful. Otherwise, a (negative) error code is returned.