Skip to content

Commit

Permalink
samples: matter: Enable build with the factory data support.
Browse files Browse the repository at this point in the history
This PR enables factory data generation and usage by default in
all NCS Matter samples.

Signed-off-by: Arkadiusz Balys <[email protected]>
  • Loading branch information
ArekBalysNordic authored and nordicjm committed Aug 24, 2023
1 parent acc4efc commit d1d5673
Show file tree
Hide file tree
Showing 25 changed files with 155 additions and 23 deletions.
4 changes: 4 additions & 0 deletions applications/matter_bridge/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ CONFIG_CHIP_NFC_COMMISSIONING=n

# Reduce application size
CONFIG_USE_SEGGER_RTT=n

# Enable Factory Data feature
CONFIG_CHIP_FACTORY_DATA=y
CONFIG_CHIP_FACTORY_DATA_BUILD=y
4 changes: 4 additions & 0 deletions applications/matter_bridge/prj_release.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ CONFIG_BOOT_BANNER=n

# Disable NFC commissioning
CONFIG_CHIP_NFC_COMMISSIONING=n

# Enable Factory Data feature
CONFIG_CHIP_FACTORY_DATA=y
CONFIG_CHIP_FACTORY_DATA_BUILD=y
16 changes: 9 additions & 7 deletions applications/matter_weather_station/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,26 @@ sample:
name: Matter Weather Station
description: Matter Weather Station application
tests:
# Excluded in quarantine.yaml to limit resources usage in integration builds
applications.matter_weather_station.debug:
# Excluded in quarantine.yaml to limit resource usage in integration builds
# This configuration is used for performing DFU over BLE between different NCS
# applications on Thingy53.
applications.matter_weather_station.debug.no_fd:
build_only: true
platform_allow: thingy53_nrf5340_cpuapp
platform_exclude: thingy53_nrf5340_cpuapp_ns
integration_platforms:
- thingy53_nrf5340_cpuapp
applications.matter_weather_station.release:
# ---------------
applications.matter_weather_station.debug:
build_only: true
extra_args: CONF_FILE=prj_release.conf
extra_args: OVERLAY_CONFIG=overlay-factory_data.conf
platform_allow: thingy53_nrf5340_cpuapp
platform_exclude: thingy53_nrf5340_cpuapp_ns
integration_platforms:
- thingy53_nrf5340_cpuapp
# ---------------
applications.matter_weather_station.factory_data:
applications.matter_weather_station.release:
build_only: true
extra_args: OVERLAY_CONFIG=overlay-factory_data.conf
extra_args: OVERLAY_CONFIG=overlay-factory_data.conf CONF_FILE=release.conf
platform_allow: thingy53_nrf5340_cpuapp
platform_exclude: thingy53_nrf5340_cpuapp_ns
integration_platforms:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ The following list summarizes the most important changes inherited from the upst
* Added the :kconfig:option:`CHIP_MALLOC_SYS_HEAP_WATERMARKS_SUPPORT` Kconfig option to manage watermark support.
* Updated the factory data guide with an additional rotating ID information.
* Fixed RAM and ROM reports.
* Set onboarding code generation to be enabled by default if the :kconfig:option:`CHIP_FACTORY_DATA_BUILD` Kconfig is set.

Thread
------
Expand Down Expand Up @@ -436,6 +437,7 @@ Matter samples
--------------

* Disabled OpenThread shell by default in Matter over Thread samples.
* Enabled build with factory data enabled for all samples.

* :ref:`matter_lock_sample` sample:

Expand Down
11 changes: 11 additions & 0 deletions samples/matter/light_bulb/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ FEM support

.. include:: /includes/sample_fem_support.txt

Factory data support
====================

.. include:: ../lock/README.rst
:start-after: matter_door_lock_sample_factory_data_start
:end-before: matter_door_lock_sample_factory_data_end

User interface
**************

