Matter tools
Use tools listed on this page to test Matter samples and develop Matter applications in the nRF Connect SDK.
GN tool
To build and develop Matter applications, you need the GN meta-build system. This system generates the Ninja files that the nRF Connect SDK uses.
The GN is automatically installed with the nRF Connect SDK’s Toolchain Manager when you install the SDK automatically. If you are updating from the nRF Connect SDK version earlier than v1.5.0 or you are installing the nRF Connect SDK manually, see the GN installation instructions.
Matter controller tools
The following figure shows the available Matter controllers in the nRF Connect SDK.
You can read more about the Matter controller on the Matter network topologies page. For information about how to build and configure the Matter controller, see the pages in the Testing Matter in the nRF Connect SDK section.
CHIP Tool for Linux or macOS
The CHIP Tool for Linux or macOS is the default implementation of the Matter controller role, recommended for the nRF Connect platform. You can read more about it on the Working with the CHIP Tool page in the Matter documentation.
Depending on your system, you can install the CHIP Tool in one of the following ways:
For Linux only - Use the prebuilt tool package from the Matter nRF Connect releases GitHub page. Make sure that the package is compatible with your nRF Connect SDK version.
For both Linux and macOS - Build it manually from the source files available in the
modules/lib/matter/examples/chip-tool
directory and using the building instructions from the Working with the CHIP Tool page in the Matter documentation.
ZAP tool
ZCL Advanced Platform, in short ZAP tool, is a third-party tool that is a generic node.js-based templating engine for applications and libraries based on Zigbee Cluster Library.
You can use the ZAP tool for the following Matter use cases:
Enabling and disabling clusters, cluster commands, attributes, and events.
Configuring attributes’ default values.
Configuring attributes’ properties, such as storage type (RAM storage, non-volatile storage, application-managed).
All the relevant data for these use cases is stored in the ZAP file of your Matter application, which you can edit using the ZAP tool GUI.
A ZAP file is a JSON file that contains the data model configuration of clusters, commands, and attributes that are enabled for a given application.
It is not used directly by the application, but it is used to generate global and customized source files for handling requests enabled by the user.
In the nRF Connect SDK, the ZAP file is provided in the src
directory for each Matter sample.
For an example of how to use the ZAP tool to edit a ZAP file, see the Edit clusters using the ZAP tool in the Adding clusters to Matter application user guide. For more information about the ZAP tool, see the official ZCL Advanced Platform documentation.
Installing the ZAP tool
To install the ZAP tool using the recommended method, complete the following steps:
Download the ZAP package containing pre-compiled executables and libraries and extract it:
Open your installation directory for the nRF Connect SDK in a command line.
Navigate to
modules/lib/matter
.Run the helper script to download and extract the ZAP package:
python scripts/setup/nrfconnect/get_zap.py -l zap_location -o
In this command:
zap_location corresponds to the directory where the ZAP tool package is to be extracted.
The -o argument in the command is used to allow overwriting files, if they already exist in the given location. Otherwise the script will display prompt during download and ask for user consent to overwrite the files directly.
Verify the ZAP tool version by comparing the script output with the following possible cases:
Case 1: If your currently installed ZAP version matches the recommended one, you will see a message similar to the following one:
Your currently installed ZAP tool version: 2022.12.20 matches the recommended one.
This means that your ZAP version is correct and the tool executable can be accessed from the operating system environment, so you can skip the following step about adding the ZAP tool to the system
PATH
environment variable.Case 2: If your currently installed ZAP version does not match the recommended one or no ZAP version is installed on your device, you will see a message similar to the following one:
Your currently installed ZAP tool version 2022.12.19 does not match the recommended one: 2022.12.20.
Alternatively, this message can look like the following one:
No ZAP tool version was found installed on this device.
In this case, the package download process will start automatically:
Trying to download ZAP tool package matching your system and recommended version. 100% [......................................................................] 150136551 / 150136551 ZAP tool package was downloaded and extracted in the given location.
Depending on your operating system, the download will conclude with the following message, with updated zap_cli_location and zap_location paths, which you will need in the following step:
####################################################################################### # Please add the following location(s) to the system PATH: # # zap_location # #######################################################################################
####################################################################################### # Please add the following location(s) to the system PATH: # # zap_location # ######################################################################################
####################################################################################### # Please add the following location(s) to the system PATH: # # zap_cli_location # # zap_location # #######################################################################################
Add the ZAP packages location to the system
PATH
environment variables. This is not needed if your currently installed ZAP version matches the recommended one (case 1 from the previous step).For the detailed instructions for adding
PATH
environment variables on Windows, see Environment Variables.For example, if you are using bash, run the following commands, with zap_location updated with your path:
echo 'export PATH=zap_location:"$PATH"' >> ${HOME}/.bashrc source ${HOME}/.bashrc
For example, if you are using bash, run the following commands, with zap_cli_location and zap_location updated with your paths:
echo 'export PATH=zap_cli_location:"$PATH"' >> ${HOME}/.bash_profile echo 'export PATH=zap_location:"$PATH"' >> ${HOME}/.bash_profile source ${HOME}/.bash_profile
Alternative installation methods
You can also install the ZAP tool using one of the following methods:
Download the ZAP tool package in a compatible version manually from the Assets section in ZCL Advanced Platform releases.
Configure the tool and manually compile it using the instructions in the official ZCL Advanced Platform documentation.
Both these methods still require adding the ZAP tool location to the system PATH
environment variables, as detailed in the step 3 above.
CHIP Certificate Tool
Matter’s CHIP Certificate Tool, in short chip-cert, is a command-line utility tool for generating and editing Matter certificates such as Certificate Declarations (CD), Device Attestation Certificates (DAC), Product Attestation Intermediate (PAI) certificates, and Product Attestation Authority (PAA) certificate, alongside their related keys. You can use it for integration testing purposes while working on a Matter end product.
For more information about the chip-cert tool, see how to generate custom certification declarations for integration testing in the nRF Connect SDK. You can also take a look at the CHIP Certificate Tool source files.
Installing CHIP Certificate Tool
To install the chip-cert tool, complete the following steps:
Navigate to the
connectedhomeip
root directory.In a terminal, run the following command to build the tool executable file:
cd src/tools/chip-cert && gn gen out && ninja -C out chip-cert
Add the chip-cert tool to the system
PATH
environment variable when built.
Generating custom certificates in factory data
Adding the chip-cert tool to the system PATH
allows you to build Matter samples and the Matter weather station application with custom certificates included in the factory data.
This lets you for example change the test Vendor ID, Product ID, or other data.
To build a Matter application in the nRF Connect SDK with custom certification data, make sure to set the CONFIG_CHIP_FACTORY_DATA_USE_DEFAULT_CERTS
to n
when building an example with factory data.
SPAKE2+ Python tool
SPAKE2+ Python Tool is a Python script for generating SPAKE2+ protocol parameters. The protocol is used during Matter commissioning to establish a secure session between the commissioner and the commissionee.
Note
Currently, the tool only supports generating Verifier parameters.
For usage examples, see the SPAKE2+ Python Tool page in the Matter SDK official documentation.
Matter over Thread tools
You can use the following Thread tools when working with Matter in the nRF Connect SDK using the Matter over Thread setup.
Thread Border Router
The Thread Border Router is a specific type of Border Router device that provides connectivity from the IEEE 802.15.4 network to adjacent networks on other physical layers (such as Wi-Fi or Ethernet). Border Routers provide services for devices within the IEEE 802.15.4 network, including routing services for off-network operations.
See the Thread Border Router documentation for configuration instructions.
nRF Sniffer for 802.15.4
The nRF Sniffer for 802.15.4 is a tool for learning about and debugging applications that are using protocols based on IEEE 802.15.4, like Thread or Zigbee. It provides a near real-time display of 802.15.4 packets that are sent back and forth between devices, even when the link is encrypted.
See nRF Sniffer for 802.15.4 for documentation.
nRF Thread Topology Monitor
nRF Thread Topology Monitor is a desktop application that connects to a Thread network through a serial connection to visualize the topology of Thread devices. It allows you to scan for new devices in real time, check their parameters, and inspect network processes through the log.
See nRF Thread Topology Monitor for documentation.