Skip to content

Commit

Permalink
Merge bc60247 into f05b65e
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierGre authored Dec 19, 2024
2 parents f05b65e + bc60247 commit 3496875
Show file tree
Hide file tree
Showing 50 changed files with 203 additions and 203 deletions.
4 changes: 2 additions & 2 deletions config/nrfconnect/chip-module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -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_payload" CONFIG_CHIP_NFC_ONBOARDING_PAYLOAD)
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)
Expand Down
4 changes: 2 additions & 2 deletions config/nrfconnect/chip-module/Kconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,10 @@ config MPSL_FEM_NRF21540_RUNTIME_PA_GAIN_CONTROL
default y if MPSL_FEM

# ==============================================================================
# NFC configuration
# NFC Onboarding Payload configuration
# ==============================================================================

config CHIP_NFC_COMMISSIONING
config CHIP_NFC_ONBOARDING_PAYLOAD
default y

# Disable not needed NFC callback to save flash
Expand Down
2 changes: 1 addition & 1 deletion config/qpg/chip-gn/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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_payload = false
chip_build_tests = false
chip_monolithic_tests = false
chip_inet_config_enable_tcp_endpoint = false
Expand Down
4 changes: 2 additions & 2 deletions config/telink/chip-module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ matter_add_flags(-DMBEDTLS_USER_CONFIG_FILE=<telink-mbedtls-config.h>)
# 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}
Expand All @@ -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_payload" CONFIG_CHIP_NFC_ONBOARDING_PAYLOAD)
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)
Expand Down
2 changes: 1 addition & 1 deletion config/telink/chip-module/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if CHIP
config CHIP_DEVICE_VENDOR_NAME
default "Telink Semiconductor"

config CHIP_NFC_COMMISSIONING
config CHIP_NFC_ONBOARDING_PAYLOAD
bool "Share onboarding payload in NFC tag"
default n
imply I2C
Expand Down
10 changes: 5 additions & 5 deletions docs/platforms/nrf/nrfconnect_examples_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,13 @@ intervals:
- `CONFIG_CHIP_ICD_SLOW_POLL_INTERVAL`
- `CONFIG_CHIP_ICD_FAST_POLLING_INTERVAL`
#### Commissioning with NFC support
#### Onboarding payload delivered over NFC
You can configure the Matter protocol to use an NFC tag for commissioning,
instead of using a QR code, which is the default configuration.
You can configure the Matter protocol to use an NFC tag for delivering the onboarding payload, 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 sharing the onboarding payload in an NFC tag, set
the `CONFIG_CHIP_NFC_ONBOARDING_PAYLOAD` option.
#### Factory reset behavior
Expand Down
6 changes: 3 additions & 3 deletions examples/all-clusters-app/nrfconnect/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,10 +489,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_PAYLOAD
if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Started)
{
if (NFCMgr().IsTagEmulationStarted())
if (NFCOnboardingPayloadMgr().IsTagEmulationStarted())
{
LOG_INF("NFC Tag emulation is already started");
}
Expand All @@ -503,7 +503,7 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */
}
else if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Stopped)
{
NFCMgr().StopTagEmulation();
NFCOnboardingPayloadMgr().StopTagEmulation();
}
#endif
sHaveBLEConnections = ConnectivityMgr().NumBLEConnections() != 0;
Expand Down
6 changes: 3 additions & 3 deletions examples/all-clusters-minimal-app/nrfconnect/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,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_PAYLOAD
if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Started)
{
if (NFCMgr().IsTagEmulationStarted())
if (NFCOnboardingPayloadMgr().IsTagEmulationStarted())
{
LOG_INF("NFC Tag emulation is already started");
}
Expand All @@ -422,7 +422,7 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */
}
else if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Stopped)
{
NFCMgr().StopTagEmulation();
NFCOnboardingPayloadMgr().StopTagEmulation();
}
#endif
sHaveBLEConnections = ConnectivityMgr().NumBLEConnections() != 0;
Expand Down
8 changes: 4 additions & 4 deletions examples/contact-sensor-app/nxp/k32w0/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -781,23 +781,23 @@ void AppTask::MatterEventHandler(const ChipDeviceEvent * event, intptr_t)
}
#endif

