Building the example application is quite straightforward.
cd examples/chip-tool git submodule update --init source third_party/connectedhomeip/scripts/activate.sh gn gen out/debug ninja -C out/debug
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
Run the built executable and pass it the discriminator and pairing code of the remote device.
The command below uses the default values hard-coded into the debug versions of the ESP32 all-clusters-app:
$ chip-tool pairing ble 12345678 3840
$ 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
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
To parse a setup code, run the built executable with the payload
cluster name and the parse-setup-payload
command
$ chip-tool payload parse-setup-payload code
$ chip-tool payload parse-setup-payload "CH:#####"
$ chip-tool chip-tool payload parse-setup-payload "CH:#####"
$ chip-tool payload parse-setup-payload :#####"
To parse an additional data payload, run the built executable with the payload
cluster name and the parse-additional-data-payload
command
$ chip-tool payload parse-additional-data-payload "#####"