Expand Down Expand Up @@ -321,6 +328,10 @@ For this sample, you can use one of the following :ref:`onboarding information f
- MT:6FCJ142C00KA0648G00
- 34970112332

.. include:: ../lock/README.rst
:start-after: matter_door_lock_sample_onboarding_start
:end-before: matter_door_lock_sample_onboarding_end

|matter_cd_info_note_for_samples|

Upgrading the device firmware
Expand Down
4 changes: 4 additions & 0 deletions samples/matter/light_bulb/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ CONFIG_CHIP_LIB_SHELL=y

# Reduce application size
CONFIG_USE_SEGGER_RTT=n

# Enable Factory Data feature
CONFIG_CHIP_FACTORY_DATA=y
CONFIG_CHIP_FACTORY_DATA_BUILD=y
4 changes: 4 additions & 0 deletions samples/matter/light_bulb/prj_release.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ CONFIG_PRINTK=n
CONFIG_PRINTK_SYNC=n
CONFIG_THREAD_NAME=n
CONFIG_BOOT_BANNER=n

# Enable Factory Data feature
CONFIG_CHIP_FACTORY_DATA=y
CONFIG_CHIP_FACTORY_DATA_BUILD=y
11 changes: 11 additions & 0 deletions samples/matter/light_switch/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@ Device Firmware Upgrade support
:start-after: matter_door_lock_sample_build_with_dfu_start
:end-before: matter_door_lock_sample_build_with_dfu_end

Factory data support
====================

.. include:: ../lock/README.rst
:start-after: matter_door_lock_sample_factory_data_start
:end-before: matter_door_lock_sample_factory_data_end

.. _matter_light_switch_sample_ui:

User interface
Expand Down Expand Up @@ -467,6 +474,10 @@ For this sample, you can use one of the following :ref:`onboarding information f
- MT:4CT9142C00KA0648G00
- 34970112332

.. include:: ../lock/README.rst
:start-after: matter_door_lock_sample_onboarding_start
:end-before: matter_door_lock_sample_onboarding_end

|matter_cd_info_note_for_samples|

Upgrading the device firmware
Expand Down
4 changes: 4 additions & 0 deletions samples/matter/light_switch/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ CONFIG_CHIP_LIB_SHELL=y

# Reduce application size
CONFIG_USE_SEGGER_RTT=n

# Enable Factory Data feature
CONFIG_CHIP_FACTORY_DATA=y
CONFIG_CHIP_FACTORY_DATA_BUILD=y
4 changes: 4 additions & 0 deletions samples/matter/light_switch/prj_release.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ CONFIG_PRINTK=n
CONFIG_PRINTK_SYNC=n
CONFIG_THREAD_NAME=n
CONFIG_BOOT_BANNER=n

# Enable Factory Data feature
CONFIG_CHIP_FACTORY_DATA=y
CONFIG_CHIP_FACTORY_DATA_BUILD=y
26 changes: 26 additions & 0 deletions samples/matter/lock/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,23 @@ The PIN code is different depending on the build type:

See `Testing door lock using Bluetooth LE with Nordic UART Service`_ for more information about how to test this feature.

Factory data support
====================

.. matter_door_lock_sample_factory_data_start
In this sample, the factory data support is enabled by default for all build types except for the ``no_dfu`` build type.
This means that a new factory data set will be automatically generated when building for the target board.

To disable factory data support, set the following Kconfig options to ``n``:

* :kconfig:option:`CONFIG_CHIP_FACTORY_DATA`
* :kconfig:option:`CONFIG_CHIP_FACTORY_DATA_BUILD`

To learn more about factory data, read the :doc:`matter:nrfconnect_factory_data_configuration` page in the Matter documentation.

.. matter_door_lock_sample_factory_data_end
User interface
**************

