From 5d1bf31d030b5d7db7ed612d9e23252f477bad39 Mon Sep 17 00:00:00 2001 From: Olivier Lorente Date: Tue, 19 Nov 2024 13:30:11 +0100 Subject: [PATCH 1/3] Renaming prior to the delivery of the work about "NFC Commissioning". In current code, "NFC Commissioning" was used for Onboarding data put into an NFC Tag. This naming will create confusion with the new "NFC Commissioning" feature where NFC is used for all the first phase of the commissioning. We propose to use the folllowing names: - "NFC onboarding" when an NFC Tag is used to store the onboarding data (as an alternate solution to QRCode) - "NFC commissioning" when an NFC Tag is used to perform the first commissioning phase (as an alternate solution to BLE) Defines, variables and files have been renamed to reflect this. The following renaming have been done: - CHIP_DEVICE_CONFIG_ENABLE_NFC -> CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING - CONFIG_CHIP_NFC_COMMISSIONING -> CONFIG_CHIP_NFC_ONBOARDING - chip_enable_nfc -> chip_enable_nfc_onboarding - NFCManager -> NFCOnboardingManager - NFCManagerImpl -> NFCOnboardingManagerImpl - NFCMgr -> NFCOnboardingMgr - NFCMgrImpl -> NFCOnboardingMgrImpl The following files have been renamed for the platforms Zephyr, nrfconnect, nxp/k32w0 and telink: NFCManagerImpl.cpp -> NFCOnboardingManagerImpl.cpp NFCManagerImpl.h -> NFCOnboardingManagerImpl.h NFCManager.h -> NFCOnboardingManager.h --- config/nrfconnect/chip-module/CMakeLists.txt | 4 +- config/qpg/chip-gn/args.gni | 2 +- config/telink/chip-module/CMakeLists.txt | 4 +- .../nrf/nrfconnect_examples_configuration.md | 8 +-- .../nrfconnect/main/AppTask.cpp | 6 +- .../nrfconnect/main/AppTask.cpp | 6 +- .../nxp/k32w0/main/AppTask.cpp | 8 +-- .../k32w1/include/config/CHIPProjectConfig.h | 8 +-- .../mcxw71/include/config/CHIPProjectConfig.h | 8 +-- .../nrfconnect/main/AppTask.cpp | 6 +- .../lighting-app/nrfconnect/main/AppTask.cpp | 6 +- .../lighting-app/nxp/k32w0/main/AppTask.cpp | 8 +-- .../k32w1/include/config/CHIPProjectConfig.h | 8 +-- .../mcxw71/include/config/CHIPProjectConfig.h | 8 +-- .../lit-icd-app/nrfconnect/main/AppTask.cpp | 6 +- examples/lock-app/nrfconnect/main/AppTask.cpp | 6 +- .../lock-app/nxp/k32w/k32w0/main/AppTask.cpp | 8 +-- .../k32w1/include/config/CHIPProjectConfig.h | 8 +-- .../mcxw71/include/config/CHIPProjectConfig.h | 8 +-- .../telink/common/src/AppTaskCommon.cpp | 6 +- examples/pump-app/nrfconnect/main/AppTask.cpp | 6 +- .../nrfconnect/main/AppTask.cpp | 6 +- .../window-app/nrfconnect/main/AppTask.cpp | 6 +- src/app/server/OnboardingCodesUtil.cpp | 4 +- src/include/platform/CHIPDeviceConfig.h | 6 +- src/include/platform/CHIPDeviceLayer.h | 4 +- .../{NFCManager.h => NFCOnboardingManager.h} | 58 +++++++++---------- .../internal/GenericPlatformManagerImpl.ipp | 8 +-- src/lib/shell/Engine.cpp | 2 +- src/lib/shell/commands/BUILD.gn | 2 +- src/lib/shell/commands/NFC.cpp | 4 +- src/platform/BUILD.gn | 6 +- src/platform/Zephyr/BUILD.gn | 6 +- ...rImpl.cpp => NFCOnboardingManagerImpl.cpp} | 10 ++-- ...nagerImpl.h => NFCOnboardingManagerImpl.h} | 22 +++---- src/platform/device.gni | 4 +- src/platform/nrfconnect/BUILD.gn | 6 +- ...nagerImpl.h => NFCOnboardingManagerImpl.h} | 4 +- .../nxp/common/ble/BLEManagerCommon.cpp | 2 +- src/platform/nxp/k32w0/BUILD.gn | 4 +- ...rImpl.cpp => NFCOnboardingManagerImpl.cpp} | 26 ++++----- ...nagerImpl.h => NFCOnboardingManagerImpl.h} | 22 +++---- src/platform/stm32/args.gni | 4 +- src/platform/telink/BUILD.gn | 6 +- ...rImpl.cpp => NFCOnboardingManagerImpl.cpp} | 10 ++-- ...nagerImpl.h => NFCOnboardingManagerImpl.h} | 20 +++---- 46 files changed, 195 insertions(+), 195 deletions(-) rename src/include/platform/{NFCManager.h => NFCOnboardingManager.h} (57%) rename src/platform/Zephyr/{NFCManagerImpl.cpp => NFCOnboardingManagerImpl.cpp} (90%) rename src/platform/Zephyr/{NFCManagerImpl.h => NFCOnboardingManagerImpl.h} (66%) rename src/platform/nrfconnect/{NFCManagerImpl.h => NFCOnboardingManagerImpl.h} (83%) rename src/platform/nxp/k32w0/{NFCManagerImpl.cpp => NFCOnboardingManagerImpl.cpp} (90%) rename src/platform/nxp/k32w0/{NFCManagerImpl.h => NFCOnboardingManagerImpl.h} (80%) rename src/platform/telink/{NFCManagerImpl.cpp => NFCOnboardingManagerImpl.cpp} (88%) rename src/platform/telink/{NFCManagerImpl.h => NFCOnboardingManagerImpl.h} (70%) diff --git a/config/nrfconnect/chip-module/CMakeLists.txt b/config/nrfconnect/chip-module/CMakeLists.txt index 448287f0ecd4cf..fa6b3d1904f1bb 100644 --- a/config/nrfconnect/chip-module/CMakeLists.txt +++ b/config/nrfconnect/chip-module/CMakeLists.txt @@ -88,7 +88,7 @@ matter_add_cxxflags(${ZEPHYR_GNU_CPP_STD}) # Set up custom OpenThread configuration if (CONFIG_CHIP_OPENTHREAD_CONFIG) - get_filename_component(CHIP_OPENTHREAD_CONFIG + get_filename_component(CHIP_OPENTHREAD_CONFIG ${CONFIG_CHIP_OPENTHREAD_CONFIG} REALPATH BASE_DIR ${CMAKE_SOURCE_DIR} @@ -125,7 +125,7 @@ matter_add_gn_arg_bool ("chip_enable_openthread" CONFIG_NET_L2_ matter_add_gn_arg_bool ("chip_openthread_ftd" CONFIG_OPENTHREAD_FTD) matter_add_gn_arg_bool ("chip_config_network_layer_ble" CONFIG_BT) matter_add_gn_arg_bool ("chip_inet_config_enable_ipv4" CONFIG_CHIP_IPV4) -matter_add_gn_arg_bool ("chip_enable_nfc" CONFIG_CHIP_NFC_COMMISSIONING) +matter_add_gn_arg_bool ("chip_enable_nfc_onboarding" CONFIG_CHIP_NFC_ONBOARDING) matter_add_gn_arg_bool ("chip_enable_ota_requestor" CONFIG_CHIP_OTA_REQUESTOR) matter_add_gn_arg_bool ("chip_persist_subscriptions" CONFIG_CHIP_PERSISTENT_SUBSCRIPTIONS) matter_add_gn_arg_bool ("chip_monolithic_tests" CONFIG_CHIP_BUILD_TESTS) diff --git a/config/qpg/chip-gn/args.gni b/config/qpg/chip-gn/args.gni index cccb41016a6bd2..2dea35a73b14bf 100644 --- a/config/qpg/chip-gn/args.gni +++ b/config/qpg/chip-gn/args.gni @@ -24,7 +24,7 @@ lwip_debug = false chip_enable_openthread = true chip_config_network_layer_ble = true chip_inet_config_enable_ipv4 = false -chip_enable_nfc = false +chip_enable_nfc_onboarding = false chip_build_tests = false chip_monolithic_tests = false chip_inet_config_enable_tcp_endpoint = false diff --git a/config/telink/chip-module/CMakeLists.txt b/config/telink/chip-module/CMakeLists.txt index ade2bd310f8a02..d195b558b695f4 100644 --- a/config/telink/chip-module/CMakeLists.txt +++ b/config/telink/chip-module/CMakeLists.txt @@ -69,7 +69,7 @@ matter_add_flags(-DMBEDTLS_USER_CONFIG_FILE=) # Set up custom OpenThread configuration if (CONFIG_CHIP_OPENTHREAD_CONFIG) - get_filename_component(CHIP_OPENTHREAD_CONFIG + get_filename_component(CHIP_OPENTHREAD_CONFIG ${CONFIG_CHIP_OPENTHREAD_CONFIG} REALPATH BASE_DIR ${CMAKE_SOURCE_DIR} @@ -96,7 +96,7 @@ matter_add_gn_arg_bool ("chip_enable_openthread" CONFIG_NET_L2_ matter_add_gn_arg_bool ("chip_openthread_ftd" CONFIG_OPENTHREAD_FTD) matter_add_gn_arg_bool ("chip_config_network_layer_ble" CONFIG_BT) matter_add_gn_arg_bool ("chip_inet_config_enable_ipv4" CONFIG_CHIP_IPV4) -matter_add_gn_arg_bool ("chip_enable_nfc" CONFIG_CHIP_NFC_COMMISSIONING) +matter_add_gn_arg_bool ("chip_enable_nfc_onboarding" CONFIG_CHIP_NFC_ONBOARDING) matter_add_gn_arg_bool ("chip_enable_ota_requestor" CONFIG_CHIP_OTA_REQUESTOR) matter_add_gn_arg_bool ("chip_inet_config_enable_tcp_endpoint" FALSE) matter_add_gn_arg_bool ("chip_error_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 1) diff --git a/docs/platforms/nrf/nrfconnect_examples_configuration.md b/docs/platforms/nrf/nrfconnect_examples_configuration.md index d2a135ebdf6d9a..212b99736dfb0b 100644 --- a/docs/platforms/nrf/nrfconnect_examples_configuration.md +++ b/docs/platforms/nrf/nrfconnect_examples_configuration.md @@ -194,13 +194,13 @@ intervals: - `CONFIG_CHIP_ICD_SLOW_POLL_INTERVAL` - `CONFIG_CHIP_ICD_FAST_POLLING_INTERVAL` -#### Commissioning with NFC support +#### Onboarding with NFC support -You can configure the Matter protocol to use an NFC tag for commissioning, +You can configure the Matter protocol to use an NFC tag for onboarding, instead of using a QR code, which is the default configuration. -To enable NFC for commissioning and share the onboarding payload in an NFC tag, -set the `CONFIG_CHIP_NFC_COMMISSIONING` option. +To enable NFC for onboarding and share the onboarding payload in an NFC tag, +set the `CONFIG_CHIP_NFC_ONBOARDING` option. #### Factory reset behavior diff --git a/examples/all-clusters-app/nrfconnect/main/AppTask.cpp b/examples/all-clusters-app/nrfconnect/main/AppTask.cpp index 067e8113c4138a..c205d64929fbce 100644 --- a/examples/all-clusters-app/nrfconnect/main/AppTask.cpp +++ b/examples/all-clusters-app/nrfconnect/main/AppTask.cpp @@ -487,10 +487,10 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */ switch (event->Type) { case DeviceEventType::kCHIPoBLEAdvertisingChange: -#ifdef CONFIG_CHIP_NFC_COMMISSIONING +#ifdef CONFIG_CHIP_NFC_ONBOARDING if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Started) { - if (NFCMgr().IsTagEmulationStarted()) + if (NFCOnboardingMgr().IsTagEmulationStarted()) { LOG_INF("NFC Tag emulation is already started"); } @@ -501,7 +501,7 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */ } else if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Stopped) { - NFCMgr().StopTagEmulation(); + NFCOnboardingMgr().StopTagEmulation(); } #endif sHaveBLEConnections = ConnectivityMgr().NumBLEConnections() != 0; diff --git a/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp b/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp index be858eae561921..d0e73d946be197 100644 --- a/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp +++ b/examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp @@ -406,10 +406,10 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */ switch (event->Type) { case DeviceEventType::kCHIPoBLEAdvertisingChange: -#ifdef CONFIG_CHIP_NFC_COMMISSIONING +#ifdef CONFIG_CHIP_NFC_ONBOARDING if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Started) { - if (NFCMgr().IsTagEmulationStarted()) + if (NFCOnboardingMgr().IsTagEmulationStarted()) { LOG_INF("NFC Tag emulation is already started"); } @@ -420,7 +420,7 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */ } else if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Stopped) { - NFCMgr().StopTagEmulation(); + NFCOnboardingMgr().StopTagEmulation(); } #endif sHaveBLEConnections = ConnectivityMgr().NumBLEConnections() != 0; diff --git a/examples/contact-sensor-app/nxp/k32w0/main/AppTask.cpp b/examples/contact-sensor-app/nxp/k32w0/main/AppTask.cpp index 40ffd9d8bff252..89173858a3fce3 100644 --- a/examples/contact-sensor-app/nxp/k32w0/main/AppTask.cpp +++ b/examples/contact-sensor-app/nxp/k32w0/main/AppTask.cpp @@ -779,23 +779,23 @@ void AppTask::MatterEventHandler(const ChipDeviceEvent * event, intptr_t) } #endif -#if CONFIG_CHIP_NFC_COMMISSIONING +#if CONFIG_CHIP_NFC_ONBOARDING if (event->Type == DeviceEventType::kCHIPoBLEAdvertisingChange && event->CHIPoBLEAdvertisingChange.Result == kActivity_Stopped) { - if (!NFCMgr().IsTagEmulationStarted()) + if (!NFCOnboardingMgr().IsTagEmulationStarted()) { K32W_LOG("NFC Tag emulation is already stopped!"); } else { - NFCMgr().StopTagEmulation(); + NFCOnboardingMgr().StopTagEmulation(); K32W_LOG("Stopped NFC Tag Emulation!"); } } else if (event->Type == DeviceEventType::kCHIPoBLEAdvertisingChange && event->CHIPoBLEAdvertisingChange.Result == kActivity_Started) { - if (NFCMgr().IsTagEmulationStarted()) + if (NFCOnboardingMgr().IsTagEmulationStarted()) { K32W_LOG("NFC Tag emulation is already started!"); } diff --git a/examples/contact-sensor-app/nxp/k32w1/include/config/CHIPProjectConfig.h b/examples/contact-sensor-app/nxp/k32w1/include/config/CHIPProjectConfig.h index a16c1bb8b3341c..f4617219ece59e 100644 --- a/examples/contact-sensor-app/nxp/k32w1/include/config/CHIPProjectConfig.h +++ b/examples/contact-sensor-app/nxp/k32w1/include/config/CHIPProjectConfig.h @@ -173,12 +173,12 @@ #define CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT (15 * 60 * 1000) /** - * CONFIG_CHIP_NFC_COMMISSIONING, CHIP_DEVICE_CONFIG_ENABLE_NFC + * CONFIG_CHIP_NFC_ONBOARDING, CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING * - * NFC commissioning is not supported on K32W1 + * NFC onboarding is not supported on K32W1 */ -#define CONFIG_CHIP_NFC_COMMISSIONING 0 -#define CHIP_DEVICE_CONFIG_ENABLE_NFC 0 +#define CONFIG_CHIP_NFC_ONBOARDING 0 +#define CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING 0 /** * @def CHIP_CONFIG_MAX_FABRICS diff --git a/examples/contact-sensor-app/nxp/mcxw71/include/config/CHIPProjectConfig.h b/examples/contact-sensor-app/nxp/mcxw71/include/config/CHIPProjectConfig.h index 9e5cee6eb7b695..563177d248a79e 100644 --- a/examples/contact-sensor-app/nxp/mcxw71/include/config/CHIPProjectConfig.h +++ b/examples/contact-sensor-app/nxp/mcxw71/include/config/CHIPProjectConfig.h @@ -172,12 +172,12 @@ #define CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT (15 * 60 * 1000) /** - * CONFIG_CHIP_NFC_COMMISSIONING, CHIP_DEVICE_CONFIG_ENABLE_NFC + * CONFIG_CHIP_NFC_ONBOARDING, CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING * - * NFC commissioning is not supported on K32W1 + * NFC onboarding is not supported on K32W1 */ -#define CONFIG_CHIP_NFC_COMMISSIONING 0 -#define CHIP_DEVICE_CONFIG_ENABLE_NFC 0 +#define CONFIG_CHIP_NFC_ONBOARDING 0 +#define CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING 0 /** * @def CHIP_CONFIG_MAX_FABRICS diff --git a/examples/light-switch-app/nrfconnect/main/AppTask.cpp b/examples/light-switch-app/nrfconnect/main/AppTask.cpp index fc1c947150dd95..c19b352012e509 100644 --- a/examples/light-switch-app/nrfconnect/main/AppTask.cpp +++ b/examples/light-switch-app/nrfconnect/main/AppTask.cpp @@ -466,10 +466,10 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */ { case DeviceEventType::kCHIPoBLEAdvertisingChange: UpdateStatusLED(); -#ifdef CONFIG_CHIP_NFC_COMMISSIONING +#ifdef CONFIG_CHIP_NFC_ONBOARDING if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Started) { - if (NFCMgr().IsTagEmulationStarted()) + if (NFCOnboardingMgr().IsTagEmulationStarted()) { LOG_INF("NFC Tag emulation is already started"); } @@ -480,7 +480,7 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */ } else if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Stopped) { - NFCMgr().StopTagEmulation(); + NFCOnboardingMgr().StopTagEmulation(); } #endif sHaveBLEConnections = ConnectivityMgr().NumBLEConnections() != 0; diff --git a/examples/lighting-app/nrfconnect/main/AppTask.cpp b/examples/lighting-app/nrfconnect/main/AppTask.cpp index 014849780caf06..3f43dd95f422df 100644 --- a/examples/lighting-app/nrfconnect/main/AppTask.cpp +++ b/examples/lighting-app/nrfconnect/main/AppTask.cpp @@ -593,10 +593,10 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */ switch (event->Type) { case DeviceEventType::kCHIPoBLEAdvertisingChange: -#ifdef CONFIG_CHIP_NFC_COMMISSIONING +#ifdef CONFIG_CHIP_NFC_ONBOARDING if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Started) { - if (NFCMgr().IsTagEmulationStarted()) + if (NFCOnboardingMgr().IsTagEmulationStarted()) { LOG_INF("NFC Tag emulation is already started"); } @@ -607,7 +607,7 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */ } else if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Stopped) { - NFCMgr().StopTagEmulation(); + NFCOnboardingMgr().StopTagEmulation(); } #endif sHaveBLEConnections = ConnectivityMgr().NumBLEConnections() != 0; diff --git a/examples/lighting-app/nxp/k32w0/main/AppTask.cpp b/examples/lighting-app/nxp/k32w0/main/AppTask.cpp index 2418ab85978eb2..8f2f194561ff1a 100644 --- a/examples/lighting-app/nxp/k32w0/main/AppTask.cpp +++ b/examples/lighting-app/nxp/k32w0/main/AppTask.cpp @@ -678,23 +678,23 @@ void AppTask::MatterEventHandler(const ChipDeviceEvent * event, intptr_t) } #endif -#if CONFIG_CHIP_NFC_COMMISSIONING +#if CONFIG_CHIP_NFC_ONBOARDING if (event->Type == DeviceEventType::kCHIPoBLEAdvertisingChange && event->CHIPoBLEAdvertisingChange.Result == kActivity_Stopped) { - if (!NFCMgr().IsTagEmulationStarted()) + if (!NFCOnboardingMgr().IsTagEmulationStarted()) { K32W_LOG("NFC Tag emulation is already stopped!"); } else { - NFCMgr().StopTagEmulation(); + NFCOnboardingMgr().StopTagEmulation(); K32W_LOG("Stopped NFC Tag Emulation!"); } } else if (event->Type == DeviceEventType::kCHIPoBLEAdvertisingChange && event->CHIPoBLEAdvertisingChange.Result == kActivity_Started) { - if (NFCMgr().IsTagEmulationStarted()) + if (NFCOnboardingMgr().IsTagEmulationStarted()) { K32W_LOG("NFC Tag emulation is already started!"); } diff --git a/examples/lighting-app/nxp/k32w1/include/config/CHIPProjectConfig.h b/examples/lighting-app/nxp/k32w1/include/config/CHIPProjectConfig.h index ad5d876dc650ab..fca3e518902439 100644 --- a/examples/lighting-app/nxp/k32w1/include/config/CHIPProjectConfig.h +++ b/examples/lighting-app/nxp/k32w1/include/config/CHIPProjectConfig.h @@ -188,12 +188,12 @@ #define CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT (15 * 60 * 1000) /** - * CONFIG_CHIP_NFC_COMMISSIONING, CHIP_DEVICE_CONFIG_ENABLE_NFC + * CONFIG_CHIP_NFC_ONBOARDING, CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING * - * NFC commissioning is not supported on K32W1 + * NFC onboarding is not supported on K32W1 */ -#define CONFIG_CHIP_NFC_COMMISSIONING 0 -#define CHIP_DEVICE_CONFIG_ENABLE_NFC 0 +#define CONFIG_CHIP_NFC_ONBOARDING 0 +#define CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING 0 /** * @def CHIP_CONFIG_MAX_FABRICS diff --git a/examples/lighting-app/nxp/mcxw71/include/config/CHIPProjectConfig.h b/examples/lighting-app/nxp/mcxw71/include/config/CHIPProjectConfig.h index 20f126aa23a0d5..0aa16730fcd8bb 100644 --- a/examples/lighting-app/nxp/mcxw71/include/config/CHIPProjectConfig.h +++ b/examples/lighting-app/nxp/mcxw71/include/config/CHIPProjectConfig.h @@ -188,12 +188,12 @@ #define CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT (15 * 60 * 1000) /** - * CONFIG_CHIP_NFC_COMMISSIONING, CHIP_DEVICE_CONFIG_ENABLE_NFC + * CONFIG_CHIP_NFC_ONBOARDING, CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING * - * NFC commissioning is not supported on K32W1 + * NFC onboarding is not supported on K32W1 */ -#define CONFIG_CHIP_NFC_COMMISSIONING 0 -#define CHIP_DEVICE_CONFIG_ENABLE_NFC 0 +#define CONFIG_CHIP_NFC_ONBOARDING 0 +#define CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING 0 /** * @def CHIP_CONFIG_MAX_FABRICS diff --git a/examples/lit-icd-app/nrfconnect/main/AppTask.cpp b/examples/lit-icd-app/nrfconnect/main/AppTask.cpp index 2fab2d91f83bb8..64546236462e48 100644 --- a/examples/lit-icd-app/nrfconnect/main/AppTask.cpp +++ b/examples/lit-icd-app/nrfconnect/main/AppTask.cpp @@ -487,10 +487,10 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */ switch (event->Type) { case DeviceEventType::kCHIPoBLEAdvertisingChange: -#ifdef CONFIG_CHIP_NFC_COMMISSIONING +#ifdef CONFIG_CHIP_NFC_ONBOARDING if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Started) { - if (NFCMgr().IsTagEmulationStarted()) + if (NFCOnboardingMgr().IsTagEmulationStarted()) { LOG_INF("NFC Tag emulation is already started"); } @@ -501,7 +501,7 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */ } else if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Stopped) { - NFCMgr().StopTagEmulation(); + NFCOnboardingMgr().StopTagEmulation(); } #endif sHaveBLEConnections = ConnectivityMgr().NumBLEConnections() != 0; diff --git a/examples/lock-app/nrfconnect/main/AppTask.cpp b/examples/lock-app/nrfconnect/main/AppTask.cpp index 1025a045184aee..8b9dc6bce4b90c 100644 --- a/examples/lock-app/nrfconnect/main/AppTask.cpp +++ b/examples/lock-app/nrfconnect/main/AppTask.cpp @@ -547,10 +547,10 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */ switch (event->Type) { case DeviceEventType::kCHIPoBLEAdvertisingChange: -#ifdef CONFIG_CHIP_NFC_COMMISSIONING +#ifdef CONFIG_CHIP_NFC_ONBOARDING if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Started) { - if (NFCMgr().IsTagEmulationStarted()) + if (NFCOnboardingMgr().IsTagEmulationStarted()) { LOG_INF("NFC Tag emulation is already started"); } @@ -561,7 +561,7 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */ } else if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Stopped) { - NFCMgr().StopTagEmulation(); + NFCOnboardingMgr().StopTagEmulation(); } #endif sHaveBLEConnections = ConnectivityMgr().NumBLEConnections() != 0; diff --git a/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp b/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp index 5880a6e07c784b..f6e89d383c842b 100644 --- a/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp @@ -608,23 +608,23 @@ void AppTask::MatterEventHandler(const ChipDeviceEvent * event, intptr_t) } } -#if CONFIG_CHIP_NFC_COMMISSIONING +#if CONFIG_CHIP_NFC_ONBOARDING if (event->Type == DeviceEventType::kCHIPoBLEAdvertisingChange && event->CHIPoBLEAdvertisingChange.Result == kActivity_Stopped) { - if (!NFCMgr().IsTagEmulationStarted()) + if (!NFCOnboardingMgr().IsTagEmulationStarted()) { K32W_LOG("NFC Tag emulation is already stopped!"); } else { - NFCMgr().StopTagEmulation(); + NFCOnboardingMgr().StopTagEmulation(); K32W_LOG("Stopped NFC Tag Emulation!"); } } else if (event->Type == DeviceEventType::kCHIPoBLEAdvertisingChange && event->CHIPoBLEAdvertisingChange.Result == kActivity_Started) { - if (NFCMgr().IsTagEmulationStarted()) + if (NFCOnboardingMgr().IsTagEmulationStarted()) { K32W_LOG("NFC Tag emulation is already started!"); } diff --git a/examples/lock-app/nxp/k32w1/include/config/CHIPProjectConfig.h b/examples/lock-app/nxp/k32w1/include/config/CHIPProjectConfig.h index 6bb18eef5a0fc9..4011f682750129 100644 --- a/examples/lock-app/nxp/k32w1/include/config/CHIPProjectConfig.h +++ b/examples/lock-app/nxp/k32w1/include/config/CHIPProjectConfig.h @@ -172,12 +172,12 @@ #define CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT (15 * 60 * 1000) /** - * CONFIG_CHIP_NFC_COMMISSIONING, CHIP_DEVICE_CONFIG_ENABLE_NFC + * CONFIG_CHIP_NFC_ONBOARDING, CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING * - * NFC commissioning is not supported on K32W1 + * NFC onboarding is not supported on K32W1 */ -#define CONFIG_CHIP_NFC_COMMISSIONING 0 -#define CHIP_DEVICE_CONFIG_ENABLE_NFC 0 +#define CONFIG_CHIP_NFC_ONBOARDING 0 +#define CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING 0 /** * @def CHIP_CONFIG_MAX_FABRICS diff --git a/examples/lock-app/nxp/mcxw71/include/config/CHIPProjectConfig.h b/examples/lock-app/nxp/mcxw71/include/config/CHIPProjectConfig.h index 984dd98b3adb6c..caf00db2041be0 100644 --- a/examples/lock-app/nxp/mcxw71/include/config/CHIPProjectConfig.h +++ b/examples/lock-app/nxp/mcxw71/include/config/CHIPProjectConfig.h @@ -172,12 +172,12 @@ #define CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT (15 * 60 * 1000) /** - * CONFIG_CHIP_NFC_COMMISSIONING, CHIP_DEVICE_CONFIG_ENABLE_NFC + * CONFIG_CHIP_NFC_ONBOARDING, CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING * - * NFC commissioning is not supported on K32W1 + * NFC onboarding is not supported on K32W1 */ -#define CONFIG_CHIP_NFC_COMMISSIONING 0 -#define CHIP_DEVICE_CONFIG_ENABLE_NFC 0 +#define CONFIG_CHIP_NFC_ONBOARDING 0 +#define CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING 0 /** * @def CHIP_CONFIG_MAX_FABRICS diff --git a/examples/platform/telink/common/src/AppTaskCommon.cpp b/examples/platform/telink/common/src/AppTaskCommon.cpp index de5faa974a4847..5bea9ad94bc751 100644 --- a/examples/platform/telink/common/src/AppTaskCommon.cpp +++ b/examples/platform/telink/common/src/AppTaskCommon.cpp @@ -727,10 +727,10 @@ void AppTaskCommon::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* case DeviceEventType::kCHIPoBLEAdvertisingChange: sHaveBLEConnections = ConnectivityMgr().NumBLEConnections() != 0; UpdateStatusLED(); -#ifdef CONFIG_CHIP_NFC_COMMISSIONING +#ifdef CONFIG_CHIP_NFC_ONBOARDING if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Started) { - if (NFCMgr().IsTagEmulationStarted()) + if (NFCOnboardingMgr().IsTagEmulationStarted()) { LOG_INF("NFC Tag emulation is already started"); } @@ -741,7 +741,7 @@ void AppTaskCommon::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* } else if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Stopped) { - NFCMgr().StopTagEmulation(); + NFCOnboardingMgr().StopTagEmulation(); } #endif break; diff --git a/examples/pump-app/nrfconnect/main/AppTask.cpp b/examples/pump-app/nrfconnect/main/AppTask.cpp index d5f4c6dc760e0e..66a4f4fd6727d3 100644 --- a/examples/pump-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-app/nrfconnect/main/AppTask.cpp @@ -468,10 +468,10 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */ switch (event->Type) { case DeviceEventType::kCHIPoBLEAdvertisingChange: -#ifdef CONFIG_CHIP_NFC_COMMISSIONING +#ifdef CONFIG_CHIP_NFC_ONBOARDING if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Started) { - if (NFCMgr().IsTagEmulationStarted()) + if (NFCOnboardingMgr().IsTagEmulationStarted()) { LOG_INF("NFC Tag emulation is already started"); } @@ -482,7 +482,7 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */ } else if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Stopped) { - NFCMgr().StopTagEmulation(); + NFCOnboardingMgr().StopTagEmulation(); } #endif sHaveBLEConnections = ConnectivityMgr().NumBLEConnections() != 0; diff --git a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp index ca79a41160a9d2..5c485e54eb78d8 100644 --- a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp @@ -442,10 +442,10 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */ switch (event->Type) { case DeviceEventType::kCHIPoBLEAdvertisingChange: -#ifdef CONFIG_CHIP_NFC_COMMISSIONING +#ifdef CONFIG_CHIP_NFC_ONBOARDING if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Started) { - if (NFCMgr().IsTagEmulationStarted()) + if (NFCOnboardingMgr().IsTagEmulationStarted()) { LOG_INF("NFC Tag emulation is already started"); } @@ -456,7 +456,7 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */ } else if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Stopped) { - NFCMgr().StopTagEmulation(); + NFCOnboardingMgr().StopTagEmulation(); } #endif sHaveBLEConnections = ConnectivityMgr().NumBLEConnections() != 0; diff --git a/examples/window-app/nrfconnect/main/AppTask.cpp b/examples/window-app/nrfconnect/main/AppTask.cpp index 5f971b67f9f9bf..86745d1cc2b248 100644 --- a/examples/window-app/nrfconnect/main/AppTask.cpp +++ b/examples/window-app/nrfconnect/main/AppTask.cpp @@ -561,10 +561,10 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */ switch (event->Type) { case DeviceEventType::kCHIPoBLEAdvertisingChange: -#ifdef CONFIG_CHIP_NFC_COMMISSIONING +#ifdef CONFIG_CHIP_NFC_ONBOARDING if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Started) { - if (NFCMgr().IsTagEmulationStarted()) + if (NFCOnboardingMgr().IsTagEmulationStarted()) { LOG_INF("NFC Tag emulation is already started"); } @@ -575,7 +575,7 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */ } else if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Stopped) { - NFCMgr().StopTagEmulation(); + NFCOnboardingMgr().StopTagEmulation(); } #endif sHaveBLEConnections = ConnectivityMgr().NumBLEConnections() != 0; diff --git a/src/app/server/OnboardingCodesUtil.cpp b/src/app/server/OnboardingCodesUtil.cpp index e851fb96aec332..e9dacda66cb925 100644 --- a/src/app/server/OnboardingCodesUtil.cpp +++ b/src/app/server/OnboardingCodesUtil.cpp @@ -88,7 +88,7 @@ void PrintQrCodeURL(const chip::MutableCharSpan qrCode) } } -#if CHIP_DEVICE_CONFIG_ENABLE_NFC +#if CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING void ShareQRCodeOverNFC(chip::RendezvousInformationFlags aRendezvousFlags) { // Get QR Code and emulate its content using NFC tag @@ -97,7 +97,7 @@ void ShareQRCodeOverNFC(chip::RendezvousInformationFlags aRendezvousFlags) ReturnOnFailure(GetQRCode(qrCode, chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE))); - ReturnOnFailure(NFCMgr().StartTagEmulation(qrCode.data(), qrCode.size())); + ReturnOnFailure(NFCOnboardingMgr().StartTagEmulation(qrCode.data(), qrCode.size())); } #endif diff --git a/src/include/platform/CHIPDeviceConfig.h b/src/include/platform/CHIPDeviceConfig.h index 87fdfad76a531c..c411a107102d21 100644 --- a/src/include/platform/CHIPDeviceConfig.h +++ b/src/include/platform/CHIPDeviceConfig.h @@ -1579,10 +1579,10 @@ static_assert(CHIP_DEVICE_CONFIG_BLE_EXT_ADVERTISING_INTERVAL_MIN <= CHIP_DEVICE #endif /** - * CHIP_DEVICE_CONFIG_ENABLE_NFC enables NFC communication for commissioning. + * CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING enables configuration of NFC onboarding payload. */ -#ifndef CHIP_DEVICE_CONFIG_ENABLE_NFC -#define CHIP_DEVICE_CONFIG_ENABLE_NFC 0 +#ifndef CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING +#define CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING 0 #endif /** diff --git a/src/include/platform/CHIPDeviceLayer.h b/src/include/platform/CHIPDeviceLayer.h index 5d4348cc269948..cb113334fbab1e 100644 --- a/src/include/platform/CHIPDeviceLayer.h +++ b/src/include/platform/CHIPDeviceLayer.h @@ -34,8 +34,8 @@ #if CHIP_DEVICE_CONFIG_ENABLE_THREAD #include #endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD -#if CHIP_DEVICE_CONFIG_ENABLE_NFC -#include +#if CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING +#include #endif namespace chip { diff --git a/src/include/platform/NFCManager.h b/src/include/platform/NFCOnboardingManager.h similarity index 57% rename from src/include/platform/NFCManager.h rename to src/include/platform/NFCOnboardingManager.h index 08a0dbbb9ce82e..5bec274666e00f 100644 --- a/src/include/platform/NFCManager.h +++ b/src/include/platform/NFCOnboardingManager.h @@ -29,20 +29,20 @@ namespace chip { namespace DeviceLayer { -class NFCManagerImpl; +class NFCOnboardingManagerImpl; /** - * @brief Defines an abstract interface for programming an NFC Tag. + * @brief Defines an abstract interface for programming onboarding data in an NFC Tag. * - * NFC Tag can be used in Project CHIP to share commissioning information such + * NFC Tag can be used in Project CHIP to share onboarding information such * as the device discriminator and PIN code with a commissioner. This class * provides an interface to set contents of a programmable NFC Tag. */ -class NFCManager +class NFCOnboardingManager { public: /** - * Initializes the NFCManager singleton object. + * Initializes the NFCOnboardingManager singleton object. * * @return CHIP_NO_ERROR On success. */ @@ -75,70 +75,70 @@ class NFCManager protected: // Construction/destruction limited to subclasses. - NFCManager() = default; - ~NFCManager() = default; + NFCOnboardingManager() = default; + ~NFCOnboardingManager() = default; // No copy, move or assignment. - NFCManager(const NFCManager &) = delete; - NFCManager(NFCManager &&) = delete; - void operator=(const NFCManager &) = delete; + NFCOnboardingManager(const NFCOnboardingManager &) = delete; + NFCOnboardingManager(NFCOnboardingManager &&) = delete; + void operator=(const NFCOnboardingManager &) = delete; - // NFCManager implementation getters. - NFCManagerImpl * Impl(); - const NFCManagerImpl * Impl() const; + // NFCOnboardingManager implementation getters. + NFCOnboardingManagerImpl * Impl(); + const NFCOnboardingManagerImpl * Impl() const; }; /** - * Returns a reference to the public interface of the NFCManager singleton object. + * Returns a reference to the public interface of the NFCOnboardingManager singleton object. */ -extern NFCManager & NFCMgr(); +extern NFCOnboardingManager & NFCOnboardingMgr(); /** - * Returns a reference to the platform-specific NFCManager singleton object. + * Returns a reference to the platform-specific NFCOnboardingManager singleton object. */ -extern NFCManagerImpl & NFCMgrImpl(); +extern NFCOnboardingManagerImpl & NFCOnboardingMgrImpl(); } // namespace DeviceLayer } // namespace chip -#ifdef EXTERNAL_NFCMANAGERIMPL_HEADER -#include EXTERNAL_NFCMANAGERIMPL_HEADER +#ifdef EXTERNAL_NFC_ONBOARDING_MANAGER_IMPL_HEADER +#include EXTERNAL_NFC_ONBOARDING_MANAGER_IMPL_HEADER #elif defined(CHIP_DEVICE_LAYER_TARGET) -#define NFCMANAGERIMPL_HEADER -#include NFCMANAGERIMPL_HEADER +#define NFC_ONBOARDING_MANAGER_IMPL_HEADER +#include NFC_ONBOARDING_MANAGER_IMPL_HEADER #endif // defined(CHIP_DEVICE_LAYER_TARGET) namespace chip { namespace DeviceLayer { -inline CHIP_ERROR NFCManager::Init() +inline CHIP_ERROR NFCOnboardingManager::Init() { return Impl()->_Init(); } -inline CHIP_ERROR NFCManager::StartTagEmulation(const char * payload, size_t payloadLength) +inline CHIP_ERROR NFCOnboardingManager::StartTagEmulation(const char * payload, size_t payloadLength) { return Impl()->_StartTagEmulation(payload, payloadLength); } -inline CHIP_ERROR NFCManager::StopTagEmulation() +inline CHIP_ERROR NFCOnboardingManager::StopTagEmulation() { return Impl()->_StopTagEmulation(); } -inline bool NFCManager::IsTagEmulationStarted() const +inline bool NFCOnboardingManager::IsTagEmulationStarted() const { return Impl()->_IsTagEmulationStarted(); } -inline NFCManagerImpl * NFCManager::Impl() +inline NFCOnboardingManagerImpl * NFCOnboardingManager::Impl() { - return static_cast(this); + return static_cast(this); } -inline const NFCManagerImpl * NFCManager::Impl() const +inline const NFCOnboardingManagerImpl * NFCOnboardingManager::Impl() const { - return static_cast(this); + return static_cast(this); } } // namespace DeviceLayer diff --git a/src/include/platform/internal/GenericPlatformManagerImpl.ipp b/src/include/platform/internal/GenericPlatformManagerImpl.ipp index 589dd4ccbe4584..0701d79a1a5f6f 100644 --- a/src/include/platform/internal/GenericPlatformManagerImpl.ipp +++ b/src/include/platform/internal/GenericPlatformManagerImpl.ipp @@ -119,11 +119,11 @@ CHIP_ERROR GenericPlatformManagerImpl::_InitChipStack() } SuccessOrExit(err); - // Initialize the NFC Manager. -#if CHIP_DEVICE_CONFIG_ENABLE_NFC - err = NFCMgr().Init(); + // Initialize the CHIP NFC manager for NFC Onboarding +#if CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING + err = NFCOnboardingMgr().Init(); VerifyOrExit(err == CHIP_NO_ERROR, - ChipLogError(DeviceLayer, "NFC Manager initialization failed: %" CHIP_ERROR_FORMAT, err.Format())); + ChipLogError(DeviceLayer, "NFC Onboarding Manager initialization failed: %" CHIP_ERROR_FORMAT, err.Format())); #endif // TODO Initialize CHIP Event Logging. diff --git a/src/lib/shell/Engine.cpp b/src/lib/shell/Engine.cpp index 809d44cc3c2bd4..d963e3880fc551 100644 --- a/src/lib/shell/Engine.cpp +++ b/src/lib/shell/Engine.cpp @@ -117,7 +117,7 @@ void Engine::RegisterDefaultCommands() RegisterDeviceCommands(); RegisterOnboardingCodesCommands(); #endif -#if CHIP_DEVICE_CONFIG_ENABLE_NFC +#if CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING RegisterNFCCommands(); #endif RegisterDnsCommands(); diff --git a/src/lib/shell/commands/BUILD.gn b/src/lib/shell/commands/BUILD.gn index f3da2760f641b1..17d9b275326ad7 100644 --- a/src/lib/shell/commands/BUILD.gn +++ b/src/lib/shell/commands/BUILD.gn @@ -46,7 +46,7 @@ source_set("commands") { sources += [ "BLE.cpp" ] } - if (chip_enable_nfc && chip_device_platform != "none") { + if (chip_enable_nfc_onboarding && chip_device_platform != "none") { sources += [ "NFC.cpp" ] } diff --git a/src/lib/shell/commands/NFC.cpp b/src/lib/shell/commands/NFC.cpp index 78d2cc841b66df..2758138a49d993 100644 --- a/src/lib/shell/commands/NFC.cpp +++ b/src/lib/shell/commands/NFC.cpp @@ -37,7 +37,7 @@ static CHIP_ERROR NFCHandler(int argc, char ** argv) VerifyOrReturnError(argc == 1, error = CHIP_ERROR_INVALID_ARGUMENT); - nfcEnabled = chip::DeviceLayer::NFCMgr().IsTagEmulationStarted(); + nfcEnabled = chip::DeviceLayer::NFCOnboardingMgr().IsTagEmulationStarted(); if (strcmp(argv[0], "start") == 0) { @@ -55,7 +55,7 @@ static CHIP_ERROR NFCHandler(int argc, char ** argv) { if (nfcEnabled) { - chip::DeviceLayer::NFCMgr().StopTagEmulation(); + chip::DeviceLayer::NFCOnboardingMgr().StopTagEmulation(); streamer_printf(sout, "NFC tag emulation stopped\r\n"); } else diff --git a/src/platform/BUILD.gn b/src/platform/BUILD.gn index 7f0b7ff87a1b16..36924433ae05d7 100644 --- a/src/platform/BUILD.gn +++ b/src/platform/BUILD.gn @@ -152,10 +152,10 @@ if (chip_device_platform != "none" && chip_device_platform != "external") { defines += [ "CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE=${chip_enable_ble}" ] } - if (chip_enable_nfc) { + if (chip_enable_nfc_onboarding) { defines += [ - "CHIP_DEVICE_CONFIG_ENABLE_NFC=1", - "CONFIG_CHIP_NFC_COMMISSIONING=1", + "CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING=1", + "CONFIG_CHIP_NFC_ONBOARDING=1", ] } diff --git a/src/platform/Zephyr/BUILD.gn b/src/platform/Zephyr/BUILD.gn index 035c13a1cd7a5f..c56b7526f60e95 100644 --- a/src/platform/Zephyr/BUILD.gn +++ b/src/platform/Zephyr/BUILD.gn @@ -72,10 +72,10 @@ static_library("Zephyr") { } } - if (chip_enable_nfc) { + if (chip_enable_nfc_onboarding) { sources += [ - "NFCManagerImpl.cpp", - "NFCManagerImpl.h", + "NFCOnboardingManagerImpl.cpp", + "NFCOnboardingManagerImpl.h", ] } diff --git a/src/platform/Zephyr/NFCManagerImpl.cpp b/src/platform/Zephyr/NFCOnboardingManagerImpl.cpp similarity index 90% rename from src/platform/Zephyr/NFCManagerImpl.cpp rename to src/platform/Zephyr/NFCOnboardingManagerImpl.cpp index dd28457af12198..3b7931f011ce9d 100644 --- a/src/platform/Zephyr/NFCManagerImpl.cpp +++ b/src/platform/Zephyr/NFCOnboardingManagerImpl.cpp @@ -17,7 +17,7 @@ #include -#include +#include #include #include @@ -34,15 +34,15 @@ namespace { void nfcCallback(void * /* context */, nfc_t2t_event_t, const uint8_t * /* data */, size_t /* data_length */) {} } // namespace -NFCManagerImpl NFCManagerImpl::sInstance; +NFCOnboardingManagerImpl NFCOnboardingManagerImpl::sInstance; -CHIP_ERROR NFCManagerImpl::_Init() +CHIP_ERROR NFCOnboardingManagerImpl::_Init() { mIsStarted = false; return nfc_t2t_setup(nfcCallback, nullptr) ? CHIP_ERROR_INTERNAL : CHIP_NO_ERROR; } -CHIP_ERROR NFCManagerImpl::_StartTagEmulation(const char * payload, size_t payloadLength) +CHIP_ERROR NFCOnboardingManagerImpl::_StartTagEmulation(const char * payload, size_t payloadLength) { CHIP_ERROR error = CHIP_NO_ERROR; int result = 0; @@ -85,7 +85,7 @@ CHIP_ERROR NFCManagerImpl::_StartTagEmulation(const char * payload, size_t paylo return error; } -CHIP_ERROR NFCManagerImpl::_StopTagEmulation() +CHIP_ERROR NFCOnboardingManagerImpl::_StopTagEmulation() { VerifyOrReturnError(mIsStarted, CHIP_NO_ERROR); diff --git a/src/platform/Zephyr/NFCManagerImpl.h b/src/platform/Zephyr/NFCOnboardingManagerImpl.h similarity index 66% rename from src/platform/Zephyr/NFCManagerImpl.h rename to src/platform/Zephyr/NFCOnboardingManagerImpl.h index 7d60cde505da40..ea1796674e4b84 100644 --- a/src/platform/Zephyr/NFCManagerImpl.h +++ b/src/platform/Zephyr/NFCOnboardingManagerImpl.h @@ -17,7 +17,7 @@ /** * @file - * Platform-specific NFCManager implementation for Zephyr RTOS. + * Platform-specific NFCOnboardingManager implementation for Zephyr RTOS. */ #pragma once @@ -28,12 +28,12 @@ namespace chip { namespace DeviceLayer { -class NFCManagerImpl final : public NFCManager +class NFCOnboardingManagerImpl final : public NFCOnboardingManager { - friend class NFCManager; + friend class NFCOnboardingManager; private: - // ===== Members that implement the NFCManager internal interface. + // ===== Members that implement the NFCOnboardingManager internal interface. CHIP_ERROR _Init(); CHIP_ERROR _StartTagEmulation(const char * payload, size_t payloadLength); @@ -49,20 +49,20 @@ class NFCManagerImpl final : public NFCManager // ===== Members for internal use by the following friends. - friend NFCManager & NFCMgr(); - friend NFCManagerImpl & NFCMgrImpl(); + friend NFCOnboardingManager & NFCOnboardingMgr(); + friend NFCOnboardingManagerImpl & NFCOnboardingMgrImpl(); - static NFCManagerImpl sInstance; + static NFCOnboardingManagerImpl sInstance; }; -inline NFCManager & NFCMgr() +inline NFCOnboardingManager & NFCOnboardingMgr() { - return NFCManagerImpl::sInstance; + return NFCOnboardingManagerImpl::sInstance; } -inline NFCManagerImpl & NFCMgrImpl() +inline NFCOnboardingManagerImpl & NFCOnboardingMgrImpl() { - return NFCManagerImpl::sInstance; + return NFCOnboardingManagerImpl::sInstance; } } // namespace DeviceLayer diff --git a/src/platform/device.gni b/src/platform/device.gni index 87e2eb12e8d0d2..5005214d82c94d 100644 --- a/src/platform/device.gni +++ b/src/platform/device.gni @@ -85,8 +85,8 @@ declare_args() { chip_enable_ble = chip_config_network_layer_ble } - # Enable NFC support - chip_enable_nfc = false + # Enable NFC Onboarding support + chip_enable_nfc_onboarding = false # Enable OTA requestor support chip_enable_ota_requestor = false diff --git a/src/platform/nrfconnect/BUILD.gn b/src/platform/nrfconnect/BUILD.gn index 9be90fe6b7b0da..86c5b37c057799 100644 --- a/src/platform/nrfconnect/BUILD.gn +++ b/src/platform/nrfconnect/BUILD.gn @@ -112,10 +112,10 @@ static_library("nrfconnect") { ] } - if (chip_enable_nfc) { + if (chip_enable_nfc_onboarding) { sources += [ - "../Zephyr/NFCManagerImpl.cpp", - "NFCManagerImpl.h", + "../Zephyr/NFCOnboardingManagerImpl.cpp", + "NFCOnboardingManagerImpl.h", ] } diff --git a/src/platform/nrfconnect/NFCManagerImpl.h b/src/platform/nrfconnect/NFCOnboardingManagerImpl.h similarity index 83% rename from src/platform/nrfconnect/NFCManagerImpl.h rename to src/platform/nrfconnect/NFCOnboardingManagerImpl.h index a034e0bb74510a..b3dd4f29e8cd89 100644 --- a/src/platform/nrfconnect/NFCManagerImpl.h +++ b/src/platform/nrfconnect/NFCOnboardingManagerImpl.h @@ -17,10 +17,10 @@ /** * @file - * Provides an implementation of the NFCManager interface for nRF Connect + * Provides an implementation of the NFCOnboardingManager interface for nRF Connect * SDK platform, by including Zephyr platform implementation. */ #pragma once -#include +#include diff --git a/src/platform/nxp/common/ble/BLEManagerCommon.cpp b/src/platform/nxp/common/ble/BLEManagerCommon.cpp index baba33ecdab48c..414de6ca088621 100644 --- a/src/platform/nxp/common/ble/BLEManagerCommon.cpp +++ b/src/platform/nxp/common/ble/BLEManagerCommon.cpp @@ -771,7 +771,7 @@ CHIP_ERROR BLEManagerCommon::StopAdvertising(void) CancelBleAdvTimeoutTimer(); } -#if CONFIG_CHIP_NFC_COMMISSIONING +#if CONFIG_CHIP_NFC_ONBOARDING /* schedule NFC emulation stop */ ChipDeviceEvent advChange; advChange.Type = DeviceEventType::kCHIPoBLEAdvertisingChange; diff --git a/src/platform/nxp/k32w0/BUILD.gn b/src/platform/nxp/k32w0/BUILD.gn index c7a1c94ddba441..260e7cf7e614bb 100644 --- a/src/platform/nxp/k32w0/BUILD.gn +++ b/src/platform/nxp/k32w0/BUILD.gn @@ -50,8 +50,8 @@ static_library("nxp_platform") { "K32W0Config.h", "KeyValueStoreManagerImpl.cpp", "KeyValueStoreManagerImpl.h", - "NFCManagerImpl.cpp", - "NFCManagerImpl.h", + "NFCOnboardingManagerImpl.cpp", + "NFCOnboardingManagerImpl.h", "PlatformManagerImpl.cpp", "PlatformManagerImpl.h", "RamStorage.cpp", diff --git a/src/platform/nxp/k32w0/NFCManagerImpl.cpp b/src/platform/nxp/k32w0/NFCOnboardingManagerImpl.cpp similarity index 90% rename from src/platform/nxp/k32w0/NFCManagerImpl.cpp rename to src/platform/nxp/k32w0/NFCOnboardingManagerImpl.cpp index f6254515312d5b..0baf7b3d4d2ee1 100644 --- a/src/platform/nxp/k32w0/NFCManagerImpl.cpp +++ b/src/platform/nxp/k32w0/NFCOnboardingManagerImpl.cpp @@ -17,8 +17,8 @@ #include -#if CHIP_DEVICE_CONFIG_ENABLE_NFC -#include +#if CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING +#include #include #include @@ -30,14 +30,14 @@ namespace chip { namespace DeviceLayer { -NFCManagerImpl NFCManagerImpl::sInstance; +NFCOnboardingManagerImpl NFCOnboardingManagerImpl::sInstance; -CHIP_ERROR NFCManagerImpl::_Init() +CHIP_ERROR NFCOnboardingManagerImpl::_Init() { return CHIP_NO_ERROR; } -CHIP_ERROR NFCManagerImpl::_StartTagEmulation(const char * payload, size_t payloadLength) +CHIP_ERROR NFCOnboardingManagerImpl::_StartTagEmulation(const char * payload, size_t payloadLength) { ntagDriverHandleInstance = NTAG_InitDevice((NTAG_ID_T) 0, I2C2); assert(ntagDriverHandleInstance); @@ -75,7 +75,7 @@ CHIP_ERROR NFCManagerImpl::_StartTagEmulation(const char * payload, size_t paylo return CHIP_NO_ERROR; } -CHIP_ERROR NFCManagerImpl::_StopTagEmulation() +CHIP_ERROR NFCOnboardingManagerImpl::_StopTagEmulation() { uint8_t ndefUriRecordSize = AppNdefUriRecordGetSize(sInstance.ndefUriRecord); @@ -95,7 +95,7 @@ CHIP_ERROR NFCManagerImpl::_StopTagEmulation() return CHIP_NO_ERROR; } -bool NFCManagerImpl::IsNtagConfigured(eAppNtagError * pNtagError, const char * payload) +bool NFCOnboardingManagerImpl::IsNtagConfigured(eAppNtagError * pNtagError, const char * payload) { uint32_t addrToRead = NTAG_I2C_BLOCK_SIZE; uint8_t eepromDataBuf[NDEF_URI_ID_MAX_LENGTH + TERMINATOR_TLV_LEN] = { 0 }; @@ -129,7 +129,7 @@ bool NFCManagerImpl::IsNtagConfigured(eAppNtagError * pNtagError, const char * p !memcmp((uint8_t *) &(sInstance.ndefUriRecord), eepromDataBuf, ndefUriRecordSize)); } -NFCManagerImpl::eAppNtagError NFCManagerImpl::AppNtagWrite(const char * payload) +NFCOnboardingManagerImpl::eAppNtagError NFCOnboardingManagerImpl::AppNtagWrite(const char * payload) { eAppNtagError ntagErr = E_APP_NTAG_NO_ERROR; uint8_t byte0 = 0; @@ -190,7 +190,7 @@ NFCManagerImpl::eAppNtagError NFCManagerImpl::AppNtagWrite(const char * payload) return ntagErr; } -bool NFCManagerImpl::AppNtagEepromWrite(uint8_t originalSize) +bool NFCOnboardingManagerImpl::AppNtagEepromWrite(uint8_t originalSize) { bool wasWritten = FALSE; uint32_t ndefSize = AppNdefUriRecordGetSize(sInstance.ndefUriRecord); @@ -238,7 +238,7 @@ bool NFCManagerImpl::AppNtagEepromWrite(uint8_t originalSize) return wasWritten; } -NFCManagerImpl::eAppNtagError NFCManagerImpl::AppNtagEepromUnlockThenWrite(uint8_t originalSize) +NFCOnboardingManagerImpl::eAppNtagError NFCOnboardingManagerImpl::AppNtagEepromUnlockThenWrite(uint8_t originalSize) { eAppNtagError ntagErr = E_APP_NTAG_NO_ERROR; @@ -264,14 +264,14 @@ NFCManagerImpl::eAppNtagError NFCManagerImpl::AppNtagEepromUnlockThenWrite(uint8 return ntagErr; } -uint8_t NFCManagerImpl::AppNdefUriRecordGetSize(NdefUriRecord_t ndefUriRecord) +uint8_t NFCOnboardingManagerImpl::AppNdefUriRecordGetSize(NdefUriRecord_t ndefUriRecord) { return sizeof(sInstance.ndefUriRecord.recordType) + sizeof(sInstance.ndefUriRecord.recordTypeLen) + sizeof(sInstance.ndefUriRecord.payloadLen) + sInstance.ndefUriRecord.payloadLen + sizeof(sInstance.ndefUriRecord.recordName); } -NFCManagerImpl::eAppNtagError NFCManagerImpl::AppNtagLockWriteAccess(void) +NFCOnboardingManagerImpl::eAppNtagError NFCOnboardingManagerImpl::AppNtagLockWriteAccess(void) { eAppNtagError ntagErr = E_APP_NTAG_NO_ERROR; @@ -302,7 +302,7 @@ NFCManagerImpl::eAppNtagError NFCManagerImpl::AppNtagLockWriteAccess(void) return ntagErr; } -NFCManagerImpl::eAppNtagError NFCManagerImpl::AppNtagUnlockWriteAccess(void) +NFCOnboardingManagerImpl::eAppNtagError NFCOnboardingManagerImpl::AppNtagUnlockWriteAccess(void) { eAppNtagError ntagErr = E_APP_NTAG_NO_ERROR; diff --git a/src/platform/nxp/k32w0/NFCManagerImpl.h b/src/platform/nxp/k32w0/NFCOnboardingManagerImpl.h similarity index 80% rename from src/platform/nxp/k32w0/NFCManagerImpl.h rename to src/platform/nxp/k32w0/NFCOnboardingManagerImpl.h index 5a69375b74e29c..09a7ae211c43f9 100644 --- a/src/platform/nxp/k32w0/NFCManagerImpl.h +++ b/src/platform/nxp/k32w0/NFCOnboardingManagerImpl.h @@ -17,7 +17,7 @@ /** * @file - * Platform-specific NFCManager implementation for NXP K32W. + * Platform-specific NFCOnboardingManager implementation for NXP K32W. */ #pragma once @@ -39,12 +39,12 @@ namespace { #define TERMINATOR_TLV_LEN 1 } // namespace -class NFCManagerImpl final : public NFCManager +class NFCOnboardingManagerImpl final : public NFCOnboardingManager { - friend class NFCManager; + friend class NFCOnboardingManager; private: - // ===== Members that implement the NFCManager internal interface. + // ===== Members that implement the NFCOnboardingManager internal interface. CHIP_ERROR _Init(); CHIP_ERROR _StartTagEmulation(const char * payload, size_t payloadLength); @@ -60,8 +60,8 @@ class NFCManagerImpl final : public NFCManager // ===== Members for internal use by the following friends. - friend NFCManager & NFCMgr(); - friend NFCManagerImpl & NFCMgrImpl(); + friend NFCOnboardingManager & NFCOnboardingMgr(); + friend NFCOnboardingManagerImpl & NFCOnboardingMgrImpl(); typedef enum { @@ -91,18 +91,18 @@ class NFCManagerImpl final : public NFCManager static uint8_t AppNdefUriRecordGetSize(NdefUriRecord_t ndefUriRecord); NdefUriRecord_t ndefUriRecord; - static NFCManagerImpl sInstance; + static NFCOnboardingManagerImpl sInstance; NTAG_HANDLE_T ntagDriverHandleInstance; }; -inline NFCManager & NFCMgr() +inline NFCOnboardingManager & NFCOnboardingMgr() { - return NFCManagerImpl::sInstance; + return NFCOnboardingManagerImpl::sInstance; } -inline NFCManagerImpl & NFCMgrImpl() +inline NFCOnboardingManagerImpl & NFCOnboardingMgrImpl() { - return NFCManagerImpl::sInstance; + return NFCOnboardingManagerImpl::sInstance; } } // namespace DeviceLayer diff --git a/src/platform/stm32/args.gni b/src/platform/stm32/args.gni index 4357e8ea8fa20f..78e5b1cb23bec6 100644 --- a/src/platform/stm32/args.gni +++ b/src/platform/stm32/args.gni @@ -41,8 +41,8 @@ chip_build_libshell = false # OPENTHREAD CONFIG chip_enable_openthread = true -# NFC CONFIG -chip_enable_nfc = false +# NFC ONBOARDING CONFIG +chip_enable_nfc_onboarding = false # INET CONFIG for thread chip_inet_config_enable_ipv4 = false diff --git a/src/platform/telink/BUILD.gn b/src/platform/telink/BUILD.gn index 93f6aaef5ed94e..8b082452b43c22 100644 --- a/src/platform/telink/BUILD.gn +++ b/src/platform/telink/BUILD.gn @@ -103,10 +103,10 @@ static_library("telink") { ] } - if (chip_enable_nfc) { + if (chip_enable_nfc_onboarding) { sources += [ - "NFCManagerImpl.cpp", - "NFCManagerImpl.h", + "NFCOnboardingManagerImpl.cpp", + "NFCOnboardingManagerImpl.h", ] } diff --git a/src/platform/telink/NFCManagerImpl.cpp b/src/platform/telink/NFCOnboardingManagerImpl.cpp similarity index 88% rename from src/platform/telink/NFCManagerImpl.cpp rename to src/platform/telink/NFCOnboardingManagerImpl.cpp index 084b297dfb8c46..5567bea9d65ef9 100644 --- a/src/platform/telink/NFCManagerImpl.cpp +++ b/src/platform/telink/NFCOnboardingManagerImpl.cpp @@ -17,7 +17,7 @@ #include -#include +#include #include @@ -35,14 +35,14 @@ void nfc_callback(const struct device * dev, enum nfc_tag_event event, const uin namespace chip { namespace DeviceLayer { -NFCManagerImpl NFCManagerImpl::sInstance; +NFCOnboardingManagerImpl NFCOnboardingManagerImpl::sInstance; -CHIP_ERROR NFCManagerImpl::_Init() +CHIP_ERROR NFCOnboardingManagerImpl::_Init() { return CHIP_NO_ERROR; } -CHIP_ERROR NFCManagerImpl::_StartTagEmulation(const char * payload, size_t payloadLength) +CHIP_ERROR NFCOnboardingManagerImpl::_StartTagEmulation(const char * payload, size_t payloadLength) { /* Set up NFC driver*/ uint8_t ndef_msg_buf[NDEF_MSG_BUF_SIZE]; @@ -89,7 +89,7 @@ CHIP_ERROR NFCManagerImpl::_StartTagEmulation(const char * payload, size_t paylo return CHIP_NO_ERROR; } -CHIP_ERROR NFCManagerImpl::_StopTagEmulation() +CHIP_ERROR NFCOnboardingManagerImpl::_StopTagEmulation() { if (nfc_tag_stop(dev)) { diff --git a/src/platform/telink/NFCManagerImpl.h b/src/platform/telink/NFCOnboardingManagerImpl.h similarity index 70% rename from src/platform/telink/NFCManagerImpl.h rename to src/platform/telink/NFCOnboardingManagerImpl.h index 27ba6e0f7c5c5d..df31881c615db0 100644 --- a/src/platform/telink/NFCManagerImpl.h +++ b/src/platform/telink/NFCOnboardingManagerImpl.h @@ -26,12 +26,12 @@ namespace { #define NDEF_MSG_BUF_SIZE 128 } // namespace -class NFCManagerImpl final : public NFCManager +class NFCOnboardingManagerImpl final : public NFCOnboardingManager { - friend class NFCManager; + friend class NFCOnboardingManager; private: - // ===== Members that implement the NFCManager internal interface. + // ===== Members that implement the NFCOnboardingManager internal interface. CHIP_ERROR _Init(); CHIP_ERROR _StartTagEmulation(const char * payload, size_t payloadLength); @@ -43,20 +43,20 @@ class NFCManagerImpl final : public NFCManager const struct device * dev = DEV_PTR; // ===== Members for internal use by the following friends. - friend NFCManager & NFCMgr(); - friend NFCManagerImpl & NFCMgrImpl(); + friend NFCOnboardingManager & NFCOnboardingMgr(); + friend NFCOnboardingManagerImpl & NFCOnboardingMgrImpl(); - static NFCManagerImpl sInstance; + static NFCOnboardingManagerImpl sInstance; }; -inline NFCManager & NFCMgr() +inline NFCOnboardingManager & NFCOnboardingMgr() { - return NFCManagerImpl::sInstance; + return NFCOnboardingManagerImpl::sInstance; } -inline NFCManagerImpl & NFCMgrImpl() +inline NFCOnboardingManagerImpl & NFCOnboardingMgrImpl() { - return NFCManagerImpl::sInstance; + return NFCOnboardingManagerImpl::sInstance; } } // namespace DeviceLayer From 0edc7999e8c1d637c56f49eeb1e7d71123b6a181 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 19 Nov 2024 13:52:14 +0000 Subject: [PATCH 2/3] Restyled by clang-format --- src/include/platform/NFCOnboardingManager.h | 6 +++--- .../platform/internal/GenericPlatformManagerImpl.ipp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/include/platform/NFCOnboardingManager.h b/src/include/platform/NFCOnboardingManager.h index 5bec274666e00f..b040dbb656c31e 100644 --- a/src/include/platform/NFCOnboardingManager.h +++ b/src/include/platform/NFCOnboardingManager.h @@ -79,9 +79,9 @@ class NFCOnboardingManager ~NFCOnboardingManager() = default; // No copy, move or assignment. - NFCOnboardingManager(const NFCOnboardingManager &) = delete; - NFCOnboardingManager(NFCOnboardingManager &&) = delete; - void operator=(const NFCOnboardingManager &) = delete; + NFCOnboardingManager(const NFCOnboardingManager &) = delete; + NFCOnboardingManager(NFCOnboardingManager &&) = delete; + void operator=(const NFCOnboardingManager &) = delete; // NFCOnboardingManager implementation getters. NFCOnboardingManagerImpl * Impl(); diff --git a/src/include/platform/internal/GenericPlatformManagerImpl.ipp b/src/include/platform/internal/GenericPlatformManagerImpl.ipp index 0701d79a1a5f6f..f2bb7a430c951a 100644 --- a/src/include/platform/internal/GenericPlatformManagerImpl.ipp +++ b/src/include/platform/internal/GenericPlatformManagerImpl.ipp @@ -123,7 +123,7 @@ CHIP_ERROR GenericPlatformManagerImpl::_InitChipStack() #if CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING err = NFCOnboardingMgr().Init(); VerifyOrExit(err == CHIP_NO_ERROR, - ChipLogError(DeviceLayer, "NFC Onboarding Manager initialization failed: %" CHIP_ERROR_FORMAT, err.Format())); + ChipLogError(DeviceLayer, "NFC Onboarding Manager initialization failed: %" CHIP_ERROR_FORMAT, err.Format())); #endif // TODO Initialize CHIP Event Logging. From 4f46422399524994d712f574f19838da1f2fd25d Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 19 Nov 2024 13:52:21 +0000 Subject: [PATCH 3/3] Restyled by prettier-markdown --- docs/platforms/nrf/nrfconnect_examples_configuration.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/platforms/nrf/nrfconnect_examples_configuration.md b/docs/platforms/nrf/nrfconnect_examples_configuration.md index 212b99736dfb0b..406a8d7133b516 100644 --- a/docs/platforms/nrf/nrfconnect_examples_configuration.md +++ b/docs/platforms/nrf/nrfconnect_examples_configuration.md @@ -196,11 +196,11 @@ intervals: #### Onboarding with NFC support -You can configure the Matter protocol to use an NFC tag for onboarding, -instead of using a QR code, which is the default configuration. +You can configure the Matter protocol to use an NFC tag for onboarding, instead +of using a QR code, which is the default configuration. -To enable NFC for onboarding and share the onboarding payload in an NFC tag, -set the `CONFIG_CHIP_NFC_ONBOARDING` option. +To enable NFC for onboarding and share the onboarding payload in an NFC tag, set +the `CONFIG_CHIP_NFC_ONBOARDING` option. #### Factory reset behavior