Skip to content

Commit

Permalink
[Network Commissioning] Update NetworkCommissioning Cluster define (#…
Browse files Browse the repository at this point in the history
…12875)

* [Network Commissioning] Update Cluster Define

* Update existing code

* Remove AttributeList attribute

* Update Linux code

* Update Android CHIPTool network commissioning code

* Replace Add*Network -> AddOrUpdate*Network, remove timeoutMs param

* Update LogSourceApp

* Run Codegen

* Restyle fixes

Co-authored-by: Austin Hsieh <austinhsieh@google.com>
Co-authored-by: Andrei Litvin <andy314@gmail.com>
  • Loading branch information
3 people authored and pull[bot] committed Jul 22, 2023
1 parent e44eece commit eeb0354
Show file tree
Hide file tree
Showing 115 changed files with 8,634 additions and 8,799 deletions.
6 changes: 3 additions & 3 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ AdapterAddress
AdapterName
adb
addr
AddThreadNetwork
AddWiFiNetwork
AddOrUpdateThreadNetwork
AddOrUpdateWiFiNetwork
adk
adoc
AdvAutonomous
Expand Down Expand Up @@ -352,7 +352,7 @@ elftools
elock
emberAfExternalAttributeReadCallback
emberAfExternalAttributeWriteCallback
EnableNetwork
ConnectNetwork
EnableWiFiNetwork
EndpointId
endpointName
Expand Down
6 changes: 3 additions & 3 deletions docs/guides/mbedos_commissioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,15 @@ To run the commissioning process via BLE:

- Pass the Wi-Fi credentials to the device:

chip-device-ctrl > zcl NetworkCommissioning AddWiFiNetwork 1234 0 0 ssid=str:TESTSSID credentials=str:P455W4RD breadcrumb=0 timeoutMs=1000
chip-device-ctrl > zcl NetworkCommissioning AddOrUpdateWiFiNetwork 1234 0 0 ssid=str:TESTSSID credentials=str:P455W4RD breadcrumb=0 timeoutMs=1000

- Enable the Wi-Fi interface:

chip-device-ctrl > zcl NetworkCommissioning EnableNetwork 1234 0 0 networkID=str:TESTSSID breadcrumb=0 timeoutMs=1000
chip-device-ctrl > zcl NetworkCommissioning ConnectNetwork 1234 0 0 networkID=str:TESTSSID breadcrumb=0 timeoutMs=1000

- Close BLE connection:

chip-device-ctrl > zcl NetworkCommissioning EnableNetwork 1234 0 0 networkID=str:TESTSSID breadcrumb=0 timeoutMs=1000
chip-device-ctrl > zcl NetworkCommissioning ConnectNetwork 1234 0 0 networkID=str:TESTSSID breadcrumb=0 timeoutMs=1000

- Discover IP address of the device (address is cached in the controller for
later usage). You should provide the fabric and node ID:
Expand Down
12 changes: 6 additions & 6 deletions docs/guides/nxp_imx8m_linux_examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,15 +269,15 @@ Thermostat-app is used as an example below.
- Provision the **i.MX 8M Mini EVK** to a Wi-Fi AP with the following
commands by `NetworkCommissioning` Cluster.

Command `AddWiFiNetwork` sends the target Wi-Fi AP's SSID and password.
The `${SSID}` and `${PASSWORD}` should be in plaintext format. At this
moment, Wi-Fi is still idle on the **i.MX8 Mini EVK**.
Command `AddOrUpdateWiFiNetwork` sends the target Wi-Fi AP's SSID and
password. The `${SSID}` and `${PASSWORD}` should be in plaintext format.
At this moment, Wi-Fi is still idle on the **i.MX8 Mini EVK**.

Command `EnableNetwork` triggers the Wi-Fi AP connecting operation on
Command `ConnectNetwork` triggers the Wi-Fi AP connecting operation on
**i.MX8 Mini EVK**.

chip-device-ctrl > zcl NetworkCommissioning AddWiFiNetwork 8889 0 0 ssid=str:${SSID} credentials=str:${PASSWORD} breadcrumb=0 timeoutMs=5000
chip-device-ctrl > zcl NetworkCommissioning EnableNetwork 8889 0 0 networkID=str:${SSID} breadcrumb=0 timeoutMs=15000
chip-device-ctrl > zcl NetworkCommissioning AddOrUpdateWiFiNetwork 8889 0 0 ssid=str:${SSID} credentials=str:${PASSWORD} breadcrumb=0 timeoutMs=5000
chip-device-ctrl > zcl NetworkCommissioning ConnectNetwork 8889 0 0 networkID=str:${SSID} breadcrumb=0 timeoutMs=15000

- Make sure the controller device is connected to the same network of this
Wi-Fi AP because the Wi-Fi connection is established between the Wi-Fi
Expand Down
8 changes: 4 additions & 4 deletions docs/guides/python_chip_controller_building.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,14 @@ with network credentials.
> `zcl <Cluster> <Command> <Node Id> <Endpoint Id> <Group Id> [arguments]`
```
chip-device-ctrl > zcl NetworkCommissioning AddThreadNetwork 1234 0 0 operationalDataset=hex:0e080000000000010000000300001335060004001fffe002084fe76e9a8b5edaf50708fde46f999f0698e20510d47f5027a414ffeebaefa92285cc84fa030f4f70656e5468726561642d653439630102e49c0410b92f8c7fbb4f9f3e08492ee3915fbd2f0c0402a0fff8 breadcrumb=0 timeoutMs=3000
chip-device-ctrl > zcl NetworkCommissioning AddOrUpdateThreadNetwork 1234 0 0 operationalDataset=hex:0e080000000000010000000300001335060004001fffe002084fe76e9a8b5edaf50708fde46f999f0698e20510d47f5027a414ffeebaefa92285cc84fa030f4f70656e5468726561642d653439630102e49c0410b92f8c7fbb4f9f3e08492ee3915fbd2f0c0402a0fff8 breadcrumb=0
```

3. Enable Thread interface on the device by executing the following command with
`networkID` equal to Extended PAN Id of the Thread network:

```
chip-device-ctrl > zcl NetworkCommissioning EnableNetwork 1234 0 0 networkID=hex:4fe76e9a8b5edaf5 breadcrumb=0 timeoutMs=3000
chip-device-ctrl > zcl NetworkCommissioning ConnectNetwork 1234 0 0 networkID=hex:4fe76e9a8b5edaf5 breadcrumb=0
```

#### Commissioning a Wi-Fi device
Expand All @@ -252,13 +252,13 @@ with network credentials.
command:

```
chip-device-ctrl > zcl NetworkCommissioning AddWiFiNetwork 1234 0 0 ssid=str:TESTSSID credentials=str:P455W4RD breadcrumb=0 timeoutMs=1000
chip-device-ctrl > zcl NetworkCommissioning AddOrUpdateWiFiNetwork 1234 0 0 ssid=str:TESTSSID credentials=str:P455W4RD breadcrumb=0
```

2. Enable the Wi-Fi interface on the device by executing the following command:

```
chip-device-ctrl > zcl NetworkCommissioning EnableNetwork 1234 0 0 networkID=str:TESTSSID breadcrumb=0 timeoutMs=1000
chip-device-ctrl > zcl NetworkCommissioning ConnectNetwork 1234 0 0 networkID=str:TESTSSID breadcrumb=0
```

### Step 6: Close Bluetooth LE connection.
Expand Down
Loading

0 comments on commit eeb0354

Please sign in to comment.