Skip to content

Commit

Permalink
doc: Matter: Add shared configurations page
Browse files Browse the repository at this point in the history
The Matter samples share some configurations. In the case of
the Kconfig options, these are not picked up by the docs build
system. This adds a separate page where these options are documented.

Signed-off-by: Wille Backman <[email protected]>
  • Loading branch information
wiba-nordic committed Nov 25, 2024
1 parent 6039f93 commit 02e9c2b
Show file tree
Hide file tree
Showing 13 changed files with 311 additions and 69 deletions.
38 changes: 19 additions & 19 deletions applications/matter_bridge/doc/matter_bridge_description.rst
Original file line number Diff line number Diff line change
Expand Up @@ -388,113 +388,113 @@ Check and configure the following configuration options:
.. _CONFIG_BRIDGED_DEVICE_IMPLEMENTATION:

CONFIG_BRIDGED_DEVICE_IMPLEMENTATION
Select bridged device implementation.
``bool`` - Select bridged device implementation.
See the :ref:`matter_bridge_app_bridged_support_configs` section for more information.
Accepts the following values:

.. _CONFIG_BRIDGED_DEVICE_SIMULATED:

CONFIG_BRIDGED_DEVICE_SIMULATED
Implement a simulated bridged device.
``bool`` - Implement a simulated bridged device.
You must also configure :ref:`CONFIG_BRIDGED_DEVICE_SIMULATED_ONOFF_IMPLEMENTATION <CONFIG_BRIDGED_DEVICE_SIMULATED_ONOFF_IMPLEMENTATION>`

.. _CONFIG_BRIDGED_DEVICE_BT:

CONFIG_BRIDGED_DEVICE_BT
Implement a Bluetooth LE bridged device.
``bool`` - Implement a Bluetooth LE bridged device.

.. _CONFIG_BRIDGE_HUMIDITY_SENSOR_BRIDGED_DEVICE:

CONFIG_BRIDGE_HUMIDITY_SENSOR_BRIDGED_DEVICE
Enable support for Humidity Sensor bridged device.
``bool`` - Enable support for Humidity Sensor bridged device.

.. _CONFIG_BRIDGE_ONOFF_LIGHT_BRIDGED_DEVICE:

CONFIG_BRIDGE_ONOFF_LIGHT_BRIDGED_DEVICE
Enable support for OnOff Light bridged device.
``bool`` - Enable support for OnOff Light bridged device.

.. _CONFIG_BRIDGE_SWITCH_BRIDGED_DEVICE:

CONFIG_BRIDGE_SWITCH_BRIDGED_DEVICE
Enable support for a switch bridged device.
``bool`` - Enable support for a switch bridged device.
Accepts the following values:

.. _CONFIG_BRIDGE_GENERIC_SWITCH_BRIDGED_DEVICE:

CONFIG_BRIDGE_GENERIC_SWITCH_BRIDGED_DEVICE
Enable support for Generic Switch bridged device.
``bool`` - Enable support for Generic Switch bridged device.

.. _CONFIG_BRIDGE_ONOFF_LIGHT_SWITCH_BRIDGED_DEVICE:

CONFIG_BRIDGE_ONOFF_LIGHT_SWITCH_BRIDGED_DEVICE
Enable support for OnOff Light Switch bridged device.
``bool`` - Enable support for OnOff Light Switch bridged device.

.. _CONFIG_BRIDGE_TEMPERATURE_SENSOR_BRIDGED_DEVICE:

CONFIG_BRIDGE_TEMPERATURE_SENSOR_BRIDGED_DEVICE
Enable support for Temperature Sensor bridged device.
``bool`` - Enable support for Temperature Sensor bridged device.

If you selected the simulated device implementation using the :ref:`CONFIG_BRIDGED_DEVICE_SIMULATED <CONFIG_BRIDGED_DEVICE_SIMULATED>` Kconfig option, also check and configure the following option:

.. _CONFIG_BRIDGED_DEVICE_SIMULATED_ONOFF_IMPLEMENTATION:

