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
To initiate a client echo request to a BLE device, 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 echo ble 12345678 3840
To start the Client in echo mode, run the built executable and pass it the IP address and port of the server to talk to, as well as the command “echo”.
$ chip-tool echo ip 192.168.0.30 11097
If valid values are supplied, it will begin to periodically send messages to the server address provided.
It also verifies that the incoming echo from the server matches what was sent out.
Stop the Client at any time with Ctrl + C
.
To use the Client to send a CHIP commands, run the built executable and pass it the target cluster name, the target command name, the ip address and port of the server to talk to as well as an endpoint id. The endpoint id must be between 1 and 240.
$ chip-tool onoff on 192.168.0.30 11097 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