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 wifi-echo app:
$ chip-tool echo ble 3840 12345678
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 8000
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, an endpoint id as well as the IP address and port of the server to talk to. The endpoint id must be between 1 and 240.
$ chip-tool onoff on 1 192.168.0.30 11095
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