CONFIG_BRIDGED_DEVICE_SIMULATED_ONOFF_IMPLEMENTATION
Select the simulated OnOff device implementation.
``bool`` - Select the simulated OnOff device implementation.
Accepts the following values:

.. _CONFIG_BRIDGED_DEVICE_SIMULATED_ONOFF_AUTOMATIC:

CONFIG_BRIDGED_DEVICE_SIMULATED_ONOFF_AUTOMATIC
Automatically simulated OnOff device.
``bool`` - Automatically simulated OnOff device.
The simulated device automatically changes its state periodically.

.. _CONFIG_BRIDGED_DEVICE_SIMULATED_ONOFF_SHELL:

CONFIG_BRIDGED_DEVICE_SIMULATED_ONOFF_SHELL
Shell-controlled simulated OnOff device.
``bool`` - Shell-controlled simulated OnOff device.
The state of the simulated device is changed using shell commands.

If you selected the Bluetooth LE device implementation using the :ref:`CONFIG_BRIDGED_DEVICE_BT <CONFIG_BRIDGED_DEVICE_BT>` Kconfig option, also check and configure the following options:

.. _CONFIG_BRIDGE_BT_MAX_SCANNED_DEVICES:

CONFIG_BRIDGE_BT_MAX_SCANNED_DEVICES
Set the maximum number of scanned devices.
``int`` - Set the maximum number of scanned devices.

.. _CONFIG_BRIDGE_BT_MINIMUM_SECURITY_LEVEL:

CONFIG_BRIDGE_BT_MINIMUM_SECURITY_LEVEL
Set the minimum Bluetooth security level of bridged devices that the bridge device will accept.
``int`` - Set the minimum Bluetooth security level of bridged devices that the bridge device will accept.
Bridged devices using this or a higher level will be allowed to connect to the bridge.
See the :ref:`matter_bridge_app_bt_security` section for more information.

.. _CONFIG_BRIDGE_BT_RECOVERY_MAX_INTERVAL:

CONFIG_BRIDGE_BT_RECOVERY_MAX_INTERVAL
Set the maximum time (in seconds) between recovery attempts when the Bluetooth LE connection to the bridged device is lost.
``int`` - Set the maximum time (in seconds) between recovery attempts when the Bluetooth LE connection to the bridged device is lost.

.. _CONFIG_BRIDGE_BT_RECOVERY_SCAN_TIMEOUT_MS:

CONFIG_BRIDGE_BT_RECOVERY_SCAN_TIMEOUT_MS
Set the time (in milliseconds) within which the Bridge will try to re-establish a connection to the lost Bluetooth LE device.
``int`` - Set the time (in milliseconds) within which the Bridge will try to re-establish a connection to the lost Bluetooth LE device.

.. _CONFIG_BRIDGE_BT_SCAN_TIMEOUT_MS:

CONFIG_BRIDGE_BT_SCAN_TIMEOUT_MS
Set the Bluetooth LE scan timeout in milliseconds.
``int`` - Set the Bluetooth LE scan timeout in milliseconds.

The following options affect how many bridged devices the application supports.
See the :ref:`matter_bridge_app_bridged_support_configs` section for more information.

.. _CONFIG_BRIDGE_MAX_BRIDGED_DEVICES_NUMBER:

CONFIG_BRIDGE_MAX_BRIDGED_DEVICES_NUMBER
Set the maximum number of physical non-Matter devices supported by the Bridge.
``int`` - Set the maximum number of physical non-Matter devices supported by the Bridge.

.. _CONFIG_BRIDGE_MAX_DYNAMIC_ENDPOINTS_NUMBER:

CONFIG_BRIDGE_MAX_DYNAMIC_ENDPOINTS_NUMBER
Set the maximum number of dynamic endpoints supported by the Bridge.
``int`` - Set the maximum number of dynamic endpoints supported by the Bridge.

.. _matter_bridge_app_bridged_support_configs:

