Matter TH User Guide
Matter TH User Guide
Test-Harness Links
Matter Version TH Version TH image Supporting Comments
location Documentation
1
Revision History
Revision Date Author Description
2
Table of contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2. References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3. Test-Harness (TH) Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1. TH Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.2. Data Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.3. Data Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4. Getting Started with Matter Test-Harness (TH) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.1. TH Image Installation on Raspberry Pi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.2. Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.3. TH installation without a Raspberry Pi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.4. Update Existing TH. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.5. Updating Existing Yaml Test Script. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5. Bringing Up of Matter Node (DUT) for Certification Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.1. Bringing Up of Reference Matter Node (DUT) on Raspberry Pi. . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.2. Bringing Up of Reference Matter Node (DUT) on Thread Platform . . . . . . . . . . . . . . . . . . . . . . . . 16
6. OT Border Router (OTBR) Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.1. Instructions to Flash the Firmware NRF52840 RCPDongle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.2. Instructions to Flash SiLabs RCP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
6.3. Forming Thread Network and Generating Dataset for Thread Pairing . . . . . . . . . . . . . . . . . . . . 25
6.4. Troubleshooting: Boarder Router Container failure to initialize . . . . . . . . . . . . . . . . . . . . . . . . . . 28
7. Test Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
7.1. Project Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
8. Test Case Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
8.1. Automated and Semi Automated Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
8.2. Python Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
8.3. Manual Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
8.4. Simulated Tests (app1_tests) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
8.5. “Python test” Inside Docker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
9. Collect Logs and Submit to TEDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
9.1. Instructions to Download Test Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
9.2. Upload Test Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
9.3. Finalizing Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
9.4. Test Results Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3
1. Introduction
The Matter Test-Harness is a comprehensive test tool used for certification testing of Matter devices
in accordance with the Matter protocol as defined in the Matter specification [2].
This user guide serves as the primary user documentation to work with the Test-Harness ( TH ) tool,
providing high-level architecture of the tool, how to use the tool to execute certification tests and
submit the test results to CSA for certification.
The TH tool runs on the Raspberry Pi platform, providing an intuitive Web user interface to create
a test project, configure the project/Device Under Test ( DUT ) settings, load the required test cases
using the PICS xml file and execute test cases for various devices (commissioner, controller and
controlee) as defined in the Matter specification.
The TH tool provides an option to execute the following test scripts— Automated, Semi Automated,
Python, Manual and Simulated. Upon completion of the test execution, detailed logs and test results
will be available for user analysis. The user will also be able to submit logs to ATL’s for review to
obtain device certification.
The TH tool can be used by any DUT vendor to run the Matter certification tests OR by any hobby
developer to get acquainted with the Matter certification testing tools or technologies.
4
2. References
1. Matter Specification: Matter Specification (Causeway) / Matter Specification (Github)
3. Matter Test Plans: Matter Test Plans (Causeway) / Matter Test Plans (GitHub)
4. PICS Tool: PICS Tool v1.6.4 matter 1.0 - Connectivity Standards Alliance (csa-iot.org)
5
3. Test-Harness (TH) Design
This section outlines the TH architecture, data model and data flow on how different components of
TH communicate with each other.
3.1. TH Layout
Each of the main subsystems of the Test Harness (Proxy, Frontend, Backend and Database) runs on
its own docker container deployed to a Ubuntu Raspberry Pi platform. The Proxy container hosts
an instance of the traefik application proxy (https://traefik.io/traefik/) which is responsible to route
user requests coming from an external (to the Raspberry Pi) web browser to either the Frontend or
the Backend as appropriate. The Frontend container serves the dynamic web pages that comprise
the Web GUI to be rendered on the user browser including the client-side logic. According to that
client-side logic and user input, REST API requests are sent again by the external browser to the
Application Proxy and get redirected to the Backend container, where a FastAPI
(https://fastapi.tiangolo.com/) Python application implements the server-side logic. Any application
information that needs to be persisted gets serialized and written by the server-side logic to the
Postgres database running in the Database container.
In addition to the four main containers described above, which get created and destroyed when the
Raspberry Pi platform respectively boots up and shuts down, two other containers are created and
destroyed dynamically on demand according to the test execution lifecycle: the SDK container and
the OTBR container. The SDK container has copies of the Matter SDK tools (binary executables)
6
which can be used to play the role of clients and servers of the Matter protocol in test interactions,
either as Test Harness actuators or DUT simulators. That container gets automatically created and
destroyed by the server-side logic at the start and at the end, respectively, of a Test Suite which
needs actuators or simulators. The OTBR container, on the other hand, hosts an instance of the
Open Thread Border Router and needs to be explicitly started by the TH user when she wants to
test a real Matter device that runs over a Thread fabric, as described in section 6, OT Border Router
(OTBR) Setup.
The data model diagram in Figure 2 shows the various data objects that the Test Execution
consumes and maintains and the relationship between these data objects.
• Test Run
• DUT Config
• Harness Config
7
• Test Case
• Test Step
• Test Suite
8
4. Getting Started with Matter Test-Harness
(TH)
The Matter Node (DUT) that is used for certification testing can either be a commissioner, controller
or controlee.
If the DUT is a controlee (e.g., light bulb), the TH spins a reference commissioner/controller using
chip-tool binary shipped with the SDK. The TH commissioner provisions the DUT and is used to
execute the certification tests on the controlee.
If the DUT is a commissioner/controller, the Test TH spins an example accessory that is shipped
with the SDK and uses that for the DUT to provision, control and run certification tests.
Refer to Section 5, Bringing Up of Matter Node (DUT) for Certification Testing to bring up the DUT
and then proceed with device testing by referring to Section 7, Test Configuration.
For hobby developers who want to get acquainted with certification tools/process/TC’s, can spin
DUT’s using the example apps provided in the SDK. Refer to the instructions to set up one here.
TH runs on Ubuntu 22.04 Server LTS. It can be set up in a Raspberry Pi (TH Image Installation on
Raspberry Pi) or not (TH installation without a Raspberry Pi)
4.1.1. Prerequisites
The TH image will be installed on Raspberry PI. The TH image contains couple of docker
container(s) with all the required dependencies for certification tests execution.
The Mac/PC will be used to download the TH image and flash on the SD card to be used on
Raspberry Pi. Download the Raspberry Pi Imager or Balena Etcher tool. The same can be used to set
up the required build environment for the Matter SDK or building Matter reference apps for
various platforms.
• RCP dongle
If the DUT supports thread transport, an RCP dongle provisioned with a recommended RCP image
for the default OTBR router that comes with the TH will be required to function properly. Currently,
the OTBR can work with a Nordic RCP dongle or a SiLabs RCP dongle. Refer to Section 6, OT Border
9
Router (OTBR) Setup on how to install an RCP image.
1. Go to the TH release location and download the official TH image from the given link on the
user’s PC/Mac.
2. Place the blank SD card into the user’s system USB slot.
3. Open the Raspberry Pi Imager or Balena Etcher tool on the Mac/PC and select the image file
from the drop-down list to flash.
4. After the SD card has been flashed with the image, remove the SD card and place it in the
Raspberry Pi’s memory card slot.
5. Power on the Raspberry Pi and ensure that the local area network, display monitor and
keyboard are connected.
◦ username: ubuntu
◦ password: raspberrypi
7. Using the ifconfig command, obtain the IP address of the Raspberry Pi. The same IP address will
be used to launch the TH user interface on the user’s system using the browser.
8. Proceed with test configuration and execution (refer to Section 7, Test Configuration and Section
8, Test Case Execution respectively).
4.2. Troubleshooting
4.2.1. Read-Only File System Error
• During the execution of the above commands if a read-only file system error or an error
showing "Is docker daemon running?" occurs, follow the steps below to fix the issue:
$sudo reboot
ssh back into the TH IP address using:
$ssh ubuntu@<IPADDRESS-OF-THE-RASPI>
• In case the “remote: Repository not found” fatal error occurs, try the following steps to fix the
issue. Clone the chip-certification-tool with personal access token (Refer to Section 4.2.2,
Generate Personal Access Token to generate the personal access token) and follow the steps
10
below.
cd ~
Follow the instructions given in the above section on how to update an existing Test-Harness
image
The Personal Access Token may be required during the process of updating an existing TH image.
Below are the instructions to obtain the personal access token.
1. Connect to the Github account (the one recognized and authorized by Matter).
2. On the upper-right corner of the page, click on the profile photo, then click on Settings.
4. On the left sidebar, click on Personal access tokens [Personal access tokens (classic)].
10. The generated token will be printed out on the screen. Make sure to save it as a local copy as it
will disappear.
During the initial reboot of the Raspberry Pi, if the docker is not initiated automatically, try the
following command on the Raspberry Pi terminal to bring up the dockers.
Use the command ssh ubuntu@IP_address from the PC to log in to Raspberry Pi. Refer above
sections on how to obtain the IP address of Raspberry Pi.
Once the SSH connection is successful, start the docker container using the command
$ ./chip-certification-tool/scripts/start.sh
The above command might take a while to get executed, wait for 5-10 minutes and then proceed
with the Test Execution Steps as outlined in the below sections.
11
4.3. TH installation without a Raspberry Pi
To install TH without using a Raspberry Pi you’ll need a machine with Ubuntu 22.04 Server LTS. You
can create a virtual machine for this purpose (Create an Ubuntu virtual machine), but be aware
that if the host’s architecture is not arm64 you’ll need to substitute the SDK’s docker image in order
for it to work properly Substitute the SDK’s docker image and update sample apps.
• Install multipass
• Create new VM with Ubuntu 22.04 (2 cpu cores, 8G mem and a 50G disk)
• SSH into VM
About Multipass:
Seems like bridged network is not available, so you will not be able to test with
DUT outside the docker container, but you can develop using the sample apps on
the platform.
cd chip-certification-tool
./scripts/ubuntu/auto-install.sh
• Reboot VM
12
If using multipass, to find the IP address use the command
multipass list
4.3.3. Substitute the SDK’s docker image and update sample apps
In order to run TH in a machine that uses the 'linux/amd64' platform, you’ll need to first build a
new SDK docker image.
• Download the Dockerfile for chip-cert-bins from the commit you need
• Make sure that no other SDK image for that commit SHA is loaded in the machine
To update your sample apps using the new image, you should first edit the chip-certification-
tool/scripts/ubuntu/update-sample-apps.sh` script to comment out or remove the following line:
sudo docker pull $SDK_DOCKER_IMAGE:$SDK_DOCKER_TAG
This is needed because the docker pull command downloads the image from the remote.
Removing this line, the script will use your local image.
Then run this script in the chip-certification-tool repository
./scripts/ubuntu/update-sample-apps.sh
13
cd ~/chip-certification-tool
git fetch
git checkout <Target_Branch>
git pull
./scripts/ubuntu/auto-update.sh <Target_Branch>
./scripts/start.sh
Wait for 10 mins and open the TH application using the browser
~/chip-certification-tool/backend/test_collections/yaml_tests/yaml/sdk/
~/chip-certification-tool/backend/test_collections/yaml_tests/yaml/sdk/Test_TC_ACE_1_1.yaml
14
5. Bringing Up of Matter Node (DUT) for
Certification Testing
A Matter node can either be a commissioner, controller, controlee, software component or an
application. The Matter SDK comes with a few example apps that can be used by Vendors as a
reference to build their products. Refer to the examples folder in the SDK repo github for the same.
DUT vendors need to get the device flashed with the production firmware revision that they want
to get their device certified and execute all the applicable TC’s for their products using the TH. DUT
vendors can skip the below sections as the TH brings up the reference applications automatically
during the certification tests execution.
A hobby developer can build Matter reference apps either using a Raspberry Pi or Nordic DK board
(if the user wants to use thread transport). Follow the instructions below for the Raspberry Pi and
Nordic platforms.
Users can either use the example apps (i.e. light bulb, door lock, etc.) that are shipped with the TH
image OR build the apps from the latest SDK source.
To use the apps that are shipped with the TH image, follow the instructions below:
• Go to the apps folder in /home/ubuntu/apps (as shown below) and launch the app that the user
is interested in.
To build the example apps from the latest SDK source, follow the instructions below:
• Flash the TH image on to the SDK card that will be inserted into the Raspberry Pi as the TH
image comes with the default Ubuntu OS image OR the user can download the latest Ubuntu LTS
image and install all the required dependencies as outlined in https://github.com/project-
chip/connectedhomeip/blob/master/docs/guides/BUILDING.md.
• Clone the connected home SDK repo using the following commands:
15
$ git clone [email protected]:project-chip/connectedhomeip.git --recursive
$ cd connectedhome
$ source scripts/bootstrap.sh
$ source scripts/activate.sh
• Select the sample app that the user wants to build as available in the examples folder of the SDK
repo e.g., lighting-app, all-cluster-app. The user needs to build these apps for the Linux platform
using the following command:
./scripts/examples/gn_build_example.sh examples/all-clusters-app/linux/examples/all-clusters-
app/linux/out/all-clusters-app chip_inet_config_enable_ipv4=false
The sample app (lighting-app or lock-app or all-cluster-app) can be provisioned over the Wi-Fi
network when the app is launched with the “--wifi” argument.
./chip-all-clusters-app --wifi
The sample app (lighting-app or lock-app or all-cluster-app) can be provisioned over the Ethernet
(using onnetwork configuration) that it is connected when the app is launched with no arguments.
./chip-all-clusters-app
https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/
nrfconnect#matter-nrf-connect-all-clusters-example-application
5.2.1. Prerequisites
The following devices are required for a stable and full Thread Setup:
The DUT nRF52840-DK board mentioned in this manual is used for illustration
purposes only. If the user has a different DUT, they will need to configure the DUT
following the DUT requirements.
16
5.2.2. Setting Up Thread Board (nRF52840-DK)
The nRF52840-DK setup can be performed in two methods either by flashing the pre-
built binary hex of sample apps which is released along with the TH image by using
the nRF Connect Desktop application tool (refer Section 5.2.2.1) or by building the
docker environment to build the sample apps (refer Section 5.2.2.2).
5.2.2.1. Instructions to Set Up nRF52840-DK Using nRF Connect Desktop Application Tool
a. Requirements:
1. nRF Connect for Desktop tool: Installer for Windows, MAC or Linux
2. Download thread binary files which are released along with the TH image.
2. From the nRF Connect for Desktop tool, install Programmer from the apps tab.
3. Open the Programmer tool to flash the downloaded binary hex file on nRF52840-DK.
17
4. In the Programmer tool, select the device name from the SELECT DEVICE drop-down list.
5. Select Add file and browse the downloaded file to upload the desired sample app hex file.
18
6. Select Erase & write to flash the hex file on the device.
19
8. Connect the nRF52840-Dongle to the USB port of the Raspberry Pi having the latest TH
image.
9. For the Thread DUT, enable discoverable over Bluetooth LE (e.g., on nRF52840 DK: select
Button 4) and start the Thread Setup Test execution by referring to Section 7, Test
Configuration .
1. To build the sample apps for nRF-Connect, check out the Matter repository and bootstrap using
following commands:
2. If the nRF-Connect SDK is not installed, create a directory running the following command:
$ mkdir ~/nrfconnect
3. Download the latest version of the nRF-Connect SDK Docker image by running the following
command:
4. Start Docker using the downloaded image by running the following command:
20
~/nrfconnect can be replaced with an absolute path to the nRF-Connect SDK source directory.
~/connectedhomeip can be replaced with an absolute path to the CHIP source directory.
Parameters can be omitted if flashing the example app onto the hardware is not
required. This parameter gives the container access to USB devices connected to
your computer such as the nRF52840 DK.
--rm can be omitted if you do not want the container to be auto-removed when you exit the
container shell session.
-e RUNAS=$(id -u) is needed to start the container session as the current user instead of root.
6. Update the nRF-Connect SDK to the most recent supported revision, by running the following
command:
$ cd /var/chip
$ python3 scripts/setup/nrfconnect/update_ncs.py --update
Perform the following procedure, regardless of the method used for setting up the environment:
$ cd examples/all-clusters-app/nrfconnect
2. Before building, remove all build artifacts by running the following command:
$ rm -r build
3. Run the following command to build the example, with build-target replaced with the build
target name of the Nordic Semiconductor’s kit, for example, nrf52840dk_nrf52840:
nRF52840 DK nrf52840dk_nrf52840
nRF5340 DK nrf5340dk_nrf5340_cpuapp
nRF7002 DK nrf7002dk_nrf5340_cpuapp
4. To flash the application to the device, use the west tool and run the following command from
the example directory:
21
5. Connect the nRF52840-Dongle to the USB port of the Raspberry Pi having the latest TH image.
6. For the Thread DUT, enable discoverable over Bluetooth LE (e.g., On nRF52840 DK: Press Button
4) and start the Thread Setup Test execution by referring to Section 7, Test Configuration.
22
6. OT Border Router (OTBR) Setup
If the DUT supports Thread Transport, DUT vendors need to use the OTBR that is shipped with the
TH image for certification testing. Here are the instructions to set up OTBR that comes with the TH.
Users need to get the RCP programmed with the recommended version and connect it to the
Raspberry Pi running the TH. The OTBR will be started when the TH runs the thread transport
related TC’s.
Currently the OTBR in the TH works with either the Nordic RCP dongle or SiLabs RCP dongle. Refer
to Section 6.1 to flash the NRF52840 firmware or Section 6.2 to flash the SiLabs firmware and get
the RCP’s ready. Once the RCP’s are programmed, the user needs to insert the RCP dongle on to the
Raspberry Pi running the TH and reboot the Raspberry Pi.
2. nRF Util is a unified command line utility for Nordic products. For more details, refer to the
following link— https://www.nordicsemi.com/Products/Development-tools/nrf-util
3. Install the nRF Util dependency in the user’s system using the following command:
4. Connect the nRF52840 Dongle to the USB port of the user’s system.
5. Press the Reset button on the dongle to enter the DFU mode (the red LED on the dongle starts
blinking).
6. To install the RCP firmware package on to the dongle, run the following command from the path
where the firmware package was downloaded:
7. Once the flash is successful, the red LED turns off slowly.
23
8. Remove the Dongle from the user’s system and connect it to the Raspberry Pi running TH.
9. In case any permission issue occurs during flashing, launch the terminal and retry in sudo
mode.
Requirements:
• SiLabs RCP: Thunderboard Sense 2 Sensor-to-Cloud Advanced IoT Kit or EFR32MG Wireless
Starter Kit
From UI:
• Connect the RCP dongle to the USB port of the user’s operating system or via Ethernet.
◦ For USB connection, select the corresponding Serial Number from the drop-down list.
◦ For Ethernet connection, enter the IP address of the RCP and click on Connect .
• To flash an image, go to “Flash”, select the RCP binary file, and click on Flash .
24
From CLI:
• In case RCP is connected via Ethernet and the Simplicity Commander UI is not an option, the
RCP image can be flashed using CLI.
25
ubuntu@ubuntu:~$ ./chip-certification-tool/scripts/OTBR/otbr_start.sh connectedhomeip/otbr sve2
cd81003a4ffe 7 months ago 436MB
otbr image connectedhomeip/otbr:sve2 already installed
adbc48b536dc5a350c2e5dcf9c09b378290fe79ac423a15943e8c970473fd44f
waiting 10 seconds to give the docker container enough time to start up…
Param: 'dataset init new'
Done
Param: 'dataset channel 25'
Done
Param: 'dataset panid 0x5b35'
Done
Param: 'dataset extpanid 5b35dead5b35beef'
Done
Param: 'dataset networkname 5b35'
Done
Param: 'dataset networkkey 00112233445566778899aabbccddeeff'
Done
Param: 'dataset commit active'
Done
Param: 'prefix add fd11:35::/64 pasor'
Done
Param: 'ifconfig up'
Done
Param: 'thread start'
Done
Param: 'netdata register'
Done
Param: 'dataset active -x
0e080000000000010000000300001935060004001fffe002085b35dead5b35beef0708fd902fb12bca8af9
051000112233445566778899aabbccddeeff03043562333501025b350410cdfe3b9ac95afd445e659161b
03b3c4a0c0402a0f7f8
Done
Simple Dataset:
000300001902085b35dead5b35beef051000112233445566778899aabbccddeeff01025b35
If any issue occurs while using otbr_start.sh, follow the steps below to generate the dataset value
manually:
On Terminal 1:
26
sudo docker network create --ipv6 --subnet fd11:db8:1::/64 -o
com.docker.network.bridge.name=otbr0 otbr
sudo sysctl net.ipv6.conf.otbr0.accept_ra_rt_info_max_plen=128
sudo sysctl net.ipv6.conf.otbr0.accept_ra=2
sudo docker run -it --rm --privileged --network otbr -p 8080:80 --sysctl
"net.ipv6.conf.all.disable_ipv6=0 net.ipv6.conf.all.forwarding=1" --name otbr -e
NAT64=0 --volume /dev/ttyACM0:/dev/ttyACM0 connectedhomeip/otbr:sve2 --radio-url
spinel+hdlc+uart:///dev/ttyACM0
2. Generate the Thread form for dataset by entering ‘ <Raspberry-Pi IP>:8080 ’ on the user’s system
browser. The OTBR form will be generated as shown below.
3. Click on the Form option and follow the sequence to generate the OTBR form.
On Terminal 2:
27
sudo docker exec -ti otbr ot-ctl dataset active -x
2. The above generated sample pairing code can be used during the manual Thread pairing
procedure with the following command:
Error occurred during setup of test suite.FirstChipToolSuite. 409 Client Error for
http+docker://localhost/v1.42/containers/10ad48500522af3d5a23c181a6018053248250b958a353
ed88d5a5f538dcbf33/exec: Conflict ("Container
10ad48500522af3d5a23c181a6018053248250b958a353ed88d5a5f538dcbf33 is not running")
Solution:
a. Check for the presence of rogue executions of the otbr-chip container. Using command:
$docker ps
b. Check host (raspberry) network configuration interface’s ip address does not conflict with
otbr-chip default interface ip address.
28
…
+ service tayga start
* Starting userspace NAT64 tayga
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
…fail!
+ die 'Failed to start tayga'
+ echo ' * ERROR: Failed to start tayga'
* ERROR: Failed to start tayga
+ exit 1
tail: cannot open '/var/log/syslog' for reading: No such file or directory
tail: no files remaining
$ifconfig
…
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.2.2 netmask 255.255.255.0 broadcast 192.168.2.255 inet6
fdcb:377:2b62:f8fd:dea6:32ff:fe94:c54c prefixlen 64 scopeid 0x0<global> inet6
fe80::dea6:32ff:fe94:c54c prefixlen 64 scopeid 0x20<link> ether dc:a6:32:94:c5:4c
txqueuelen 1000 (Ethernet) RX packets 250969 bytes 184790487 (184.7 MB) RX errors 0
dropped 0 overruns 0 frame 0 TX packets 125202 bytes 85904550 (85.9 MB) TX errors 0
dropped 0 overruns 0 carrier 0 collisions 0
29
7. Test Configuration
7.1. Project Configuration
When the DUT is a client, refer to simulated_tests. The TH brings up the example accessory using
chip-app1 binary. The user will be prompted to commission the device. Once the commissioning
process is completed, proceed with the test execution.
In the case where the DUT is a server, the TH spins up the controller, the DUT bring-up procedure
should be completed and has to be paired with the controller.
Depending on the DUT’s network transport, any one of the appropriate pairing modes can be opted:
• ‘ble-wifi ’ to complete the pairing for the DUT using BLE Wi-Fi
• ‘onnetwork’ to complete the pairing for the DUT that is already on the operational network
(e.g., the device is already present on the same Ethernet network of the TH) connection
Follow the sections below for the project configuration and test execution.
1. Open a Web browser from the user’s system and enter the IP address of the Raspberry Pi as
given in Section 4.1.2, TH Installation on Raspberry Pi.
2. In case the TH user interface does not launch, refer to Section 4.2.3, Bringing Up of Docker
Containers Manually.
4. Click on the Add Project button. Enter the project name as “Test Project” and edit the Project
Config settings to provide additional details.
30
7.1.1.1. Wi-Fi Mode
a. To pair in the BLE Wi-Fi mode, configure the Network settings by providing the ssid and
password.
b. Configure the DUT by providing details like discriminator, setup_code and set the pairing_mode
as “ble-wifi”.
a. If the DUT is already present on the operational network (e.g., connected to the same network as
the controller via Ethernet) then the user can select this mode.
b. Configure the DUT by providing details like discriminator, setup_code and set the pairing_mode
as “onnetwork”.
31
7.1.1.3. Thread Device Mode
a. The TH loads the default thread configuration values that match the OTBR built on the TH
image. The following configuration can be customized as per the user’s need.
b. Input the DUT configuration details like discriminator: “3840”, setup_code:”20202021”, and
pairing_mode as “ble-thread”.
The OTBR docker is contained in the TH image and runs automatically upon the
start of the TH tool.
For the case that the DUT requires a PAA certificate to perform a pairing operation, input “true" for
the flag “chip_tool_use_paa_certs” to configure the Test-Harness to use them.
Make sure to include the desired PAA certificates in the default path "/var/paa-
root-certs/", in the Raspberry-Pi.
a. Input the test parameters like endpoint on the DUT where the cluster to be tested is
implemented.
32
On completion of the network and the device configuration, select the Update and then Create
button to create the Test Project.
The newly created project will be listed under the Project details column.
Click on the Edit option to configure the project to load the required PICS file for the cluster to be
tested and select the Update button. Refer to Section 8, Test Case Execution.
1. Now the Test Project is ready for execution. Click on the Go To Test-Run icon and create a new
Test Run batch.
33
2. The test cases are loaded based on the PICS file selection. Provide a Test name for this run such
as Door Lock First Run. Input any additional description about the run. Enter the Test Engineers
Name. Select only the test cases that are to be executed and deselect other test cases. There is a
search option available to search for a particular test case. The number of times the test is to be
executed can be given by clicking on the number spin control.
Ensure that DUT is in the discoverable mode before clicking on the Start button.
Example command to be used to launch the sample apps (e.g., all-cluster-app):
Onnetwork: ./chip-all-clusters-app
Thread: Enabled discoverable over Bluetooth LE (ex: On nRF52840 DK: Press Button 4 to start
BLE advertisements)
34
3. Click on the Start button for the test execution. Note that the test execution gets started and the
log window appears. Click on the Abort button to stop the test execution.
5. Click on the Result button and select the test that was executed and click on Show Report to
view the reports. The user can also select previously executed tests and view the reports and
logs. There is an option provided to re-run the test cases. Refer to Section 9, Collect Logs and
Submit to TEDS to collect the logs and submit the reports to TEDS.
35
2. Click on the Browse button to upload the previous report and select the desired log filter
options. The console logger contains a filter drop-down list to select the different categories of
logs to display. Use the Print button to print the test report.
Click on the “Select theme” option drop-down to select the different theme for the user interface.
36
8. Test Case Execution
Refer to Section 2, References for PICS tool documentation to generate the PICS XML files.
PICS codes are generated from the Test Plans. The Base.xml file lists all the Core feature PICS from
the Matter Base Specifications and the application cluster PICS are listed in the respective
TestPlan.xml files. Follow the steps below to generate and upload the PICS files.
1. Click on the following link to download the PICS XML files— https://groups.csa-
iot.org/wg/matter-csg/document/26122
2. Click on the following link to use the PICS tool— PICS Tool v1.6.4 matter 1.0 - Connectivity
Standards Alliance (csa-iot.org)
3. Load the Base.xml file by clicking on the Browse option. In case the following error is observed:
Base.xml: This XML PICS template is unapproved and has not been tested
with this tool. To test new or updated PICS documents, please enable
author mode and try again.
4. Load the XML file that is required for testing, e.g., Doorlock.xml.
5. Check the option for which the testing will be done for the DoorLock cluster. In the case of the
Door Lock cluster to be tested in the Server mode, select the checkbox for DRLK.S. In case the
cluster has to be tested in the Client mode, select the checkbox for DRLK.C.
6. Review all the attributes/commands that are supported by the DoorLock cluster and ensure the
corresponding options are checked in the PICS tool.
7. Click on Validate PICS . Ensure that there are no warnings or errors. In case of any warnings or
errors, revisit the options and check/uncheck the options as supported by the DUT.
37
8. Prior to the test execution, the user will have to load the relevant PICS file to list the required
test cases. Depending on the PICS file loaded, the test suites list will be updated accordingly.
Click on the automated_and_semi_automated tab. The automated and semi automated test cases
will be listed under this option. The Automated test cases will be listed as the TC-<Cluster>-XX
without any suffix, e.g., TC-DRLK-1.1. Automated test case execution will not require any manual
intervention.
The Semi Automated test cases will be listed as TC-<Cluster>-XX(Semi-automated). During the Semi
Automated test case execution, some of the steps will be executed automatically and the user will
be prompted to perform a few steps as shown below in the screenshots. From the TH user interface,
load the required PICS file to select the test cases, e.g., Doorlock Test Plan.xml.
Select the required Semi Automated test case to be executed and ensure other test cases are not
selected. Take for example TC-DRLK-2.2 as shown below:
38
Bring up the DUT (Doorlock Cluster as Server) by sending the following command ./chip-lock-app on
the Raspberry Pi terminal and click on the Start button.
During the Test execution, as the log gets updated, copy the newly generated node ID.
Form the Chip-tool, execute the above command with node ID listed in the TH log. Save the Chip-
tool logs in a text file. Verify the result in the Chip-tool log and select the applicable choice from the
user prompt in the TH tool and select the Submit button.
Example:
docker exec -it th-chip-tool <popup command> <newly generated nodeID> <end-point id>
cd apps
docker exec -it th-chip-tool ./chip-tool doorlock unlock-lock 0x4eaa83244c40b1e7 1
--timedInteractionTimeoutMs 1000 –PINCode 12345678
Check for the response of the command in the Chip-tool log and compare with the expected
response from the TH user prompt as shown below. In case both the responses match, click on
PASS followed by the Submit button.
39
At the end of the test execution, the user will be prompted to upload the Chip-tool logs that were
saved in the previous step.
During the DUT bring-up, note down the QR code and save it for future use.
40
During the test execution the user is prompted for the QR code. Use the code that was saved earlier
and proceed with the testing.
41
After the Manual pairing of the DUT, execute the command displayed on the prompt as shown
below.
Save the Chip-tool logs in a text file. Validate the chip tool log and select the applicable choice from
the user prompt in the TH tool and select the Submit button. At the end of the test execution, the
user is prompted to upload the Chip-tool logs that were saved in the previous step.
Follow the instructions provided in the user prompt to complete the test execution.
IMPORTANT: Currently the selection will be done automatically by TH based on the test execution
result. In the future the User Prompt will be updated to proper represent this behavior.
42
not available in the TH User Interface.
8.5.1. Prerequisite
1. A directory containing the PAA (Product) roots that will be mounted as /paa_roots.
cd chip-certification-tool
./scripts/ubuntu/update-paa-certs.sh
3. After execution of the above commands ensure that the PAA’s are available locally at /var/paa-
root-certs .
Device-specific configuration is shown as shell variables. PLEASE REPLACE THOSE WITH THE
CORRECT VALUE in the steps below.
• $PATH_TO_PAA_ROOTS: Path on host where PAA roots are located. Failure to provide a correct
path will cause early failure during commissioning (e.g., /var/paa-root-certs/)
• $DISCRIMINATOR: Long discriminator for DUT (e.g., 3840 for Linux examples)
• $SETUP_PASSCODE: Setup passcode for DUT (e.g., 20202021 for Linux examples)
• $BLE_INTERFACE_ID: Interface ID for BLE interface (e.g., 0 for default, which usually works)
43
This downloads a Docker image with the test environment, and runs the environment including
mounting the PAA trust store in /paa_roots and mounts the local Avahi socket so that Avahi in the
VM can run against its host.
The first time running docker will be SLOW (around 5 minutes) due to the
need to download data. Every other run after that will be instant.
To test this against a Linux target running on the same network as the host:
clear && rm -f kvs1 && ./chip-all-clusters-app --discriminator 3842 --KVS kvs1 --trace_decode
1
Execute the following command in the docker for the BLE+Wi-Fi pairing:
Execute the below command in the docker for the BLE+Thread pairing:
Factory reset the DUT again → The test fills tons of stuff and the device will be in an odd state of
ACL’s. This will be fixed once there is ample time to clean up after the test is completed by sending
commands to, for example, remove the fabrics joined.
44
8.5.8. Possible Issues
a. Some DUT’s have an incorrectly-configured UserLabel cluster where the backend is not
implemented due to SDK example issues where some examples have the backend and
others do not. This will fail at the last step (“Step 9: Fill UserLabel clusters on each
endpoint”), with FAILURE writes. To override the test not to run this step, you can add “
--bool-arg skip_user_label_cluster_steps:true“ to the command line of TC_RR_1_1.py, at
the end.
b. Not having the $PATH_TO_PAA_ROOTS set properly when starting the docker or not having
PAA roots certificates at that path.
45
9. Collect Logs and Submit to TEDS
DUT’s that require certification from CSA, need to submit the results to CSA’s TEDS portal for ATL’s
to review the test results.
Any hobby developer that is executing these tests using TH need not submit results to TEDS.
After completing the test case execution, the user has two options to download the test logs and test
reports.
From the Test Execution page, you can download reports and logs as shown below.
Test logs and reports can also be retrieved from the Test-Run page as shown below.
46
9.1.2. Python Tests in Docker
When executing Python tests from the Docker, pipe test logs to file.
Result logs will be available typically under the TH home directory where the docker container is
launched.
Go to your assigned time slot on your dashboard under “Test Slots” and select Add test results in
your test slot details.
Under the “View Test Slot Details”, you will see a menu.
• Base Device Tests: These tests are required for all DUT’s.
• Controller Tests: These tests are only required for Controller devices. If you register your device
as a controller, you need to complete this testing.
• Cluster Tests: This is a list of all Matter clusters. Here you will enter the test results for the
clusters your DUT supports.
Selecting “Base Device Tests” from the menu will take you to Based Device tests.
47
The left panel is where you select tests and record your results.
The right panel displays the tests you have recorded for a particular set of tests.
Selecting “Cluster Tests” or “Controller Tests” from the menu will take you to the corresponding test
page.
Select your test clusters and record your test results in the same way as the Based Device tests.
48
9.4. Test Results Summary
When all testing has completed for your DUT, you can review the results in the “Test Results
Summary” page.
In this summary you can check to see if a particular test case has been reviewed. If the test has
been reviewed, you will see the “Test Reviewed” and “Test House Notes” statuses.
You can also review your results and the results from your company on the TEDS Matter
Dashboard. You can export your results and share them with your company.
49
50