Expand Down Expand Up @@ -442,6 +459,15 @@ For this sample, you can use one of the following :ref:`onboarding information f
- MT:8IXS142C00KA0648G00
- 34970112332

.. matter_door_lock_sample_onboarding_start
When the factory data support is enabled, the onboarding information will be stored in the build directory in the following files:

* The :file:`factory_data.png` file includes the generated QR code.
* The :file:`factory_data.txt` file includes the QR Code Payload and the manual pairing code.

.. matter_door_lock_sample_onboarding_end
|matter_cd_info_note_for_samples|

Upgrading the device firmware
Expand Down
4 changes: 4 additions & 0 deletions samples/matter/lock/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@ CONFIG_CHIP_LIB_SHELL=y

# Reduce application size
CONFIG_USE_SEGGER_RTT=n

# Enable Factory Data feature
CONFIG_CHIP_FACTORY_DATA=y
CONFIG_CHIP_FACTORY_DATA_BUILD=y
4 changes: 4 additions & 0 deletions samples/matter/lock/prj_release.conf
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ CONFIG_PRINTK=n
CONFIG_PRINTK_SYNC=n
CONFIG_THREAD_NAME=n
CONFIG_BOOT_BANNER=n

# Enable Factory Data feature
CONFIG_CHIP_FACTORY_DATA=y
CONFIG_CHIP_FACTORY_DATA_BUILD=y
4 changes: 4 additions & 0 deletions samples/matter/lock/prj_thread_wifi_switched.conf
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ CONFIG_DFU_MULTI_IMAGE_MAX_IMAGE_COUNT=4

# Reduce application size
CONFIG_USE_SEGGER_RTT=n

# Enable Factory Data feature
CONFIG_CHIP_FACTORY_DATA=y
CONFIG_CHIP_FACTORY_DATA_BUILD=y
16 changes: 3 additions & 13 deletions samples/matter/lock/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ tests:
- nrf5340dk_nrf5340_cpuapp
- nrf7002dk_nrf5340_cpuapp
platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp nrf7002dk_nrf5340_cpuapp
sample.matter.lock.no_dfu:
sample.matter.lock.no_dfu.no_fd:
build_only: true
extra_args: CONF_FILE=prj_no_dfu.conf
extra_args: CONF_FILE=prj_no_dfu.conf CONFIG_CHIP_FACTORY_DATA=n
CONFIG_CHIP_FACTORY_DATA_BUILD=n
integration_platforms:
- nrf21540dk_nrf52840
platform_allow: >
Expand All @@ -46,14 +47,3 @@ tests:
- nrf52840dk_nrf52840
- nrf5340dk_nrf5340_cpuapp
platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp
sample.matter.lock.factory_data:
build_only: true
extra_args: CONFIG_CHIP_FACTORY_DATA=y CONFIG_CHIP_FACTORY_DATA_BUILD=y
CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE=y
CONFIG_CHIP_FACTORY_DATA_USE_DEFAULT_CERTS=y
CONFIG_CHIP_FACTORY_DATA_GENERATE_ONBOARDING_CODES=y
integration_platforms:
- nrf52840dk_nrf52840
- nrf5340dk_nrf5340_cpuapp
- nrf7002dk_nrf5340_cpuapp
platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp nrf7002dk_nrf5340_cpuapp
11 changes: 11 additions & 0 deletions samples/matter/template/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ For this sample, you can use one of the following :ref:`onboarding information f
- MT:Y.K9042C00KA0648G00
- 34970112332

.. include:: ../lock/README.rst
:start-after: matter_door_lock_sample_onboarding_start
:end-before: matter_door_lock_sample_onboarding_end

|matter_cd_info_note_for_samples|

Configuration
Expand All @@ -114,6 +118,13 @@ FEM support

.. include:: /includes/sample_fem_support.txt

Factory data support
====================

.. include:: ../lock/README.rst
:start-after: matter_door_lock_sample_factory_data_start
:end-before: matter_door_lock_sample_factory_data_end

User interface
**************

Expand Down
4 changes: 4 additions & 0 deletions samples/matter/template/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ CONFIG_CHIP_NFC_COMMISSIONING=n

# Reduce application size
CONFIG_USE_SEGGER_RTT=n

# Enable Factory Data feature
CONFIG_CHIP_FACTORY_DATA=y
CONFIG_CHIP_FACTORY_DATA_BUILD=y
4 changes: 4 additions & 0 deletions samples/matter/template/prj_release.conf
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,7 @@ CONFIG_BOOT_BANNER=n

# Disable NFC commissioning
CONFIG_CHIP_NFC_COMMISSIONING=n

