Skip to content

Commit 509cb57

Browse files
committed
sysbuild: fast_pair: add Model ID and Anti-Spoofing Key Kconfig options
Replaced the SB_CONFIG_BT_FAST_PAIR sysbuild Kconfig option with the following Kconfig options: * SB_CONFIG_BT_FAST_PAIR_MODEL_ID * SB_CONFIG_BT_FAST_PAIR_ANTI_SPOOFING_PRIVATE_KEY If both options are populated, the sysbuild sets the promptless SB_CONFIG_BT_FAST_PAIR_PROV_DATA Kconfig option. This Kconfig option triggers generation of the Fast Pair provisioning data hex, which is merged with the final hex used during firmware upload (merged.hex). This change limits the sysbuild scope for the Fast Pair category. Sysbuild can only be used to manage the Fast Pair provisioning data New options do not enable the overall Fast Pair subsystem anymore in the default image like the old SB_CONFIG_BT_FAST_PAIR Kconfig did. Improved validation of the Fast Pair partition definition. Aligned all Fast Pair projects to follow the new scheme. Ref: NCSDK-32057 Signed-off-by: Kamil Piszczek <[email protected]>
1 parent 9add5a1 commit 509cb57

File tree

22 files changed

+189
-134
lines changed

22 files changed

+189
-134
lines changed

applications/nrf_desktop/configuration/nrf52840dk_nrf52840/sysbuild_fast_pair.conf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
#
2-
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# Copyright (c) 2024-2025 Nordic Semiconductor ASA
33
#
44
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
#
66
################################################################################
77

8-
SB_CONFIG_BT_FAST_PAIR=y
8+
# The Anti-Spoofing Private Key is confidential and must be handled securely.
9+
# The following key is only used for demonstration purposes and must not be used in production.
10+
SB_CONFIG_BT_FAST_PAIR_ANTI_SPOOFING_PRIVATE_KEY="dZxFzP7X9CcfLPC0apyRkmgsh3n2EbWo9NFNXfVuxAM="
11+
SB_CONFIG_BT_FAST_PAIR_MODEL_ID=0x8E717D
12+
913
SB_CONFIG_BOOTLOADER_MCUBOOT=y
1014
SB_CONFIG_MCUBOOT_MODE_DIRECT_XIP=y
1115
SB_CONFIG_BOOT_SIGNATURE_TYPE_RSA=y

applications/nrf_desktop/configuration/nrf52840gmouse_nrf52840/sysbuild_fast_pair.conf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
#
2-
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# Copyright (c) 2024-2025 Nordic Semiconductor ASA
33
#
44
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
#
66
################################################################################
77

8-
SB_CONFIG_BT_FAST_PAIR=y
8+
# The Anti-Spoofing Private Key is confidential and must be handled securely.
9+
# The following key is only used for demonstration purposes and must not be used in production.
10+
SB_CONFIG_BT_FAST_PAIR_ANTI_SPOOFING_PRIVATE_KEY="dZxFzP7X9CcfLPC0apyRkmgsh3n2EbWo9NFNXfVuxAM="
11+
SB_CONFIG_BT_FAST_PAIR_MODEL_ID=0x8E717D
12+
913
SB_CONFIG_BOOTLOADER_MCUBOOT=y
1014
SB_CONFIG_MCUBOOT_MODE_DIRECT_XIP=y
1115
SB_CONFIG_BOOT_SIGNATURE_TYPE_RSA=y

applications/nrf_desktop/configuration/nrf52840gmouse_nrf52840/sysbuild_release_fast_pair.conf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
#
2-
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# Copyright (c) 2024-2025 Nordic Semiconductor ASA
33
#
44
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
#
66
################################################################################
77

8-
SB_CONFIG_BT_FAST_PAIR=y
8+
# The Anti-Spoofing Private Key is confidential and must be handled securely.
9+
# The following key is only used for demonstration purposes and must not be used in production.
10+
SB_CONFIG_BT_FAST_PAIR_ANTI_SPOOFING_PRIVATE_KEY="dZxFzP7X9CcfLPC0apyRkmgsh3n2EbWo9NFNXfVuxAM="
11+
SB_CONFIG_BT_FAST_PAIR_MODEL_ID=0x8E717D
12+
913
SB_CONFIG_BOOTLOADER_MCUBOOT=y
1014
SB_CONFIG_MCUBOOT_MODE_DIRECT_XIP=y
1115
SB_CONFIG_BOOT_SIGNATURE_TYPE_RSA=y

