Skip to content

Commit 6836fb0

Browse files
matter: Implement NFC commissioning manger
Updated sdk-connectedhomeip to fetch nRFConnect commissioning manager implementation. Adjusted Matter Init and Event Handler to work with NFC commissioning. Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
1 parent 7b257de commit 6836fb0

20 files changed

Lines changed: 120 additions & 6 deletions

File tree

docs/bridge/matter_bridge_description.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,12 @@ The |matter_type| supports the following build configurations:
422422

423423
.. include:: /includes/configuration/basic_internal_53ek.txt
424424

425+
Advanced configuration options
426+
==============================
427+
428+
.. include:: /includes/configuration/advanced/intro.txt
429+
.. include:: /includes/configuration/advanced/nfc_commissioning.txt
430+
425431
.. _matter_bridge_app_bridged_support_configs:
426432

427433
Bridged device configuration
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
NFC-based commissioning
2+
-----------------------
3+
4+
.. toggle::
5+
6+
You can commission a Matter accessory over NFC using the Matter NFC Transport Layer (NTL).
7+
The device emulates a Type 4 Tag and exposes both the Matter application and a standard NDEF Tag Application with the onboarding payload.
8+
9+
This feature requires a board with the on-chip NFCT peripheral and an NFC antenna connected.
10+
It is supported on Nordic DK targets that provide NFCT, such as the nRF52840 DK, nRF5340 DK, nRF54L15 DK, and nRF54LM20 DK.
11+
12+
.. note::
13+
NFC-based commissioning cannot be used together with :kconfig:option:`CONFIG_CHIP_NFC_ONBOARDING_PAYLOAD`.
14+
15+
To enable NFC-based commissioning, set the following Kconfig option to ``y``:
16+
17+
* :kconfig:option:`CONFIG_CHIP_NFC_BASED_COMMISSIONING`
18+
19+
You can also use the following related option:
20+
21+
* :kconfig:option:`CONFIG_CHIP_NFC_BASED_COMMISSIONING_DEBUG` - Enables additional debug logging of ISO-DEP APDU traffic.
22+
23+
Commissioning flow:
24+
25+
* As soon as the Matter server finishes initializing, the NFC tag serves an NDEF onboarding payload that advertises the NFC rendezvous flag.
26+
Tap the tag with a commissioner that supports Matter NTL to start commissioning; no button press is required.
27+
The setup code is also printed to the UART log with the NFC rendezvous flag.
28+
* Once commissioning completes successfully, NFC tag emulation is automatically stopped.
29+
30+
.. note::
31+
While NFC-based commissioning is active, commissioning over Bluetooth LE may take longer than usual.
32+
The device first attempts to use NFC and only falls back to Bluetooth LE afterwards, which delays the Bluetooth LE pairing.
33+
A log message is printed when Bluetooth LE commissioning is attempted while NFC commissioning is still active.
34+
35+
To build a |matter_type| with NFC-based commissioning support:
36+
37+
.. tabs::
38+
39+
.. group-tab:: |nRFVSC|
40+
41+
Add ``-DCONFIG_CHIP_NFC_BASED_COMMISSIONING=y`` to :guilabel:`Extra CMake arguments` in your build configuration.
42+
43+
.. group-tab:: Command line
44+
45+
.. code-block:: console
46+
47+
west build -p -b <board_target> -- -DCONFIG_CHIP_NFC_BASED_COMMISSIONING=y
48+
49+
Replace ``<board_target>`` with a supported board target, for example ``nrf52840dk/nrf52840``.

docs/matter/getting_started/advanced_kconfigs.rst

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,23 @@ You can configure when the device will start advertising and how long it will ad
3737
Commissioning with NFC
3838
======================
3939

40-
You can configure the Matter protocol to use NFC tag for commissioning, instead of the default QR code.
40+
You can configure the Matter protocol to use an NFC tag for commissioning, instead of relying only on a printed QR code or Bluetooth LE.
4141