Expand Down
18 changes: 9 additions & 9 deletions doc/nrf/protocols/matter/end_product/test_event_triggers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Default test event triggers
***************************

You can use the pre-defined common test event triggers in your application.
To disable them, set the :kconfig:option:`CONFIG_NCS_SAMPLE_MATTER_TEST_EVENT_TRIGGERS_REGISTER_DEFAULTS` Kconfig option to ``n``.
To disable them, set the :ref:`CONFIG_NCS_SAMPLE_MATTER_TEST_EVENT_TRIGGERS_REGISTER_DEFAULTS<CONFIG_NCS_SAMPLE_MATTER_TEST_EVENT_TRIGGERS_REGISTER_DEFAULTS>` Kconfig option to ``n``.

The following table lists the available triggers and their activation codes:

Expand Down Expand Up @@ -65,37 +65,37 @@ The following table lists the available triggers and their activation codes:
The maximum time delay is UINT16_MAX ms.
The value is provided in HEX format.
* - Block the Matter thread
- :kconfig:option:`CONFIG_NCS_SAMPLE_MATTER_WATCHDOG` = ``y``, and :kconfig:option:`CONFIG_NCS_SAMPLE_MATTER_WATCHDOG_DEFAULT` = ``y``
- :ref:`CONFIG_NCS_SAMPLE_MATTER_WATCHDOG<CONFIG_NCS_SAMPLE_MATTER_WATCHDOG>` = ``y``, and :ref:`CONFIG_NCS_SAMPLE_MATTER_WATCHDOG_DEFAULT<CONFIG_NCS_SAMPLE_MATTER_WATCHDOG_DEFAULT>` = ``y``
- Block the Matter thread for specific amount of time.
You can use this event trigger to check the :ref:`Matter Watchdog <ug_matter_device_watchdog>` functionality.
- ``0xFFFFFFFF20000000`` - ``0xFFFFFFFF2000FFFF``
- The range of ``0x0000`` - ``0xFFFF`` represents the time in s to block the Matter thread.
The maximum time is UINT16_MAX s.
The value is provided in HEX format.
* - Block the Main thread
- :kconfig:option:`CONFIG_NCS_SAMPLE_MATTER_WATCHDOG` = ``y``, and :kconfig:option:`CONFIG_NCS_SAMPLE_MATTER_WATCHDOG_DEFAULT` = ``y``
- :ref:`CONFIG_NCS_SAMPLE_MATTER_WATCHDOG<CONFIG_NCS_SAMPLE_MATTER_WATCHDOG>` = ``y``, and :ref:`CONFIG_NCS_SAMPLE_MATTER_WATCHDOG_DEFAULT<CONFIG_NCS_SAMPLE_MATTER_WATCHDOG_DEFAULT>` = ``y``
- Block the Main thread for specific amount of time.
You can use this event trigger to check the :ref:`Matter Watchdog <ug_matter_device_watchdog>` functionality.
- ``0xFFFFFFFF30000000`` - ``0xFFFFFFFF3000FFFF``
- The range of ``0x0000`` - ``0xFFFF`` represents the time in s to block the Main thread.
The maximum time is UINT16_MAX s.
The value is provided in HEX format.
* - Diagnostic Logs User Data
- Enabled ``Diagnostic Logs`` cluster, and either the snippet `diagnostic-logs` attached (``-D<application_name>_SNIPPET=diagnostic-logs``) or both :kconfig:option:`CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS` = ``y`` and :kconfig:option:`CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS_END_USER_LOGS` = ``y``.
- Enabled ``Diagnostic Logs`` cluster, and either the snippet ``matter-diagnostic-logs`` attached (``-D<application_name>_SNIPPET=matter-diagnostic-logs``) or both :ref:`CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS<CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS>` = ``y`` and :ref:`CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS_END_USER_LOGS<CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS_END_USER_LOGS>` = ``y``.
- Trigger writing a specific number of ``u`` characters to the user diagnostics logs.
The number of characters is determined by the value at the end of the event trigger value.
The current supported maximum is 1023 bytes for single trigger call, and 4096 bytes of total data written.
- ``0xFFFFFFFF40000000`` - ``0xFFFFFFFF40000400``
- The range of ``0x0000`` - ``0x0400`` (from 1 Bytes to 1024 Bytes), ``0x0000`` to clear logs.
* - Diagnostic Logs Network Data
- Enabled ``Diagnostic Logs`` cluster, and either the snippet `diagnostic-logs` attached (``-D<application_name>_SNIPPET=diagnostic-logs``) or both :kconfig:option:`CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS` = ``y`` and :kconfig:option:`CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS_NETWORK_LOGS` = ``y``.
- Enabled ``Diagnostic Logs`` cluster, and either the snippet ``matter-diagnostic-logs`` attached (``-D<application_name>_SNIPPET=matter-diagnostic-logs``) or both :ref:`CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS<CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS>` = ``y`` and :ref:`CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS_NETWORK_LOGS<CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS_NETWORK_LOGS>` = ``y``.
- Trigger writing a specific number of ``n`` characters to the network diagnostics logs.
The number of characters is determined by the value at the end of the event trigger value.
The current supported maximum is 1023 bytes for single trigger call, and 4096 bytes of total data written.
- ``0xFFFFFFFF50000000`` - ``0xFFFFFFFF50000400``
- The range of ``0x0000`` - ``0x0400`` (from 1 Bytes to 1024 Bytes), ``0x0000`` to clear logs.
* - Diagnostic Crash Logs
- Either the snippet `diagnostic-logs` attached (``-D<application_name>_SNIPPET=diagnostic-logs``) or both :kconfig:option:`CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS` = ``y`` and :kconfig:option:`CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS_CRASH_LOGS` = ``y``, and enabled ``Diagnostic Logs`` cluster.
- Either the snippet ``matter-diagnostic-logs`` attached (``-D<application_name>_SNIPPET=matter-diagnostic-logs``) or both :ref:`CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS<CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS>` = ``y`` and :ref:`CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS_CRASH_LOGS<CONFIG_NCS_SAMPLE_MATTER_DIAGNOSTIC_LOGS_CRASH_LOGS>` = ``y``, and enabled ``Diagnostic Logs`` cluster.
- Trigger a simple crash that relies on execution of the undefined instruction attempt.
- ``0xFFFFFFFF60000000``
- No additional value supported.
Expand Down Expand Up @@ -261,7 +261,7 @@ A new event trigger consists of two fields: ``Mask``, and ``Callback``.
* The ``Callback`` field is a callback function that will be invoked when the device receives a corresponding activation code.

