3 An example application that uses CHIP to send messages to a CHIP server.
7 - [CHIP Client Example](#chip-client-example)
8 - [Building the Example Application](#building-the-example-application)
9 - [Using the Client to Request an Echo](#using-the-client-to-request-an-echo)
13 ## Building the Example Application
15 Building the example application is quite straightforward.
21 git submodule update --init
22 source third_party/connectedhomeip/scripts/activate.sh
27 - After the application is built, it can be found in the build directory as
30 ## Using the Client to Pair a device
32 In order to send commands to a device, it must be paired with the client.
36 To initiate a client pairing request to a device, run the built executable and
37 choose the pairing mode.
39 ##### Pair a device configured to bypass Rendezvous
41 The command below pair a device with the provided IP address and port of the
44 $ chip-tool pairing bypass 192.168.0.30 11097
46 #### Pair a device over BLE
48 Run the built executable and pass it the discriminator and pairing code of the
51 The command below uses the default values hard-coded into the debug versions of
52 the ESP32 all-clusters-app:
54 $ chip-tool pairing ble 12345678 3840
58 $ chip-tool pairing unpair
60 ## Using the Client to Send CHIP Commands
62 To use the Client to send a CHIP commands, run the built executable and pass it
63 the target cluster name, the target command name as well as an endpoint id.
65 The endpoint id must be between 1 and 240.
67 $ chip-tool onoff on 1
69 The client will send a single command packet and then exit.
71 ### How to get the list of supported clusters
73 To get the list of supported clusters, run the built executable without any
82 ./chip-tool cluster_name command_name [param1 param2 ...]
84 +-------------------------------------------------------------------------------------+
86 +-------------------------------------------------------------------------------------+
99 | * temperaturemeasurement |
100 +-------------------------------------------------------------------------------------+
103 ### How to get the list of supported commands for a specific cluster
105 To get the list of commands for a specific cluster, run the built executable
106 with the target cluster name.
110 ### How to get the list of supported attributes for a specific cluster
112 To the the list of attributes for a specific cluster, run the built executable
113 with the target cluster name and the `read` command name.
115 $ chip-tool onoff read
117 ### How to get the list of parameters for a command
119 To get the list of parameters for a specific command, run the built executable
120 with the target cluster name and the target command name
124 ## Using the Client for Setup Payload
126 ### How to parse a setup code
128 To parse a setup code, run the built executable with the `payload` cluster name
129 and the `parse-setup-payload` command
131 $ chip-tool payload parse-setup-payload code
135 $ chip-tool payload parse-setup-payload "CH:#####"
137 #### QR Code with optional Vendor Info
139 $ chip-tool payload parse-setup-payload "CH:#####"
141 #### Manual Setup Code
143 $ chip-tool payload parse-setup-payload :#####"
145 # Using the Client for Additional Data Payload
147 To parse an additional data payload, run the built executable with the `payload`
148 cluster name and the `parse-additional-data-payload` command
150 $ chip-tool payload parse-additional-data-payload "#####"
156 - [barriercontrol](#barriercontrol)
158 - [colorcontrol](#colorcontrol)
159 - [doorlock](#doorlock)
161 - [iaszone](#iaszone)
162 - [identify](#identify)
163 - [levelcontrol](#levelcontrol)
165 - [pairing](#pairing)
166 - [payload](#payload)
168 - [temperaturemeasurement](#temperaturemeasurement)
176 ./chip-tool barriercontrol command_name [param1 param2 ...]
178 +-------------------------------------------------------------------------------------+
180 +-------------------------------------------------------------------------------------+
181 | * barrier-control-go-to-percent |
182 | * barrier-control-stop |
185 +-------------------------------------------------------------------------------------+
192 ./chip-tool basic command_name [param1 param2 ...]
194 +-------------------------------------------------------------------------------------+
196 +-------------------------------------------------------------------------------------+
197 | * reset-to-factory-defaults |
201 +-------------------------------------------------------------------------------------+
208 ./chip-tool colorcontrol command_name [param1 param2 ...]
210 +-------------------------------------------------------------------------------------+
212 +-------------------------------------------------------------------------------------+
214 | * move-color-temperature |
216 | * move-saturation |
218 | * move-to-color-temperature |
220 | * move-to-hue-and-saturation |
221 | * move-to-saturation |
223 | * step-color-temperature |
225 | * step-saturation |
230 +-------------------------------------------------------------------------------------+
237 ./chip-tool doorlock command_name [param1 param2 ...]
239 +-------------------------------------------------------------------------------------+
241 +-------------------------------------------------------------------------------------+
243 | * clear-all-rfids |
244 | * clear-holiday-schedule |
247 | * clear-weekday-schedule |
248 | * clear-yearday-schedule |
249 | * get-holiday-schedule |
253 | * get-weekday-schedule |
254 | * get-yearday-schedule |
256 | * set-holiday-schedule |
260 | * set-weekday-schedule |
261 | * set-yearday-schedule |
263 | * unlock-with-timeout |
267 +-------------------------------------------------------------------------------------+
274 ./chip-tool groups command_name [param1 param2 ...]
276 +-------------------------------------------------------------------------------------+
278 +-------------------------------------------------------------------------------------+
280 | * add-group-if-identifying |
281 | * get-group-membership |
282 | * remove-all-groups |
287 +-------------------------------------------------------------------------------------+
294 ./chip-tool iaszone command_name [param1 param2 ...]
296 +-------------------------------------------------------------------------------------+
298 +-------------------------------------------------------------------------------------+
302 +-------------------------------------------------------------------------------------+
309 ./chip-tool identify command_name [param1 param2 ...]
311 +-------------------------------------------------------------------------------------+
313 +-------------------------------------------------------------------------------------+
318 +-------------------------------------------------------------------------------------+
325 ./chip-tool levelcontrol command_name [param1 param2 ...]
327 +-------------------------------------------------------------------------------------+
329 +-------------------------------------------------------------------------------------+
332 | * move-to-level-with-on-off |
333 | * move-with-on-off |
335 | * step-with-on-off |
337 | * stop-with-on-off |
341 +-------------------------------------------------------------------------------------+
348 ./chip-tool onoff command_name [param1 param2 ...]
350 +-------------------------------------------------------------------------------------+
352 +-------------------------------------------------------------------------------------+
359 +-------------------------------------------------------------------------------------+
362 ### onoff off [endpoint-id]
364 Send the OFF command to the ONOFF cluster on the given endpoint.
366 ### onoff on [endpoint-id]
368 Send the ON command to the ONOFF cluster on the given endpoint.
370 ### onoff toggle [endpoint-id]
372 Send the TOGGLE command to the ONOFF cluster on the given endpoint.
374 ### onoff discover [endpoint-id]
376 Send the DISCOVER command to the ONOFF cluster on the given endpoint.
382 ./chip-tool pairing command_name [param1 param2 ...]
384 +-------------------------------------------------------------------------------------+
386 +-------------------------------------------------------------------------------------+
391 +-------------------------------------------------------------------------------------+
398 ./chip-tool payload command_name [param1 param2 ...]
400 +-------------------------------------------------------------------------------------+
402 +-------------------------------------------------------------------------------------+
403 | * parse-setup-payload |
404 | * parse-additional-data-payload |
405 +-------------------------------------------------------------------------------------+
412 ./chip-tool scenes command_name [param1 param2 ...]
414 +-------------------------------------------------------------------------------------+
416 +-------------------------------------------------------------------------------------+
418 | * get-scene-membership |
420 | * remove-all-scenes |
426 +-------------------------------------------------------------------------------------+
429 ### temperaturemeasurement
433 ./chip-tool temperaturemeasurement command_name [param1 param2 ...]
435 +-------------------------------------------------------------------------------------+
437 +-------------------------------------------------------------------------------------+
441 +-------------------------------------------------------------------------------------+