#if CONFIG_CHIP_NFC_COMMISSIONING
#if CONFIG_CHIP_NFC_ONBOARDING_PAYLOAD
if (event->Type == DeviceEventType::kCHIPoBLEAdvertisingChange && event->CHIPoBLEAdvertisingChange.Result == kActivity_Stopped)
{
if (!NFCMgr().IsTagEmulationStarted())
if (!NFCOnboardingPayloadMgr().IsTagEmulationStarted())
{
K32W_LOG("NFC Tag emulation is already stopped!");
}
else
{
NFCMgr().StopTagEmulation();
NFCOnboardingPayloadMgr().StopTagEmulation();
K32W_LOG("Stopped NFC Tag Emulation!");
}
}
else if (event->Type == DeviceEventType::kCHIPoBLEAdvertisingChange &&
event->CHIPoBLEAdvertisingChange.Result == kActivity_Started)
{
if (NFCMgr().IsTagEmulationStarted())
if (NFCOnboardingPayloadMgr().IsTagEmulationStarted())
{
K32W_LOG("NFC Tag emulation is already started!");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_PAYLOAD, CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING_PAYLOAD
*
* NFC commissioning is not supported on K32W1
* NFC onboarding payload is not supported on K32W1
*/
#define CONFIG_CHIP_NFC_COMMISSIONING 0
#define CHIP_DEVICE_CONFIG_ENABLE_NFC 0
#define CONFIG_CHIP_NFC_ONBOARDING_PAYLOAD 0
#define CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING_PAYLOAD 0

/**
* @def CHIP_CONFIG_MAX_FABRICS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_PAYLOAD, CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING_PAYLOAD
*
* NFC commissioning is not supported on K32W1
* NFC onboarding payload is not supported on K32W1
*/
#define CONFIG_CHIP_NFC_COMMISSIONING 0
#define CHIP_DEVICE_CONFIG_ENABLE_NFC 0
#define CONFIG_CHIP_NFC_ONBOARDING_PAYLOAD 0
#define CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING_PAYLOAD 0

/**
* @def CHIP_CONFIG_MAX_FABRICS
Expand Down
6 changes: 3 additions & 3 deletions examples/light-switch-app/nrfconnect/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -468,10 +468,10 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */
{
case DeviceEventType::kCHIPoBLEAdvertisingChange:
UpdateStatusLED();
#ifdef CONFIG_CHIP_NFC_COMMISSIONING
#ifdef CONFIG_CHIP_NFC_ONBOARDING_PAYLOAD
if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Started)
{
if (NFCMgr().IsTagEmulationStarted())
if (NFCOnboardingPayloadMgr().IsTagEmulationStarted())
{
LOG_INF("NFC Tag emulation is already started");
}
Expand All @@ -482,7 +482,7 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */
}
else if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Stopped)
{
NFCMgr().StopTagEmulation();
NFCOnboardingPayloadMgr().StopTagEmulation();
}
#endif
sHaveBLEConnections = ConnectivityMgr().NumBLEConnections() != 0;
Expand Down
6 changes: 3 additions & 3 deletions examples/lighting-app/nrfconnect/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -601,10 +601,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_PAYLOAD
if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Started)
{
if (NFCMgr().IsTagEmulationStarted())
if (NFCOnboardingPayloadMgr().IsTagEmulationStarted())
{
LOG_INF("NFC Tag emulation is already started");
}
Expand All @@ -615,7 +615,7 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */
}
else if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Stopped)
{
NFCMgr().StopTagEmulation();
NFCOnboardingPayloadMgr().StopTagEmulation();
}
#endif
sHaveBLEConnections = ConnectivityMgr().NumBLEConnections() != 0;
Expand Down
8 changes: 4 additions & 4 deletions examples/lighting-app/nxp/k32w0/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,23 +680,23 @@ void AppTask::MatterEventHandler(const ChipDeviceEvent * event, intptr_t)
}
#endif