The maximum number of event triggers that can be registered is configurable.
To adjust this limit, set the :kconfig:option:`CONFIG_NCS_SAMPLE_MATTER_TEST_EVENT_TRIGGERS_MAX` Kconfig option to the desired value.
To adjust this limit, set the :ref:`CONFIG_NCS_SAMPLE_MATTER_TEST_EVENT_TRIGGERS_MAX<CONFIG_NCS_SAMPLE_MATTER_TEST_EVENT_TRIGGERS_MAX>` Kconfig option to the desired value.

To register a new test event trigger, follow these steps:

Expand Down Expand Up @@ -341,7 +341,7 @@ Use the following example as a guide to register an existing event trigger handl
/* Remember to check the CHIP_ERROR return code */
If the returning ``CHIP_ERROR`` code is equal to ``CHIP_ERROR_NO_MEMORY``, you need to increase the :kconfig:option:`CONFIG_NCS_SAMPLE_MATTER_TEST_EVENT_TRIGGERS_MAX_TRIGGERS_DELEGATES` Kconfig option to the higher value.
If the returning ``CHIP_ERROR`` code is equal to ``CHIP_ERROR_NO_MEMORY``, you need to increase the :ref:`CONFIG_NCS_SAMPLE_MATTER_TEST_EVENT_TRIGGERS_MAX_TRIGGERS_DELEGATES<CONFIG_NCS_SAMPLE_MATTER_TEST_EVENT_TRIGGERS_MAX_TRIGGERS_DELEGATES>` Kconfig option to the higher value.

