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
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 readThis 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.