diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 8685bab7478ec7..c811299aae330f 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -258,6 +258,7 @@ DataFrame dataset datasets dbf +DBG dBm DBUILD dbus @@ -316,6 +317,7 @@ DMM DNS Dnsmasq dnsmasqd +DNSSD DNSStubListener Dockerfile Dockerfiles @@ -650,6 +652,7 @@ MoveToSaturation MoveWithOnOff MPSL MRP +MTD MTU Multiband Multicast @@ -940,6 +943,7 @@ submodules subprocess SubscribeResponse SubscriptionId +subtype sudo svg SVR diff --git a/config/zephyr/Kconfig b/config/zephyr/Kconfig index 8ace731baac543..90c7595fe5020d 100644 --- a/config/zephyr/Kconfig +++ b/config/zephyr/Kconfig @@ -151,6 +151,20 @@ config CHIP_ROTATING_DEVICE_ID Enables rotating device identifier that provides a non-trackable identifier which is unique per device and rotates at pre-defined moments. +config CHIP_COMMISSIONABLE_DEVICE_TYPE + bool "Enable the device type subtype in commissionable node discovery record" + depends on CHIP_ENABLE_DNSSD_SRP + help + Enables including device type subtype in the commissionable node discovery record, + which allows filtering of the results to find the nodes that match the device type. + +config CHIP_DEVICE_TYPE + int "Device type" + default 65535 + range 0 65535 + help + Type of device that uses the CHIP Device Type Identifier. The default value means invalid device type. + config CHIP_OPERATIONAL_TIME_SAVE_INTERVAL int "Interval of saving node operation time to flash in hours unit" default 10 diff --git a/docs/guides/nrfconnect_examples_configuration.md b/docs/guides/nrfconnect_examples_configuration.md index f51250e9662b49..b0d94ae84540d4 100644 --- a/docs/guides/nrfconnect_examples_configuration.md +++ b/docs/guides/nrfconnect_examples_configuration.md @@ -142,3 +142,85 @@ Read the guide in the nRF Connect SDK's Zephyr documentation if you are interested in getting more advanced and detailed information about the configuration structure. + +
+ +## Configuring Matter in nRF Connect platform + +### Mandatory configuration + +To use the Matter protocol, you need to set the `CONFIG_CHIP` Kconfig option. +Setting this option enables the Matter protocol stack and other associated +Kconfig options, including `CONFIG_CHIP_ENABLE_DNSSD_SRP` that is required for +the Matter device to be discoverable using DNS-SD. + +After that, make sure to set the `CONFIG_CHIP_PROJECT_CONFIG` Kconfig option and +define the path to the configuration file that specifies Vendor ID, Product ID, +and other project-specific Matter settings. + +
+ +### Optional configuration + +After enabling the Matter protocol and defining the path to the Matter +configuration file, you can enable additional options in Kconfig. + +**Sleepy End Device support** + +You can enable the support for Thread Sleepy End Device in Matter by setting the +following Kconfig options: + +- `CONFIG_OPENTHREAD_MTD` +- `CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT` + +**Commissioning with NFC support** + +You can configure the Matter protocol to use an NFC tag for commissioning, +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. + +**Logging** + +You can enable logging for both the stack and Zephyr’s +[Logging](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/reference/logging/index.html#logging-api) +API by setting the `CONFIG_LOG` option. + +Zephyr allows you to configure log levels of different software modules +independently. To change the log level configuration for the Matter module, set +one of the available options: + +- `CONFIG_MATTER_LOG_LEVEL_ERR` +- `CONFIG_MATTER_LOG_LEVEL_INFO` +- `CONFIG_MATTER_LOG_LEVEL_DBG` + +**Shell** + +You can enable the Matter shell library using the `CONFIG_CHIP_LIB_SHELL` +Kconfig option. This option lets you use the Matter specific shell commands. See +[Using CLI in nRF Connect examples](nrfconnect_examples_cli.md) for the list of +available Matter shell commands. + +**Matter device identification** + +Matter has many mandatory and optional ways to identify a specific device. These +can be used for various purposes, such as dividing devices into groups (by +function, by vendor or by location), device commissioning or vendor-specific +cases before the device was commissioned (for example, identifying factory +software version or related features). + +Only some part of these features can be configured using Kconfig options and +only those were listed below: + +- `CONFIG_CHIP_DEVICE_TYPE` - type of device that uses the Matter Device Type + Identifier, for example Door Lock (0x000A) or Dimmable Light Bulb (0x0101). +- `CONFIG_CHIP_COMMISSIONABLE_DEVICE_TYPE` - enables including optional device + type subtype in the commissionable node discovery record, which allows + filtering of the discovery results to find the nodes that match the device + type. +- `CONFIG_CHIP_ROTATING_DEVICE_ID` - enables rotating device identifier, an + optional feature that provides an additional unique identifier for each + device. This identifier is similar to the serial number, but it additionally + changes at predefined times to protect against long-term tracking of the + device. diff --git a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h index 60baa9424f4784..1097f7b2ff8fd6 100644 --- a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h +++ b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h @@ -102,3 +102,11 @@ #ifdef CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT #define CHIP_DEVICE_CONFIG_ENABLE_SED 1 #endif // CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT + +#ifdef CONFIG_CHIP_COMMISSIONABLE_DEVICE_TYPE +#define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DEVICE_TYPE 1 +#endif // CONFIG_CHIP_COMMISSIONABLE_DEVICE_TYPE + +#ifdef CONFIG_CHIP_DEVICE_TYPE +#define CHIP_DEVICE_CONFIG_DEVICE_TYPE CONFIG_CHIP_DEVICE_TYPE +#endif // CONFIG_CHIP_DEVICE_TYPE