For example, you can register and use the ``OTATestEventTriggerHandler`` handler and trigger pre-defined Matter OTA DFU behaviors using the following code:

Expand All @@ -355,7 +355,7 @@ Usage
*****

The Matter test event triggers feature is enabled by default for all Matter samples.
To disable it, set the :kconfig:option:`CONFIG_NCS_SAMPLE_MATTER_TEST_EVENT_TRIGGERS` Kconfig option to ``n``.
To disable it, set the :ref:`CONFIG_NCS_SAMPLE_MATTER_TEST_EVENT_TRIGGERS<CONFIG_NCS_SAMPLE_MATTER_TEST_EVENT_TRIGGERS>` Kconfig option to ``n``.

To trigger a specific event on the device, run the following command:

Expand Down
8 changes: 4 additions & 4 deletions doc/nrf/protocols/matter/end_product/watchdog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ This approach eliminates the need to directly call the ``Feed()`` method in your
A time window specifies the period within which the feeding signal must be sent to each watchdog channel to reset the timer and prevent the device from rebooting.
If the feeding signal is sent after the time window has elapsed, it does not prevent the device from rebooting.

To enable the Matter watchdog feature, set the :kconfig:option:`CONFIG_NCS_SAMPLE_MATTER_WATCHDOG` Kconfig option to ``y``.
To enable the Matter watchdog feature, set the :ref:`CONFIG_NCS_SAMPLE_MATTER_WATCHDOG<CONFIG_NCS_SAMPLE_MATTER_WATCHDOG>` Kconfig option to ``y``.
The feature is enabled by default for the release build type in all Matter samples and applications.

To set the timeout for the watchdog timer, configure the :kconfig:option:`CONFIG_NCS_SAMPLE_MATTER_WATCHDOG_TIMEOUT` with a value in milliseconds.
To set the timeout for the watchdog timer, configure the :ref:`CONFIG_NCS_SAMPLE_MATTER_WATCHDOG_TIMEOUT<CONFIG_NCS_SAMPLE_MATTER_WATCHDOG_TIMEOUT>` with a value in milliseconds.
By default, the timeout is set to 10 seconds.

Creating a Matter watchdog source
Expand Down Expand Up @@ -250,7 +250,7 @@ Default Matter watchdog implementation

In the Matter common module, there is a default implementation of two watchdog sources that are automatically created for the release build version of a Matter sample.
One source is dedicated to monitoring the Main thread, and the other is dedicated to monitoring the Matter thread.
If at least one of the threads is blocked for a longer time than the value specified in the :kconfig:option:`CONFIG_NCS_SAMPLE_MATTER_WATCHDOG_TIMEOUT` Kconfig option, a reboot will occur.
If at least one of the threads is blocked for a longer time than the value specified in the :ref:`CONFIG_NCS_SAMPLE_MATTER_WATCHDOG_TIMEOUT<CONFIG_NCS_SAMPLE_MATTER_WATCHDOG_TIMEOUT>` Kconfig option, a reboot will occur.
The ``Nrf::Watchdog::Enable()``, and ``InstallSource(WatchdogSource &source)`` functions are called automatically.

To disable the default Matter watchdog implementation, set the :kconfig:option:`CONFIG_NCS_SAMPLE_MATTER_WATCHDOG_DEFAULT` Kconfig option to ``n``.
To disable the default Matter watchdog implementation, set the :ref:`CONFIG_NCS_SAMPLE_MATTER_WATCHDOG_DEFAULT<CONFIG_NCS_SAMPLE_MATTER_WATCHDOG_DEFAULT>` Kconfig option to ``n``.
Loading

0 comments on commit 02e9c2b

Please sign in to comment.