-
Notifications
You must be signed in to change notification settings - Fork 4
Build chip tool on Raspberry PI
An example application that uses CHIP to send messages to a CHIP server.
-
Install tool chain
$ sudo apt-get install git python pkg-config python3-venv python3-dev libssl-dev libdbus-1-dev libglib2.0-dev ninja-build libavahi-client-dev
-
Build the example application:
$ examples/chip-tool $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh $ gn gen out/debug $ ninja -C out/debug
-
Prerequisites
- A Raspberry Pi 4 board
- Ubuntu 20.04 or newer image for ARM64 platform.
-
Building
Follow Building section of this document.
-
After the application is built, it can be found in the build directory as
out/debug/chip-tool
In order to send commands to a device, it must be paired with the client.
To initiate a client pairing request to a device, run the built executable and choose the pairing mode.
The command below pair a device with the provided IP address and port of the server to talk to.
$ chip-tool pairing bypass 192.168.0.30 11097
$ chip-tool pairing unpair
To use the Client to send a CHIP commands, run the built executable and pass it the target cluster name, the target command name as well as an endpoint id.
The endpoint id must be between 1 and 240.
$ chip-tool onoff on 1
The client will send a single command packet and then exit.
To get the list of supported clusters, run the built executable without any arguments.
$ chip-tool
Example output:
Usage:
./chip-tool cluster_name command_name [param1 param2 ...]
+-------------------------------------------------------------------------------------+
| Clusters: |
+-------------------------------------------------------------------------------------+
| * barriercontrol |
| * basic |
| * colorcontrol |
| * doorlock |
| * groups |
| * iaszone |
| * identify |
| * levelcontrol |
| * onoff |
| * pairing |
| * payload |
| * scenes |
| * temperaturemeasurement |
+-------------------------------------------------------------------------------------+
To get the list of commands for a specific cluster, run the built executable with the target cluster name.
$ chip-tool onoff
To the the list of attributes for a specific cluster, run the built executable
with the target cluster name and the read
command name.
$ chip-tool onoff read
To get the list of parameters for a specific command, run the built executable with the target cluster name and the target command name
$ chip-tool onoff on