applications/nrf_desktop/configuration/nrf52kbd_nrf52832/sysbuild_release_fast_pair.conf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
#
2-
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# Copyright (c) 2024-2025 Nordic Semiconductor ASA
33
#
44
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
#
66
################################################################################
77

8-
SB_CONFIG_BT_FAST_PAIR=y
8+
# The Anti-Spoofing Private Key is confidential and must be handled securely.
9+
# The following key is only used for demonstration purposes and must not be used in production.
10+
SB_CONFIG_BT_FAST_PAIR_ANTI_SPOOFING_PRIVATE_KEY="8E8ulwhSIp/skZeg27xmWv2SxRxTOagypHrf2OdrhGY="
11+
SB_CONFIG_BT_FAST_PAIR_MODEL_ID=0x52FF02
12+
913
SB_CONFIG_BOOTLOADER_MCUBOOT=y
1014
SB_CONFIG_MCUBOOT_MODE_DIRECT_XIP=y
1115
SB_CONFIG_BOOT_SIGNATURE_TYPE_RSA=y

applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/sysbuild_release_fast_pair.conf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
#
66
################################################################################
77

8-
SB_CONFIG_BT_FAST_PAIR=y
8+
# The Anti-Spoofing Private Key is confidential and must be handled securely.
9+
# The following key is only used for demonstration purposes and must not be used in production.
10+
SB_CONFIG_BT_FAST_PAIR_ANTI_SPOOFING_PRIVATE_KEY="dZxFzP7X9CcfLPC0apyRkmgsh3n2EbWo9NFNXfVuxAM="
11+
SB_CONFIG_BT_FAST_PAIR_MODEL_ID=0x8E717D
12+
913
SB_CONFIG_BOOTLOADER_MCUBOOT=y
1014
SB_CONFIG_MCUBOOT_MODE_DIRECT_XIP=y
1115
SB_CONFIG_BOOT_SIGNATURE_TYPE_ED25519=y

applications/nrf_desktop/configuration/nrf54l15dk_nrf54l10_cpuapp/sysbuild_fast_pair.conf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
#
66
################################################################################
77

8-
SB_CONFIG_BT_FAST_PAIR=y
8+
# The Anti-Spoofing Private Key is confidential and must be handled securely.
9+
# The following key is only used for demonstration purposes and must not be used in production.
10+
SB_CONFIG_BT_FAST_PAIR_ANTI_SPOOFING_PRIVATE_KEY="dZxFzP7X9CcfLPC0apyRkmgsh3n2EbWo9NFNXfVuxAM="
11+
SB_CONFIG_BT_FAST_PAIR_MODEL_ID=0x8E717D
12+
913
SB_CONFIG_BOOTLOADER_MCUBOOT=y
1014
SB_CONFIG_MCUBOOT_MODE_DIRECT_XIP=y
1115
SB_CONFIG_BOOT_SIGNATURE_TYPE_ED25519=y

applications/nrf_desktop/configuration/nrf54l15dk_nrf54l15_cpuapp/sysbuild_fast_pair.conf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
#
2-
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# Copyright (c) 2024-2025 Nordic Semiconductor ASA
33
#
44
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
#
66
################################################################################
77

8-
SB_CONFIG_BT_FAST_PAIR=y
8+
# The Anti-Spoofing Private Key is confidential and must be handled securely.
9+
# The following key is only used for demonstration purposes and must not be used in production.
10+
SB_CONFIG_BT_FAST_PAIR_ANTI_SPOOFING_PRIVATE_KEY="dZxFzP7X9CcfLPC0apyRkmgsh3n2EbWo9NFNXfVuxAM="
11+
SB_CONFIG_BT_FAST_PAIR_MODEL_ID=0x8E717D
12+
913
SB_CONFIG_BOOTLOADER_MCUBOOT=y
1014
SB_CONFIG_MCUBOOT_MODE_DIRECT_XIP=y
1115
SB_CONFIG_BOOT_SIGNATURE_TYPE_ED25519=y