# Enable Factory Data feature
CONFIG_CHIP_FACTORY_DATA=y
CONFIG_CHIP_FACTORY_DATA_BUILD=y
11 changes: 11 additions & 0 deletions samples/matter/thermostat/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@ Remote testing in a network
:start-after: matter_light_bulb_sample_remote_testing_start
:end-before: matter_light_bulb_sample_remote_testing_end

Factory data support
====================

.. include:: ../lock/README.rst
:start-after: matter_door_lock_sample_factory_data_start
:end-before: matter_door_lock_sample_factory_data_end

User interface
**************

Expand Down Expand Up @@ -327,6 +334,10 @@ For this sample, you can use one of the following :ref:`onboarding information f
- MT:O4CT342C00KA0648G00
- 34970112332

.. include:: ../lock/README.rst
:start-after: matter_door_lock_sample_onboarding_start
:end-before: matter_door_lock_sample_onboarding_end

Upgrading the device firmware
=============================

Expand Down
4 changes: 4 additions & 0 deletions samples/matter/thermostat/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ CONFIG_CHIP_NFC_COMMISSIONING=y

# Reduce application size
CONFIG_USE_SEGGER_RTT=n

# Enable Factory Data feature
CONFIG_CHIP_FACTORY_DATA=y
CONFIG_CHIP_FACTORY_DATA_BUILD=y
4 changes: 4 additions & 0 deletions samples/matter/thermostat/prj_release.conf
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ CONFIG_THREAD_NAME=n

# Disable NFC commissioning
CONFIG_CHIP_NFC_COMMISSIONING=n

# Enable Factory Data feature
CONFIG_CHIP_FACTORY_DATA=y
CONFIG_CHIP_FACTORY_DATA_BUILD=y
11 changes: 11 additions & 0 deletions samples/matter/window_covering/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ FEM support

.. include:: /includes/sample_fem_support.txt

Factory data support
====================

.. include:: ../lock/README.rst
:start-after: matter_door_lock_sample_factory_data_start
:end-before: matter_door_lock_sample_factory_data_end

User interface
**************

Expand Down Expand Up @@ -263,6 +270,10 @@ For this sample, you can use one of the following :ref:`onboarding information f
- MT:SAGA442C00KA0648G00
- 34970112332

.. include:: ../lock/README.rst
:start-after: matter_door_lock_sample_onboarding_start
:end-before: matter_door_lock_sample_onboarding_end

|matter_cd_info_note_for_samples|

Upgrading the device firmware
Expand Down
4 changes: 4 additions & 0 deletions samples/matter/window_covering/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,7 @@ CONFIG_CHIP_LIB_SHELL=y

# Reduce application size
CONFIG_USE_SEGGER_RTT=n

# Enable Factory Data feature
CONFIG_CHIP_FACTORY_DATA=y
CONFIG_CHIP_FACTORY_DATA_BUILD=y
4 changes: 4 additions & 0 deletions samples/matter/window_covering/prj_release.conf
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,7 @@ CONFIG_PRINTK=n
CONFIG_PRINTK_SYNC=n
CONFIG_THREAD_NAME=n
CONFIG_BOOT_BANNER=n

# Enable Factory Data feature
CONFIG_CHIP_FACTORY_DATA=y
CONFIG_CHIP_FACTORY_DATA_BUILD=y
3 changes: 0 additions & 3 deletions scripts/quarantine_integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

- scenarios:
- sample.matter.lock.release
- sample.matter.lock.factory_data
- sample.matter.light_switch.debug
- sample.matter.thermostat.debug
- sample.matter.light_bulb.persistent_subscriptions
Expand All @@ -19,7 +18,6 @@

- scenarios:
- sample.matter.lock.nus
- sample.matter.lock.factory_data
- sample.matter.window_cover.debug
- sample.matter.template.debug
- sample.matter.light_bulb.ffs
Expand All @@ -35,7 +33,6 @@
comment: "Configurations excluded to limit resources usage in integration builds"

- scenarios:
- applications.matter_weather_station.debug
- applications.matter_weather_station.release
platforms:
- thingy53_nrf5340_cpuapp
Expand Down

0 comments on commit d1d5673

Please sign in to comment.