원클릭으로
chip-tool-testing
Guidelines for building Matter examples and chip-tool, and testing examples using chip-tool.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Guidelines for building Matter examples and chip-tool, and testing examples using chip-tool.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Guidelines for comparing binary (ELF) sizes using Rust-based tooling (elf-bloat and asm-annotate) across various platforms to analyze the impact of code changes on footprint.
Guidelines for building Matter examples and running tests using Podman with the vscode image in a non-interactive environment.
Essential guidelines instructing AI agents on how to incrementally discover, read, and consult top-level monorepo documentation and example-specific reference guides before altering code or executing test harnesses.
Guidelines for generating clear, concise, and objective GitHub Pull Request descriptions.
Guidelines and instructions for building prerequisite example applications and running python-based integration and certification tests located in `src/python_testing/`. Use this skill to run important regression tests during developement or, when building new example apps, or when there is a need to execute python test scripts or "certification test scripts" or mentions of run_python_test.py and local.py.
Guidelines and common jq/grep/awk queries for investigating ZAP (.zap) and Matter (.matter) files to understand endpoints, clusters, attributes, and commands.
| name | chip-tool-testing |
| description | Guidelines for building Matter examples and chip-tool, and testing examples using chip-tool. |
This skill provides guidelines for building Matter example applications and
chip-tool, and using chip-tool to commission and interact with the examples
in a simulated environment (like Linux POSIX).
[!NOTE] While
chip-tooland examples support multiple platforms, these guidelines focus on the Linux/POSIX environment, which is the standard environment for agent execution.
Always build the chip-tool and the Matter example application from the same
revision of the repository to ensure compatibility.
Use the build script to build chip-tool for Linux:
source scripts/activate.sh
./scripts/build/build_examples.py --target linux-x64-chip-tool-clang build
The binary will be located in out/linux-x64-chip-tool-clang/chip-tool.
Use the build script to build examples (e.g., all-devices-app):
source scripts/activate.sh
./scripts/build/build_examples.py --target linux-x64-all-devices-boringssl build
The binary will be located in
out/linux-x64-all-devices-boringssl/all-devices-app.
Run the example application (usually in a separate terminal or the background):
./out/linux-x64-all-devices-boringssl/all-devices-app
Note: Use a clean KVS file (by specifying a new, non-existent file path with
--KVS) or clear the existing one (by deleting the file) to ensure the
application enters commissioning mode on startup.
Check the application logs on startup to find the setup PIN code and discriminator. Example log:
[DL] Setup Pin Code: 20202021
[DL] Setup Discriminator: 3840 (0xF00)
[!NOTE] The discriminator value
3840(0xF00) is the standard default for many Matter examples when not explicitly configured.
Make sure the device is in commissioning mode. If using a persistent storage
(KVS), you may need to use a clean KVS file or clear it to force commissioning
mode on startup. On Linux, the default KVS file is /tmp/chip_kvs:
rm /tmp/chip_kvs
[!NOTE] > Persistence Testing: If you are performing a persistence test (verifying state across restarts), do NOT delete the KVS file. Reuse the same KVS file to preserve stored attributes.
If the device is already on the same IP network (e.g., running locally on the same host):
With Long Discriminator:
chip-tool pairing onnetwork-long <node_id> <setup_pin> <discriminator>
Without Discriminator (looks for any commissionable device):
chip-tool pairing onnetwork <node_id> <setup_pin>
With Manual Pairing Code or QR Code:
chip-tool pairing code <node_id> <pairing_code_or_qrcode>
Direct IP and Port (useful if mDNS resolution fails):
chip-tool pairing already-discovered <node_id> <setup_pin> <device_ip> <device_port>
[!CAUTION] If you encounter attestation failures in simulated environments, you may need to add
--bypass-attestation-verifier trueto the command. Use this flag ONLY for local simulated testing when you explicitly accept the security tradeoff of bypassing device attestation.
After successful commissioning, you can use chip-tool to interact with data
model clusters.
Read Attribute:
chip-tool <cluster_name> read <attribute_name> <node_id> <endpoint_id>
Example: chip-tool basicinformation read vendor-id 0x8016 0
Invoke Command:
chip-tool <cluster_name> <command_name> [arguments] <node_id> <endpoint_id>
Example: chip-tool onoff toggle 0x8016 1
Instead of starting the application and running chip-tool commands manually,
you can run automated YAML tests using the run_test_suite.py script. The
script manages launching the example application, commissioning, running the
test steps, and cleanup.
Make sure you are in the python virtual environment:
source out/venv/bin/activate
export PW_ACTIVATE_SKIP_CHECKS=1
Run a YAML test by specifying the target test name (without the .yaml
extension), the chip-tool python wrapper, and the target application path:
./scripts/tests/run_test_suite.py --runner chip_tool_python --target <test_name> run --tool-path chip-tool-with-python:scripts/tests/chipyaml/chiptool.py --app-path <app_key>:<binary_path>
If the YAML test (e.g. Test_TC_RH_2_1.yaml) specifies a dynamic CI app
target (such as all-devices with custom arguments), you must map that target
key to the compiled binary path:
./scripts/tests/run_test_suite.py --runner chip_tool_python --target Test_TC_RH_2_1 run --tool-path chip-tool-with-python:scripts/tests/chipyaml/chiptool.py --app-path all-devices:out/linux-x64-all-devices-clang/all-devices-app
--tool-path chip-tool-with-python:scripts/tests/chipyaml/chiptool.py to
the run subcommand.CI block (or all-clusters if no CI block is present) is
explicitly mapped with --app-path.chip-tool has a built-in help system that allows you to discover available
clusters and commands. Running any command without all required parameters will
show a help screen.
chip-tool
chip-tool basicinformation
chip-tool basicinformation read
This will show what attributes can be read from the basicinformation
cluster.This interactive help is useful for exploring the data model and finding the exact syntax needed.
--timeout <seconds>.chip-tool caches state in chip_tool_config.ini
(often in the current directory or /tmp). Deleting this file can resolve
stale configuration issues. You can also specify a custom directory with
--storage-directory <path>.When completing a test task using this skill, you should output a structured report to the user. Since every test may verify different features, do not force a fixed sequence of steps. Instead, follow these general guidelines for reporting each item you verified:
For each verified feature, command, or configuration item, provide:
chip-tool or shell command you used.Descriptor reads.