applications/nrf_desktop/sample.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ tests:
8383
- nrf54l15dk/nrf54l15/cpuapp
8484
extra_args:
8585
- FILE_SUFFIX=fast_pair
86-
- FP_MODEL_ID=0x8E717D
87-
- FP_ANTI_SPOOFING_KEY=dZxFzP7X9CcfLPC0apyRkmgsh3n2EbWo9NFNXfVuxAM=
8886
timeout: 180
8987
harness: pytest
9088
applications.nrf_desktop.zdebug_fast_pair.gmouse:
@@ -97,8 +95,6 @@ tests:
9795
- nrf52840gmouse/nrf52840
9896
extra_args:
9997
- FILE_SUFFIX=fast_pair
100-
- FP_MODEL_ID=0x8E717D
101-
- FP_ANTI_SPOOFING_KEY=dZxFzP7X9CcfLPC0apyRkmgsh3n2EbWo9NFNXfVuxAM=
10298
applications.nrf_desktop.zdebug_mcuboot_qspi:
10399
build_only: true
104100
platform_allow: nrf52840dk/nrf52840
@@ -234,8 +230,6 @@ tests:
234230
- nrf52kbd/nrf52832
235231
extra_args:
236232
- FILE_SUFFIX=release_fast_pair
237-
- FP_MODEL_ID=0x52FF02
238-
- FP_ANTI_SPOOFING_KEY=8E8ulwhSIp/skZeg27xmWv2SxRxTOagypHrf2OdrhGY=
239233
applications.nrf_desktop.zrelease_fast_pair.gmouse:
240234
build_only: true
241235
platform_allow:
@@ -246,8 +240,6 @@ tests:
246240
- nrf54l15dk/nrf54l05/cpuapp
247241
extra_args:
248242
- FILE_SUFFIX=release_fast_pair
249-
- FP_MODEL_ID=0x8E717D
250-
- FP_ANTI_SPOOFING_KEY=dZxFzP7X9CcfLPC0apyRkmgsh3n2EbWo9NFNXfVuxAM=
251243
applications.nrf_desktop.zrelease_4llpmconn:
252244
build_only: true
253245
platform_allow: nrf52840dongle/nrf52840

cmake/sysbuild/fast_pair_hex.cmake renamed to cmake/sysbuild/fast_pair/hex.cmake

Lines changed: 52 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,27 @@
11
#
2-
# Copyright (c) 2022-2024 Nordic Semiconductor
2+
# Copyright (c) 2022-2025 Nordic Semiconductor
33
#
44
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
#
66

77
function(fast_pair_hex_pm)
88
set(fp_partition_name bt_fast_pair)
99

