diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_23.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_23.yaml new file mode 100644 index 00000000000000..419097d6c53db2 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_23.yaml @@ -0,0 +1,312 @@ +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: + 12.4.23. [TC-CNET-4.23] [Wi-Fi and Thread] Verification for + network interface switching between Wi-Fi and Thread [DUT-Server] + +PICS: + - CNET.S.F00 && CNET.S.F01 + +config: + nodeId: 0x12344321 + cluster: "Network Commissioning" + endpoint: 0 + +tests: + - label: "Preconditions" + verification: | + 1. DUT supports CNET.S.F00(WI) on endpoint PIXIT.CNET.ENDPOINT_WIFI and CNET.S.F01(TH) on endpoint PIXIT.CNET.ENDPOINT_THREAD + 2. DUT has a Network Commissioning cluster on endpoint PIXIT.CNET.ENDPOINT_WIFI with FeatureMap attribute of 1, and a Network Commissioning cluster on PIXIT.CNET.ENDPOINT_THREAD with FeatureMap attribute of 2 + 3. DUT is commissioned on PIXIT.CNET.WIFI_1ST_ACCESSPOINT_SSID + 4. TH can connect to both Wi-Fi network (PIXIT.CNET.WIFI_1ST_ACCESSPOINT_SSID) and Thread network (PIXIT.CNET.THREAD_1ST_OPERATIONALDATASET) + 5. XPANID of PIXIT.CNET.THREAD_1ST_OPERATIONALDATASET is saved as th_xpan + disabled: true + + - label: + "Step 1: TH sends ArmFailSafe command to the DUT with + ExpiryLengthSeconds set to 900" + verification: | + ./chip-tool generalcommissioning arm-fail-safe 900 1 1 0 + + Via the TH (chip-tool), verify that DUT sends ArmFailSafe with timeout as 900 secs to the TH. + + [1725257597.514] [1602947:1602949] [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 + [1725257597.514] [1602947:1602949] [TOO] Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0001 + [1725257597.514] [1602947:1602949] [TOO] ArmFailSafeResponse: { + [1725257597.514] [1602947:1602949] [TOO] errorCode: 0 + [1725257597.514] [1602947:1602949] [TOO] debugText: + [1725257597.514] [1602947:1602949] [TOO] } + disabled: true + + - label: + "Step 2: TH reads Networks attribute on endpoint PIXIT.CNET.ENDPOINT_WIFI from the DUT" + PICS: CNET.S.A0001 + verification: | + ./chip-tool networkcommissioning read networks 1 + + Via the TH (chip-tool), verify that the Networks attribute list has an entry with the following fields: + - NetworkID is the hex representation of the ASCII values for PIXIT.CNET.WIFI_1ST_ACCESSPOINT_SSID. + - Connected is of type bool and is TRUE. + + [1725257919.649] [1614460:1614462] [TOO] Endpoint: 0 Cluster: 0x0000_0031 Attribute 0x0000_0001 DataVersion: 787549968 + [1725257919.649] [1614460:1614462] [TOO] Networks: 1 entries + [1725257919.649] [1614460:1614462] [TOO] [1]: { + [1725257919.649] [1614460:1614462] [TOO] NetworkID: 47524C50726976617465 + [1725257919.649] [1614460:1614462] [TOO] Connected: TRUE + [1725257919.649] [1614460:1614462] [TOO] } + disabled: true + + - label: + "Step 3: TH finds the index of the Networks list entry with NetworkID for + PIXIT.CNET.WIFI_1ST_ACCESSPOINT_SSID and saves it as 'Userwifi_netidx'" + verification: | + disabled: true + + - label: + "Step 4: TH sends RemoveNetwork Command to the DUT's endpoint PIXIT.CNET.ENDPOINT_WIFI + with NetworkID field set to PIXIT.CNET.WIFI_1ST_ACCESSPOINT_SSID" + PICS: CNET.S.C04.Rsp && CNET.S.C05.Tx + verification: | + ./chip-tool networkcommissioning remove-network hex: 1 + + Below is an example: + + ./chip-tool networkcommissioning remove-network hex:47524C50726976617465 1 0 + + Via the TH (chip-tool), verify that DUT sends NetworkConfigResponse to command with the following fields: + - NetworkingStatus is Success (0) + - NetworkIndex matches previously saved 'Userwifi_netidx' + + [1725258408.903] [1626407:1626409] [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_0031 Command=0x0000_0005 + [1725258408.903] [1626407:1626409] [TOO] Endpoint: 0 Cluster: 0x0000_0031 Command 0x0000_0005 + [1725258408.903] [1626407:1626409] [TOO] NetworkConfigResponse: { + [1725258408.903] [1626407:1626409] [TOO] networkingStatus: 0 + [1725258408.903] [1626407:1626409] [TOO] networkIndex: 0 + [1725258408.903] [1626407:1626409] [TOO] } + disabled: true + + - label: + "Step 5: TH sends AddOrUpdateThreadNetwork command to the DUT's endpoint PIXIT.CNET.ENDPOINT_THREAD + with operational dataset field set to PIXIT.CNET.THREAD_1ST_OPERATIONALDATASET" + PICS: CNET.S.C03.Rsp && CNET.S.C05.Tx + verification: | + ./chip-tool networkcommissioning add-or-update-thread-network-network hex: 1 + + Below is an example: + + ./chip-tool networkcommissioning add-or-update-thread-network hex:0e08000000000001000035060004001fffe00708fdd235604ef7ccb50c0402a0f7f8051000112233445566778899aabbccddeeff030f4f70656e54687265616444656d6f3104101dfb97da1e39dc596e886f52cb870a84000300000f0208111111112222222201021234 1 65534 + + Via the TH (chip-tool), verify that DUT sends the NetworkConfigResponse command to the TH with the following fields: + - NetworkingStatus is Success (0) + - DebugText is of type string with max length 512 or empty + + [1725259143.334] [1652611:1652613] [DMG] Received Command Response Data, Endpoint=65534 Cluster=0x0000_0031 Command=0x0000_0005 + [1725259143.334] [1652611:1652613] [TOO] Endpoint: 65534 Cluster: 0x0000_0031 Command 0x0000_0005 + [1725259143.334] [1652611:1652613] [TOO] NetworkConfigResponse: { + [1725259143.334] [1652611:1652613] [TOO] networkingStatus: 0 + [1725259143.334] [1652611:1652613] [TOO] networkIndex: 0 + [1725259143.334] [1652611:1652613] [TOO] } + disabled: true + + - label: "Step 6: TH reads Networks attribute from the DUT's endpoint PIXIT.CNET.ENDPOINT_THREAD" + PICS: CNET.S.A0001 + verification: | + ./chip-tool networkcommissioning read networks 1 + + Via the TH (chip-tool), verify that the Networks attribute list has an entry with the following fields: + - NetworkID is `th_xpan`. + - Connected is of type bool and is FALSE. + + [1725259770.350] [1668581:1668583] [TOO] Endpoint: 65534 Cluster: 0x0000_0031 Attribute 0x0000_0001 DataVersion: 2311103903 + [1725259770.350] [1668581:1668583] [TOO] Networks: 1 entries + [1725259770.350] [1668581:1668583] [TOO] [1]: { + [1725259770.350] [1668581:1668583] [TOO] NetworkID: 1111111122222222 + [1725259770.350] [1668581:1668583] [TOO] Connected: FALSE + [1725259770.350] [1668581:1668583] [TOO] } + disabled: true + + - label: + "Step 7: TH sends ConnectNetwork command to the DUT's endpoint PIXIT.CNET.ENDPOINT_THREAD + with NetworkID field set to `th_xpan`" + PICS: CNET.S.C06.Rsp + verification: | + ./chip-tool networkcommissioning connect-network hex: 1 + + Below is an example: + + ./chip-tool networkcommissioning connect-network hex:1111111122222222 1 65534 + disabled: true + + - label: + "Step 8: TH discovers and connects to DUT on the Thread + PIXIT.CNET.THREAD_1ST_OPERATIONALDATASET operational network" + PICS: CNET.S.A0001 + verification: | + Verify that the TH successfully connects to the DUT + disabled: true + + - label: + "Step 9: TH sends the CommissioningComplete command to the DUT" + verification: | + ./chip-tool generalcommissioning commissioning-complete 1 0 + + Via the TH (chip-tool), verify that DUT sends CommissioningCompleteResponse with the ErrorCode field set to OK (0). + + [1725260645.498] [1695226:1695228] [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 + [1725260645.499] [1695226:1695228] [TOO] Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0005 + [1725260645.499] [1695226:1695228] [TOO] CommissioningCompleteResponse: { + [1725260645.499] [1695226:1695228] [TOO] errorCode: 0 + [1725260645.499] [1695226:1695228] [TOO] debugText: + [1725260645.499] [1695226:1695228] [TOO] } + disabled: true + + - label: + "Step 10: TH reads Networks attribute from the DUT's endpoint PIXIT.CNET.ENDPOINT_THREAD" + PICS: CNET.S.A0001 + verification: | + ./chip-tool networkcommissioning read networks 1 + + Via the TH (chip-tool), save the index of the Networks list entry as `Userth_netidx` and + verify that the Networks attribute list has an entry with the following values: + - NetworkID is `th_xpan`. + - Connected is of type bool and is TRUE. + + [1725260311.545] [1686771:1686773] [TOO] Endpoint: 65534 Cluster: 0x0000_0031 Attribute 0x0000_0001 DataVersion: 2311103912 + [1725260311.545] [1686771:1686773] [TOO] Networks: 1 entries + [1725260311.545] [1686771:1686773] [TOO] [1]: { + [1725260311.545] [1686771:1686773] [TOO] NetworkID: 1111111122222222 + [1725260311.545] [1686771:1686773] [TOO] Connected: TRUE + [1725260311.545] [1686771:1686773] [TOO] } + disabled: true + + - label: + "Step 11: TH sends ArmFailSafe command to the DUT with + ExpiryLengthSeconds set to 900" + verification: | + ./chip-tool generalcommissioning arm-fail-safe 900 1 1 0 + + Via the TH (chip-tool), verify that DUT sends ArmFailSafeResponse command to the TH. + + [1725261059.081] [1706041:1706043] [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 + [1725261059.081] [1706041:1706043] [TOO] Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0001 + [1725261059.081] [1706041:1706043] [TOO] ArmFailSafeResponse: { + [1725261059.081] [1706041:1706043] [TOO] errorCode: 0 + [1725261059.081] [1706041:1706043] [TOO] debugText: + [1725261059.081] [1706041:1706043] [TOO] } + disabled: true + + - label: + "Step 12: TH sends RemoveNetwork Command to the DUT's endpoint PIXIT.CNET.ENDPOINT_THREAD + with NetworkID field set to `th_xpan`" + PICS: CNET.S.C04.Rsp && CNET.S.C05.Tx + verification: | + ./chip-tool networkcommissioning remove-network hex: 1 + + Below is an example: + + ./chip-tool networkcommissioning remove-network hex:1111111122222222 1 65534 + + Via the TH (chip-tool), verify that DUT sends NetworkConfigResponse to command with the following fields: + - NetworkingStatus is Success (0) + - NetworkIndex is `Userth_netidx` + + [1725258408.903] [1626407:1626409] [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_0031 Command=0x0000_0005 + [1725258408.903] [1626407:1626409] [TOO] Endpoint: 0 Cluster: 0x0000_0031 Command 0x0000_0005 + [1725258408.903] [1626407:1626409] [TOO] NetworkConfigResponse: { + [1725258408.903] [1626407:1626409] [TOO] networkingStatus: 0 + [1725258408.903] [1626407:1626409] [TOO] networkIndex: 0 + [1725258408.903] [1626407:1626409] [TOO] } + disabled: true + + - label: + "Step 13: TH sends AddOrUpdateWiFiNetwork command to the DUT's endpoint PIXIT.CNET.ENDPOINT_WIFI + with SSID field set to PIXIT.CNET.WIFI_1ST_ACCESSPOINT_SSID, + Credentials field set to PIXIT.CNET.WIFI_1ST_ACCESSPOINT_CREDENTIALS" + PICS: CNET.S.C02.Rsp && CNET.S.C05.Tx + verification: | + ./chip-tool networkcommissioning add-or-update-wi-fi-network hex: 1 + + Below is an example: + ./chip-tool networkcommissioning add-or-update-wi-fi-network hex:47524C50726976617465 wifi-password 1 0 + + Via the TH (chip-tool), verify that DUT sends the NetworkConfigResponse command to the TH with the following response fields: + - NetworkingStatus is success (0) + - DebugText is of type string with max length 512 or empty + + [1725269920.826] [2018354:2018356] [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_0031 Command=0x0000_0005 + [1725269920.826] [2018354:2018356] [TOO] Endpoint: 0 Cluster: 0x0000_0031 Command 0x0000_0005 + [1725269920.826] [2018354:2018356] [TOO] NetworkConfigResponse: { + [1725269920.826] [2018354:2018356] [TOO] networkingStatus: 0 + [1725269920.826] [2018354:2018356] [TOO] networkIndex: 0 + [1725269920.826] [2018354:2018356] [TOO] } + disabled: true + + - label: + "Step 14: TH sends ConnectNetwork command to the DUT's endpoint PIXIT.CNET.ENDPOINT_WIFI + with NetworkID field set to PIXIT.CNET.WIFI_1ST_ACCESSPOINT_SSID" + PICS: CNET.S.C06.Rsp && CNET.S.C07.Tx + verification: | + ./chip-tool networkcommissioning connect-network hex: 1 + + Below is an example: + ./chip-tool networkcommissioning connect-network hex:47524C50726976617465 1 0 + + [1725270259.003] [2033918:2033920] [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_0031 Command=0x0000_0007 + [1725270259.003] [2033918:2033920] [TOO] Endpoint: 0 Cluster: 0x0000_0031 Command 0x0000_0007 + [1725270259.003] [2033918:2033920] [TOO] ConnectNetworkResponse: { + [1725270259.003] [2033918:2033920] [TOO] networkingStatus: 0 + [1725270259.003] [2033918:2033920] [TOO] errorValue: null + [1725270259.003] [2033918:2033920] [TOO] } + disabled: true + + - label: + "Step 15: TH discovers and connects to DUT on the Wi-Fi PIXIT.CNET.WIFI_1ST_ACCESSPOINT_SSID operational network" + PICS: CNET.S.A0001 + verification: | + Verify that the TH successfully connects to the DUT + disabled: true + + - label: + "Step 16: TH sends the CommissioningComplete command to the DUT" + verification: | + ./chip-tool generalcommissioning commissioning-complete 1 0 + + Via the TH (chip-tool), verify that DUT sends CommissioningCompleteResponse with the ErrorCode field set to OK (0). + + [1725270695.001] [2049371:2049373] [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0005 + [1725270695.001] [2049371:2049373] [TOO] Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0005 + [1725270695.001] [2049371:2049373] [TOO] CommissioningCompleteResponse: { + [1725270695.001] [2049371:2049373] [TOO] errorCode: 0 + [1725270695.001] [2049371:2049373] [TOO] debugText: + [1725270695.001] [2049371:2049373] [TOO] } + disabled: true + + - label: + "Step 17: TH reads Networks attribute from the DUT's endpoint PIXIT.CNET.ENDPOINT_WIFI" + PICS: CNET.S.A0001 + verification: | + ./chip-tool networkcommissioning read networks 1 + + Via the TH (chip-tool), Verify that the Networks attribute list has an entry with the following fields: + - NetworkID is the hex representation of the ASCII values for PIXIT.CNET.WIFI_1ST_ACCESSPOINT_SSID + - Connected is of type bool and is TRUE. + + [1725260311.545] [1686771:1686773] [TOO] Endpoint: 65534 Cluster: 0x0000_0031 Attribute 0x0000_0001 DataVersion: 2311103912 + [1725260311.545] [1686771:1686773] [TOO] Networks: 1 entries + [1725260311.545] [1686771:1686773] [TOO] [1]: { + [1725260311.545] [1686771:1686773] [TOO] NetworkID: 1111111122222222 + [1725260311.545] [1686771:1686773] [TOO] Connected: TRUE + [1725260311.545] [1686771:1686773] [TOO] } + disabled: true