Skip to content

Commit

Permalink
doc: fast_pair: Describe nRF54H20 support
Browse files Browse the repository at this point in the history
Jira: NCSDK-30350

Signed-off-by: Aleksander Strzebonski <[email protected]>
  • Loading branch information
alstrzebonski committed Dec 9, 2024
1 parent 1f035ce commit 64b6671
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 6 deletions.
26 changes: 23 additions & 3 deletions doc/nrf/external_comp/bt_fast_pair.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,33 @@ Provisioning registration data onto device
The Fast Pair standard requires provisioning the device with Model ID and Anti-Spoofing Private Key obtained during device model registration.
In the |NCS|, the provisioning data is generated as a hexadecimal file using the :ref:`bt_fast_pair_provision_script`.

When building the Fast Pair in the |NCS|, the build system automatically calls the Fast Pair provision script and includes the resulting hexadecimal file in the firmware (the :file:`merged.hex` file).
When building Fast Pair in the |NCS|, the build system automatically calls the Fast Pair provision script.
It then includes the resulting hexadecimal file in the final firmware that you can flash onto the device.
The Fast Pair provisioning data is stored on the dedicated Fast Pair partition, which has to be defined.

Partition definition using the Partition Manager (PM)
-----------------------------------------------------
For devices that support :ref:`partition_manager` and have the :kconfig:option:`CONFIG_PM_SINGLE_IMAGE` Kconfig option automatically enabled by the Fast Pair build system, the system also automatically creates the ``bt_fast_pair`` partition.
The partition is defined in the :file:`subsys/partition_manager/pm.yml.bt_fast_pair` file.
The :ref:`fast_pair_input_device` sample follows this approach.

Alternatively, the Fast Pair partition can be defined manually in the application's configuration file.
To see how to do this, refer to the example in the :file:`samples/bluetooth/fast_pair/locator_tag/configuration/pm_static_nrf52840dk_nrf52840.yml` file which is a part of the :ref:`fast_pair_locator_tag` sample.

For more information about defining Partition Manager partitions, see the :ref:`Configuration <pm_configuration>` section of the :ref:`partition_manager` page.

Partition definition using the Devicetree (DTS)
-----------------------------------------------
For devices that don't support :ref:`partition_manager`, you must declare the ``bt_fast_pair_partition`` partition manually in the devicetree.
Currently the :ref:`zephyr:nrf54h20dk_nrf54h20` board is the only device that requires manual partition definition.
To see how to do this, refer to the example in the :file:`samples/bluetooth/fast_pair/input_device/boards/nrf54h20dk_nrf54h20_cpuapp.overlay` file.

To build an application with the Fast Pair support, include the following additional CMake options:

* ``FP_MODEL_ID`` - Fast Pair Model ID in format ``0xXXXXXX``,
* ``FP_ANTI_SPOOFING_KEY`` - base64-encoded Fast Pair Anti-Spoofing Private Key.

The ``bt_fast_pair`` partition address is provided automatically by the build system.
The Fast Pair partition address is provided automatically by the build system.

For example, when building an application with the |nRFVSC|, you need to add the following parameters in the **Extra CMake arguments** field on the **Add Build Configuration view**: ``-DFP_MODEL_ID=0xFFFFFF -DFP_ANTI_SPOOFING_KEY=AbAbAbAbAbAbAbAbAbAbAbAbAbAbAbAbAbAbAbAbAbA=``.
Make sure to replace ``0xFFFFFF`` and ``AbAbAbAbAbAbAbAbAbAbAbAbAbAbAbAbAbAbAbAbAbA=`` with values obtained for your device.
Expand Down Expand Up @@ -1070,5 +1090,5 @@ The following are the required dependencies for the Fast Pair integration:
* :ref:`nrfxlib:crypto`
* :ref:`zephyr:bluetooth`
* :ref:`zephyr:settings_api`
* :ref:`partition_manager`
* :ref:`partition_manager` (only for supported board targets)
* :ref:`dult_readme`
3 changes: 2 additions & 1 deletion doc/nrf/libraries/bluetooth/services/fast_pair.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ Partition Manager
-----------------

The Fast Pair provisioning data is preprogrammed to a dedicated flash memory partition.
The GFPS selects the :kconfig:option:`CONFIG_PM_SINGLE_IMAGE` Kconfig option to enable the :ref:`partition_manager`.
For targets that support the :ref:`partition_manager`, the GFPS selects the :kconfig:option:`CONFIG_PM_SINGLE_IMAGE` Kconfig option to enable it.
The :ref:`zephyr:nrf54h20dk_nrf54h20` board target is the only example of a device that doesn't support it.

Settings
--------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,10 @@ Bluetooth Fast Pair samples

* Updated the MCUboot bootloader configuration for the :ref:`zephyr:nrf54l15dk_nrf54l15` board target to enable the :kconfig:option:`CONFIG_FPROTECT` Kconfig option that is used to protect the bootloader partition against memory corruption.

* :ref:`fast_pair_input_device` sample:

* Added support for the :ref:`zephyr:nrf54h20dk_nrf54h20` board target.

Bluetooth Mesh samples
----------------------

Expand Down Expand Up @@ -556,6 +560,9 @@ Bluetooth libraries and services
* Updated the :c:func:`bt_hogp_rep_read` function to forward the GATT read error code through the registered user callback.
This ensures that API user is aware of the error.

* :ref:`bt_fast_pair_readme` library:
* Added support in build system for devices that do not support the :ref:`partition_manager`.

Common Application Framework
----------------------------

Expand Down Expand Up @@ -646,7 +653,8 @@ This section provides detailed lists of changes by :ref:`integration <integratio
Google Fast Pair integration
----------------------------

|no_changes_yet_note|
* Added instruction on how to provision the Fast Pair data onto devices without the :ref:`partition_manager` support.
The :ref:`zephyr:nrf54h20dk_nrf54h20` board target is the only example of such device.

Edge Impulse integration
------------------------
Expand Down
2 changes: 1 addition & 1 deletion scripts/nrf_provision/fast_pair/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ The ID and the key are required by the Google Fast Pair Service and are provided
The magic data with predefined value is placed right before the mentioned provisioning data.
The SHA-256 hash is calculated using the magic data and the provisioning data, and then placed right after the provisioning data to ensure data integrity.

The generated data must be placed on a dedicated ``bt_fast_pair`` partition defined by the :ref:`partition_manager`.
The generated data must be placed on a dedicated Fast Pair partition defined by the build system.
The :ref:`bt_fast_pair_readme` knows both the offset sizes and lengths of the individual data fields in the provisioning data.
The service accesses the data by reading flash content.
The service calculates the hash on its own and checks whether it matches the hash stored on the partition.
Expand Down

0 comments on commit 64b6671

Please sign in to comment.