Skip to content

Commit

Permalink
Update chip-tool docs to mention node ids in pairing (project-chip#10723
Browse files Browse the repository at this point in the history
)

* Update chip-tool docs to mention node ids in pairing

* Address review comment
  • Loading branch information
bzbarsky-apple authored Oct 21, 2021
1 parent 8c2638c commit ceda5ed
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 16 deletions.
8 changes: 5 additions & 3 deletions docs/QUICK_START.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ controller.

#### IP Pairing

`chip-tool pairing onnetwork 20202021` will use PASE over IP to pair a device.
`chip-tool pairing onnetwork ${NODE_ID_TO_ASSIGN} 20202021` will use PASE over
IP to commission a device and assign `${NODE_ID_TO_ASSIGN}` (which must be a
decimal number or a 0x-prefixed hex number) as its node id.

NOTE: On Linux, if the device is actually running after unit tests ran you have
to use `chip-tool pairing onnetwork 34567890`, because the unit tests change the
device configuration.
to use `chip-tool pairing onnetwork desired-node-id 34567890`, because the unit
tests change the device configuration.

NOTE: to run both the Node and Controller as separate processes on the same
Linux or Mac machine, build the all-clusters-app with Bluetooth LE disabled as
Expand Down
2 changes: 1 addition & 1 deletion examples/all-clusters-app/ameba/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The commissioning is carried out via WiFi.
[standalone chip-tool](https://github.com/project-chip/connectedhomeip/tree/master/examples/chip-tool)
to communicate with the device.

$ ./chip-tool pairing bypass 192.168.xx.xxx 5540
$ ./chip-tool pairing bypass ${NODE_ID_TO_ASSIGN} 192.168.xx.xxx 5540

### Cluster Control

Expand Down
25 changes: 15 additions & 10 deletions examples/chip-tool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ and choose the pairing mode.
The command below commissions a device with the provided IP address and port of
the server to talk to.

$ chip-tool pairing bypass 192.168.0.30 5540
$ chip-tool pairing bypass ${NODE_ID_TO_ASSIGN} 192.168.0.30 5540

#### Commission a device over BLE

Expand All @@ -57,40 +57,45 @@ remote device, as well as the network credentials to use.
The command below uses the default values hard-coded into the debug versions of
the ESP32 all-clusters-app to commission it onto a Wi-Fi network:

$ chip-tool pairing ble-wifi ssid password 0 20202021 3840
$ chip-tool pairing ble-wifi ${NODE_ID_TO_ASSIGN} ${SSID} ${PASSWORD} 0 20202021 3840

where:

- ssid is the Wi-Fi SSID either as a string, or in the form hex:XXXXXXXX where
the bytes of the SSID are encoded as two-digit hex numbers.
- password is the Wi-Fi password, again either as a string or as hex data
- \${NODE_ID_TO_ASSIGN} (which must be a decimal number or a 0x-prefixed hex
number) is the node id to assign to the node being commissioned.
- \${SSID} is the Wi-Fi SSID either as a string, or in the form hex:XXXXXXXX
where the bytes of the SSID are encoded as two-digit hex numbers.
- \${PASSWORD} is the Wi-Fi password, again either as a string or as hex data
- The 0 is the fabric id, until more complete support for multiple fabrics is
implemented in our commissioning process.

For example:

$ chip-tool pairing ble-wifi xyz secret 0 20202021 3840
$ chip-tool pairing ble-wifi 0x11 xyz secret 0 20202021 3840

or equivalently:

$ chip-tool pairing ble-wifi hex:787980 hex:736563726574 0 20202021 3840
$ chip-tool pairing ble-wifi 17 hex:787980 hex:736563726574 0 20202021 3840

#### Pair a device over IP

The command below will discover devices and try to pair with the first one it
discovers using the provided setup code.

$ chip-tool pairing onnetwork 20202021
$ chip-tool pairing onnetwork ${NODE_ID_TO_ASSIGN} 20202021

The command below will discover devices with long discriminator 3840 and try to
pair with the first one it discovers using the provided setup code.

$ chip-tool pairing onnetwork-long 20202021 3840
$ chip-tool pairing onnetwork-long ${NODE_ID_TO_ASSIGN} 20202021 3840

The command below will discover devices based on the given QR code (which
devices log when they start up) and try to pair with the first one it discovers.

$ chip-tool pairing qrcode MT:#######
$ chip-tool pairing qrcode ${NODE_ID_TO_ASSIGN} MT:#######

In all these cases, the device will be assigned node id `${NODE_ID_TO_ASSIGN}`
(which must be a decimal number or a 0x-prefixed hex number).

### Forget the currently-commissioned device

Expand Down
3 changes: 2 additions & 1 deletion examples/lighting-app/telink/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,12 @@ following states:
1. Pair with device

```
${CHIP_TOOL_DIR}/chip-tool pairing bypass ${IP_ADDRESS_OF_CHIP_DEVICE} 5540
${CHIP_TOOL_DIR}/chip-tool pairing bypass ${NODE_ID_TO_ASSIGN} ${IP_ADDRESS_OF_CHIP_DEVICE} 5540
```

here:

- \${NODE_ID_TO_ASSIGN} is the node id to assign to the lightbulb
- `${IP_ADDRESS_OF_CHIP_DEVICE}` is IPv6 address of CHIP device
- **5540** is the standard CHIP TCP port

Expand Down
5 changes: 4 additions & 1 deletion examples/ota-requestor-app/linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ In one terminal:
In a second terminal:

```
./chip-tool pairing onnetwork-long 20202021 3840
./chip-tool pairing onnetwork-long ${NODE_ID_TO_ASSIGN} 20202021 3840
./chip-ota-requestor-app [-p <provider node id>]
```

where `${NODE_ID_TO_ASSIGN}` is the node id to assign to the provider app, which
should match the `-p` argument passed to `chip-ota-requestor-app`.

## Current Features / Limitations

### Features
Expand Down

0 comments on commit ceda5ed

Please sign in to comment.