10+
set(fp_partition_pm_config_name $<TARGET_PROPERTY:partition_manager,PM_BT_FAST_PAIR_NAME>)
11+
12+
add_custom_target(
13+
fast_pair_hex_pm_partition_validation
14+
ALL
15+
DEPENDS
16+
${APPLICATION_BINARY_DIR}/pm.config
17+
COMMAND
18+
${CMAKE_COMMAND} -D FP_PARTITION_NAME=${fp_partition_name} -D FP_PARTITION_PM_CONFIG_NAME=${fp_partition_pm_config_name} -P ${ZEPHYR_NRF_MODULE_DIR}/cmake/sysbuild/fast_pair/pm_partition_validation.cmake
19+
WORKING_DIRECTORY
20+
${APPLICATION_BINARY_DIR}
21+
COMMENT
22+
"Validating Fast Pair partition configuration for the provisioning data hex file"
23+
)
24+
1025
set(
1126
fp_provisioning_data_hex
1227
${CMAKE_BINARY_DIR}/modules/nrf/subsys/bluetooth/services/fast_pair/fp_provisioning_data.hex
@@ -18,11 +33,13 @@ function(fast_pair_hex_pm)
1833
OUTPUT
1934
${fp_provisioning_data_hex}
2035
DEPENDS
21-
"${APPLICATION_BINARY_DIR}/pm.config"
36+
fast_pair_hex_pm_partition_validation
2237
COMMAND
2338
${PYTHON_EXECUTABLE} ${ZEPHYR_NRF_MODULE_DIR}/scripts/nrf_provision/fast_pair/fp_provision_cli.py
24-
-o ${fp_provisioning_data_hex} -a ${fp_provisioning_data_address}
25-
-m ${FP_MODEL_ID} -k ${FP_ANTI_SPOOFING_KEY}
39+
-o ${fp_provisioning_data_hex}
40+
-a ${fp_provisioning_data_address}
41+
-m ${SB_CONFIG_BT_FAST_PAIR_MODEL_ID}
42+
-k ${SB_CONFIG_BT_FAST_PAIR_ANTI_SPOOFING_PRIVATE_KEY}
2643
COMMENT
2744
"Generating Fast Pair provisioning data hex file"
2845
USES_TERMINAL
@@ -60,7 +77,7 @@ function(dt_get_parent parent_full_path node_full_path)
6077
endfunction()
6178

6279
function(fast_pair_hex_dts)
63-
include(${CMAKE_CURRENT_LIST_DIR}/suit_utilities.cmake)
80+
include(${CMAKE_CURRENT_LIST_DIR}/../suit_utilities.cmake)
6481

6582
if(NOT SB_CONFIG_SOC_SERIES_NRF54HX)
6683
message(FATAL_ERROR "Fast Pair data provisioning using DTS partitions is only supported"
@@ -77,6 +94,13 @@ function(fast_pair_hex_dts)
7794
"${fp_partition_name}"
7895
)
7996

97+
if(NOT bt_fast_pair_partition_node_full_path)
98+
message(FATAL_ERROR
99+
"The `bt_fast_pair_partition` partition node is not defined in DTS. "
100+
"Please define the Fast Pair partition to use the automatic provisioning "
101+
"data generation with the SB_CONFIG_BT_FAST_PAIR_PROV_DATA Kconfig.")
102+
endif()
103+
80104
sysbuild_dt_reg_addr(
81105
bt_fast_pair_partition_relative_address
82106
IMAGE
@@ -124,8 +148,10 @@ function(fast_pair_hex_dts)
124148
${fp_provisioning_data_hex}
125149
COMMAND
126150
${PYTHON_EXECUTABLE} ${ZEPHYR_NRF_MODULE_DIR}/scripts/nrf_provision/fast_pair/fp_provision_cli.py
127-
-o ${fp_provisioning_data_hex} -a ${fp_provisioning_data_address}
128-
-m ${FP_MODEL_ID} -k ${FP_ANTI_SPOOFING_KEY}
151+
-o ${fp_provisioning_data_hex}
152+
-a ${fp_provisioning_data_address}
153+
-m ${SB_CONFIG_BT_FAST_PAIR_MODEL_ID}
154+
-k ${SB_CONFIG_BT_FAST_PAIR_ANTI_SPOOFING_PRIVATE_KEY}
129155
COMMENT
130156
"Generating Fast Pair provisioning data hex file"
131157
USES_TERMINAL
@@ -143,6 +169,25 @@ function(fast_pair_hex_dts)
143169
)
144170
endfunction()
145171

172+
function(fast_pair_device_model_warning)
173+
# Emit a warning when using a Nordic owned demo Fast Pair device Model ID.
174+
# These Model IDs are used by Fast Pair applications/samples in the nRF Connect SDK.
175+
if(SB_CONFIG_BT_FAST_PAIR_MODEL_ID EQUAL 0x2A410B OR
176+
SB_CONFIG_BT_FAST_PAIR_MODEL_ID EQUAL 0x4A436B OR
177+
SB_CONFIG_BT_FAST_PAIR_MODEL_ID EQUAL 0x52FF02 OR
178+
SB_CONFIG_BT_FAST_PAIR_MODEL_ID EQUAL 0x8E717D)
179+
message(WARNING "
180+
-------------------------------------------------------
181+
--- WARNING: Using demo Fast Pair Model ID and Fast ---
182+
--- Pair Anti-Spoofing Key, it should not be used ---
183+
--- for production. ---
184+
-------------------------------------------------------
185+
\n"
186+
)
187+
endif()
188+
endfunction()
189+
190+
fast_pair_device_model_warning()
146191
if(SB_CONFIG_PARTITION_MANAGER)
147192
fast_pair_hex_pm()
148193
else()
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
if(NOT "${FP_PARTITION_NAME}" STREQUAL "${FP_PARTITION_PM_CONFIG_NAME}")
8+
message(FATAL_ERROR
9+
"\nThe `bt_fast_pair` partition is not defined in the Partition Manager yaml "
10+
"file. Please define the Fast Pair partition to use the automatic provisioning "
11+
"data generation with the SB_CONFIG_BT_FAST_PAIR_PROV_DATA Kconfig. The partition "
12+
"must be statically defined with the pm_static.yml file when the "
13+
"CONFIG_BT_FAST_PAIR Kconfig is not enabled in the default image.")
14+
endif()

0 commit comments

Comments
 (0)