Skip to content

Commit 4769c45

Browse files
committed
doc: external_comp: fast_pair: doc bt_fast_pair_fmdn_is_provisioned API
Updated the Fast Pair integration guide to document changes in the FMDN APIs that are used to track the provisioning state. The callback API - bt_fast_pair_fmdn_info_cb.provisioning_state_changed - has been changed and no longer reports the initial provisioning state after the Fast Pair subsystem is enabled with the bt_fast_pair_enable API. Added the new FMDN API - bt_fast_pair_fmdn_is_provisioned. The API can be used to check the device provisioning state synchronously. Ref: NCSDK-30856 Signed-off-by: Kamil Piszczek <[email protected]>
1 parent 831d14c commit 4769c45

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

doc/nrf/external_comp/bt_fast_pair.rst

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,8 @@ When creating the Fast Pair advertising set with the :c:func:`bt_le_ext_adv_crea
545545
* For the unprovisioned device, control the Fast Pair advertising rotation time using the :c:func:`bt_le_set_rpa_timeout` and :c:func:`bt_le_oob_get_local` functions.
546546
You must still comply with the requirements of the Fast Pair protocol.
547547

548-
The provisioning state is indicated by the :c:member:`bt_fast_pair_fmdn_info_cb.provisioning_state_changed` callback.
548+
The :c:func:`bt_fast_pair_fmdn_is_provisioned` function can be used to check the current FMDN provisioning state synchronously.
549+
Also, the provisioning state changes are indicated by the :c:member:`bt_fast_pair_fmdn_info_cb.provisioning_state_changed` callback.
549550
See :ref:`ug_bt_fast_pair_gatt_service_fmdn_info_callbacks` for more details.
550551

551552
See the :ref:`fast_pair_locator_tag` sample that demonstrates how to comply with the rules described in this section.
@@ -763,17 +764,27 @@ This function supports the following callbacks:
763764
* :c:member:`bt_fast_pair_fmdn_info_cb.clock_synced` - Notification about the beacon clock synchronization event
764765
* :c:member:`bt_fast_pair_fmdn_info_cb.conn_authenticated` - Notification about the connected peer authentication event
765766

767+
.. _ug_bt_fast_pair_gatt_service_fmdn_info_callbacks_provisioning_state:
768+
766769
Provisioning state
767770
~~~~~~~~~~~~~~~~~~
768771

769-
The provisioning state is indicated by the :c:member:`bt_fast_pair_fmdn_info_cb.provisioning_state_changed` callback.
772+
The :c:func:`bt_fast_pair_fmdn_is_provisioned` function can be used to check the current FMDN provisioning state synchronously.
773+
You can only call this function in the ready state of the Fast Pair module (see the :c:func:`bt_fast_pair_is_ready` function).
774+
775+
The provisioning state changes are indicated by the :c:member:`bt_fast_pair_fmdn_info_cb.provisioning_state_changed` callback.
770776
This callback is triggered in the following scenarios:
771777

772-
* Right after the :c:func:`bt_fast_pair_enable` enable operation to indicate the initial provisioning state of the extension.
773778
* On the successful provisioning operation over Beacon Actions characteristic.
774779
* On the successful unprovisioning operation over Beacon Actions characteristic.
775780

776-
The provisioning state callback is used to notify the application about switching to a proper advertising policy.
781+
The :c:func:`bt_fast_pair_fmdn_is_provisioned` function and the :c:member:`bt_fast_pair_fmdn_info_cb.provisioning_state_changed` callback are two complementary API elements that can be used to track the FMDN provisioning state in your application code.
782+
The recommended usage scenario is described in the next paragraph.
783+
784+
Use the :c:func:`bt_fast_pair_fmdn_is_provisioned` function to initialize the provisioning state right after enabling the Fast Pair module with the :c:func:`bt_fast_pair_enable` function call.
785+
Then, handle the :c:member:`bt_fast_pair_fmdn_info_cb.provisioning_state_changed` callback to track the provisioning state changes until the Fast Pair module is disabled again with the :c:func:`bt_fast_pair_disable` function call.
786+
787+
The accurate tracking of the FMDN provisioning state is mandatory for proper management of the Fast Pair and FMDN advertising policies.
777788
The advertising policies are extensively described in the :ref:`Setting up Bluetooth LE advertising <ug_bt_fast_pair_advertising>` section of this integration guide.
778789

779790
Clock synchronization
@@ -822,7 +833,7 @@ The FMDN extension defines special read modes, in which sensitive data can be re
822833
The read mode persists only for limited time after which it is deactivated.
823834

824835
To enter the chosen read mode, you must call the :c:func:`bt_fast_pair_fmdn_read_mode_enter` function and pass the supported read mode type as a function parameter.
825-
You can only call this function in the ready state of the Fast Pair module (see the :c:func:`bt_fast_pair_is_ready` function) and in the FMDN provisioned state (see the :c:member:`bt_fast_pair_fmdn_info_cb.provisioning_state_changed` callback).
836+
You can only call this function in the ready state of the Fast Pair module (see the :c:func:`bt_fast_pair_is_ready` function) and in the FMDN provisioned state (see the :c:func:`bt_fast_pair_fmdn_is_provisioned` function).
826837
The FMDN extension supports the following read mode types:
827838

828839
* :c:enum:`BT_FAST_PAIR_FMDN_READ_MODE_FMDN_RECOVERY` - Ephemeral Identity Key (EIK) recovery mode

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -978,6 +978,7 @@ Google Fast Pair integration
978978

979979
* The :ref:`ug_bt_fast_pair_provisioning_register_hex_generation` section that describes how to generate the hex file with the Fast Pair provisioning data.
980980
* The :ref:`ug_bt_fast_pair_prerequisite_ops_kconfig` section to align it with recent changes in the sysbuild configuration for Fast Pair.
981+
* The :ref:`ug_bt_fast_pair_gatt_service_fmdn_info_callbacks_provisioning_state` section with changes to the FMDN API elements that are used for tracking of the FMDN provisioning state.
981982

982983
Edge Impulse integration
983984
------------------------

0 commit comments

Comments
 (0)