42-
To enable NFC for sharing the onboarding payload in an NFC tag, set the :kconfig:option:`CONFIG_CHIP_NFC_ONBOARDING_PAYLOAD` Kconfig option.
42+
To share the onboarding payload in a simple NFC Type 2 Tag, set the :kconfig:option:`CONFIG_CHIP_NFC_ONBOARDING_PAYLOAD` Kconfig option.
43+
This mode only emulates the setup code in an NDEF message and still uses Bluetooth LE for the commissioning session.
44+
45+
For full commissioning over NFC on Nordic Semiconductor DKs with the NFCT peripheral, set the :kconfig:option:`CONFIG_CHIP_NFC_BASED_COMMISSIONING` Kconfig option instead.
46+
This enables the Matter NFC Transport Layer (NTL) on the accessory side and serves the onboarding payload from the NDEF Tag Application, in addition to the regular Bluetooth LE commissioning.
47+
As soon as the Matter server finishes initializing, the onboarding payload with the NFC rendezvous flag is written to the NFC tag.
48+
Commission the device by tapping the tag with an NFC commissioner that supports Matter NTL; no button press is required.
49+
The setup code is also printed to the UART log with the NFC rendezvous flag.
50+
Once commissioning completes successfully, NFC tag emulation is automatically stopped.
51+
See the :ref:`matter_template_sample` for an example build configuration using ``CONFIG_CHIP_NFC_BASED_COMMISSIONING=y``.
52+
53+
.. note::
54+
:kconfig:option:`CONFIG_CHIP_NFC_BASED_COMMISSIONING` and :kconfig:option:`CONFIG_CHIP_NFC_ONBOARDING_PAYLOAD` are mutually exclusive.
55+
56+
For more details about enabling and using NFC-based commissioning in |NCS| Matter samples, see the :ref:`matter_template_sample` advanced configuration section.
4357

4458
.. _ug_matter_configuring_optional_persistent_subscriptions:
4559

docs/release_notes/release_notes_v100.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,7 @@ Added:
1919
* The Matter samples and applications migrated from the |NCS|.
2020
* The Matter configuration options migrated from the |NCS|.
2121
* The Matter software maturity levels migrated from the |NCS|.
22+
* The NFC Commissioning Manager implementation.
23+
See :ref:`ug_matter_configuring_optional_nfc` for more details.
2224

2325
* Integration of |addon| with the |NCS| v3.4.0.

samples/closure/README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ Advanced configuration options
8383
.. include:: /includes/configuration/advanced/factory_data.txt
8484
.. include:: /includes/configuration/advanced/custom_board.txt
8585
.. include:: /includes/configuration/advanced/internal_memory.txt
86+
.. include:: /includes/configuration/advanced/nfc_commissioning.txt
8687

8788
User interface
8889
**************

samples/contact_sensor/README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Advanced configuration options
7575
.. include:: /includes/configuration/advanced/factory_data.txt
7676
.. include:: /includes/configuration/advanced/custom_board.txt
7777
.. include:: /includes/configuration/advanced/internal_memory.txt
78+
.. include:: /includes/configuration/advanced/nfc_commissioning.txt
7879

7980
User interface
8081
**************

samples/light_bulb/README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ Advanced configuration options
8080
.. include:: /includes/configuration/advanced/factory_data.txt
8181
.. include:: /includes/configuration/advanced/custom_board.txt
8282
.. include:: /includes/configuration/advanced/internal_memory.txt
83+
.. include:: /includes/configuration/advanced/nfc_commissioning.txt
8384

8485
User interface
8586
**************

samples/light_switch/README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ Advanced configuration options
9797
.. include:: /includes/configuration/advanced/factory_data.txt
9898
.. include:: /includes/configuration/advanced/custom_board.txt
9999
.. include:: /includes/configuration/advanced/internal_memory.txt
100+
.. include:: /includes/configuration/advanced/nfc_commissioning.txt
100101

101102
.. _matter_light_switch_sample_lit_icd:
102103

samples/manufacturer_specific/README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ Advanced configuration options
8787
.. include:: /includes/configuration/advanced/factory_data.txt
8888
.. include:: /includes/configuration/advanced/custom_board.txt
8989
.. include:: /includes/configuration/advanced/internal_memory.txt
90+
.. include:: /includes/configuration/advanced/nfc_commissioning.txt
9091

9192
User interface
9293
**************

samples/smoke_co_alarm/README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ Advanced configuration options
9797
.. include:: /includes/configuration/advanced/factory_data.txt
9898
.. include:: /includes/configuration/advanced/custom_board.txt
9999
.. include:: /includes/configuration/advanced/internal_memory.txt
100+
.. include:: /includes/configuration/advanced/nfc_commissioning.txt
100101

101102
User interface
102103
**************

0 commit comments

Comments
 (0)