#if CONFIG_CHIP_NFC_COMMISSIONING
#if CONFIG_CHIP_NFC_ONBOARDING_PAYLOAD
if (event->Type == DeviceEventType::kCHIPoBLEAdvertisingChange && event->CHIPoBLEAdvertisingChange.Result == kActivity_Stopped)
{
if (!NFCMgr().IsTagEmulationStarted())
if (!NFCOnboardingPayloadMgr().IsTagEmulationStarted())
{
K32W_LOG("NFC Tag emulation is already stopped!");
}
else
{
NFCMgr().StopTagEmulation();
NFCOnboardingPayloadMgr().StopTagEmulation();
K32W_LOG("Stopped NFC Tag Emulation!");
}
}
else if (event->Type == DeviceEventType::kCHIPoBLEAdvertisingChange &&
event->CHIPoBLEAdvertisingChange.Result == kActivity_Started)
{
if (NFCMgr().IsTagEmulationStarted())
if (NFCOnboardingPayloadMgr().IsTagEmulationStarted())
{
K32W_LOG("NFC Tag emulation is already started!");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_PAYLOAD, CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING_PAYLOAD
*
* NFC commissioning is not supported on K32W1
* NFC onboarding payload is not supported on K32W1
*/
#define CONFIG_CHIP_NFC_COMMISSIONING 0
#define CHIP_DEVICE_CONFIG_ENABLE_NFC 0
#define CONFIG_CHIP_NFC_ONBOARDING_PAYLOAD 0
#define CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING_PAYLOAD 0

/**
* @def CHIP_CONFIG_MAX_FABRICS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_PAYLOAD, CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING_PAYLOAD
*
* NFC commissioning is not supported on K32W1
* NFC onboarding payload is not supported on K32W1
*/
#define CONFIG_CHIP_NFC_COMMISSIONING 0
#define CHIP_DEVICE_CONFIG_ENABLE_NFC 0
#define CONFIG_CHIP_NFC_ONBOARDING_PAYLOAD 0
#define CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING_PAYLOAD 0

/**
* @def CHIP_CONFIG_MAX_FABRICS
Expand Down
4 changes: 2 additions & 2 deletions examples/lighting-app/telink/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ CONFIG_TELINK_OTA_BUTTON_TEST=n
# Disable CHIP shell support
CONFIG_CHIP_LIB_SHELL=n

# Disable CHIP NFC for commissioning
CONFIG_CHIP_NFC_COMMISSIONING=n
# Disable CHIP NFC Onboarding Payload
CONFIG_CHIP_NFC_ONBOARDING_PAYLOAD=n

# Disable factory data support
CONFIG_CHIP_FACTORY_DATA=n
Expand Down
6 changes: 3 additions & 3 deletions examples/lit-icd-app/nrfconnect/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,10 +489,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_PAYLOAD
if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Started)
{
if (NFCMgr().IsTagEmulationStarted())
if (NFCOnboardingPayloadMgr().IsTagEmulationStarted())
{
LOG_INF("NFC Tag emulation is already started");
}
Expand All @@ -503,7 +503,7 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */
}
else if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Stopped)
{
NFCMgr().StopTagEmulation();
NFCOnboardingPayloadMgr().StopTagEmulation();
}
#endif
sHaveBLEConnections = ConnectivityMgr().NumBLEConnections() != 0;
Expand Down
6 changes: 3 additions & 3 deletions examples/lock-app/nrfconnect/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,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_PAYLOAD
if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Started)
{
if (NFCMgr().IsTagEmulationStarted())
if (NFCOnboardingPayloadMgr().IsTagEmulationStarted())
{
LOG_INF("NFC Tag emulation is already started");
}
Expand All @@ -563,7 +563,7 @@ void AppTask::ChipEventHandler(const ChipDeviceEvent * event, intptr_t /* arg */
}
else if (event->CHIPoBLEAdvertisingChange.Result == kActivity_Stopped)
{
NFCMgr().StopTagEmulation();
NFCOnboardingPayloadMgr().StopTagEmulation();
}
#endif
sHaveBLEConnections = ConnectivityMgr().NumBLEConnections() != 0;
Expand Down
8 changes: 4 additions & 4 deletions examples/lock-app/nxp/k32w/k32w0/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -610,23 +610,23 @@ void AppTask::MatterEventHandler(const ChipDeviceEvent * event, intptr_t)
}
}

#if CONFIG_CHIP_NFC_COMMISSIONING
#if CONFIG_CHIP_NFC_ONBOARDING_PAYLOAD
if (event->Type == DeviceEventType::kCHIPoBLEAdvertisingChange && event->CHIPoBLEAdvertisingChange.Result == kActivity_Stopped)
{
if (!NFCMgr().IsTagEmulationStarted())
if (!NFCOnboardingPayloadMgr().IsTagEmulationStarted())
{
K32W_LOG("NFC Tag emulation is already stopped!");
}
else
{
NFCMgr().StopTagEmulation();
NFCOnboardingPayloadMgr().StopTagEmulation();
K32W_LOG("Stopped NFC Tag Emulation!");
}
}
else if (event->Type == DeviceEventType::kCHIPoBLEAdvertisingChange &&
event->CHIPoBLEAdvertisingChange.Result == kActivity_Started)
{
if (NFCMgr().IsTagEmulationStarted())
if (NFCOnboardingPayloadMgr().IsTagEmulationStarted())
{
K32W_LOG("NFC Tag emulation is already started!");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_PAYLOAD, CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING_PAYLOAD
*
* NFC commissioning is not supported on K32W1
* NFC onboarding payload is not supported on K32W1
*/
#define CONFIG_CHIP_NFC_COMMISSIONING 0
#define CHIP_DEVICE_CONFIG_ENABLE_NFC 0
#define CONFIG_CHIP_NFC_ONBOARDING_PAYLOAD 0
#define CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING_PAYLOAD 0

/**
* @def CHIP_CONFIG_MAX_FABRICS
Expand Down
Loading

0 comments on commit 3496875

Please sign in to comment.