From 1035562aa58ba0efa615e1087910570b2cdd81da Mon Sep 17 00:00:00 2001 From: manjunath-grl <102359958+manjunath-grl@users.noreply.github.com> Date: Wed, 6 Dec 2023 00:07:57 +0530 Subject: [PATCH] Modified CADMIN tests Nov 23 (#30623) * Modified tests TC-CADMIN-1.3 TC-CADMIN-1.4 TC-CADMIN-1.5 TC-CADMIN-1.6 TC-CADMIN-1.9 * Restyled by whitespace --------- Co-authored-by: Restyled.io --- .../certification/Test_TC_CADMIN_1_3.yaml | 603 ++++++++++++------ .../certification/Test_TC_CADMIN_1_4.yaml | 10 +- .../certification/Test_TC_CADMIN_1_5.yaml | 598 ++++++++++++----- .../certification/Test_TC_CADMIN_1_6.yaml | 4 +- .../certification/Test_TC_CADMIN_1_9.yaml | 581 +++++++++++++++-- 5 files changed, 1349 insertions(+), 447 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml index cde41502b540e7..38e4df597aeb7a 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Project CHIP Authors +# Copyright (c) 2023 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. @@ -11,38 +11,120 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 4.1.3. [TC-CADMIN-1.3] Node Behavior using ECM [DUT - Commissionee] +name: 24.1.3. [TC-CADMIN-1.3] Node Behavior using ECM [DUT - Commissionee] PICS: - CADMIN.S config: nodeId: 0x12344321 - cluster: "Basic Information" + timeout: 300 + nodeId2: + type: node_id + defaultValue: 0xCAFE endpoint: 0 + discriminator: + type: int16u + defaultValue: 3840 + payload: + type: char_string + defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically + PakeVerifier: + type: octet_string + defaultValue: "hex:b96170aae803346884724fe9a3b287c30330c2a660375d17bb205a8cf1aecb350457f8ab79ee253ab6a8e46bb09e543ae422736de501e3db37d441fe344920d09548e4c18240630c4ff4913c53513839b7c07fcc0627a1b8573a149fcd1fa466cf" + waitAfterCommissioning: + type: int16u + defaultValue: 5000 + PIXIT.CADMIN.CwDuration: + type: int16u + defaultValue: 180 tests: - - label: "Precondition" + - label: "Precondition: Reset Devices to factory defaults" + PICS: PICS_SDK_CI_ONLY + cluster: "SystemCommands" + command: "FactoryReset" + + - label: "Precondition: Reset Devices to factory defaults" verification: | Reset Devices to factory defaults - disabled: true - - - label: "Step 1: TH_CR1 starts a commissioning process with DUT_CE" + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Factory Reset the DUT and enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: "Step 1a: TH_CR1 starts a commissioning process with DUT_CE" + cluster: "CommissionerCommands" + command: "PairWithCode" PICS: CADMIN.S - verification: | - "1. Provision the DUT_CE (all-cluster-app) device using TH_CR1 (chip-tool ) on the raspi" - disabled: true + arguments: + values: + - name: "nodeId" + value: nodeId + - name: "payload" + value: payload + + - label: "Step 1b: TH_CR1 commissioned with DUT_CE" + cluster: "DelayCommands" + command: "WaitForCommissionee" + PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: + "Step 1c: TH1 reads CurrentFabricIndex attribute and save it for + future use." + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "CurrentFabricIndex" + response: + saveAs: TH1FabricIndex - label: "Step 2a: TH_CR1 opens a commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.S.C00.Rsp + cluster: "Administrator Commissioning" + command: "OpenCommissioningWindow" + PICS: CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: PIXIT.CADMIN.CwDuration + - name: "PAKEPasscodeVerifier" + value: PakeVerifier + - name: "Discriminator" + value: discriminator + - name: "Iterations" + value: 1000 + - name: "Salt" + value: "SPAKE2P Key Salt" + + - label: "Waiting after opening commissioning window" + PICS: CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: waitAfterCommissioning + + #Issue https://github.com/project-chip/connectedhomeip/issues/26127 + - label: + "Step 2a: TH_CR1 opens a commissioning window on DUT_CE using a + commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" verification: | On TH_CR1 send the below command - ./chip-tool pairing open-commissioning-window 1 1 400 2000 3841 + ./chip-tool pairing open-commissioning-window 1 1 PIXIT.CADMIN.CwDuration 2000 3840 Verify the Open commisioning window on the DUT_CE(all-cluster-app) Log: @@ -56,68 +138,104 @@ tests: [1635864513.699489][3850:3855] CHIP:CTL: Manual pairing code: [36177160937] [1635864513.699566][3850:3855] CHIP:CTL: SetupQRCode: [MT:00000CQM00YZN476420] [1635864513.699636][3850:3855] CHIP:EM: Sending Standalone Ack for MessageCounter:2599714227 on exchange 60688i - [1635864513.699685][3850:3855] CHIP:IN: Prepared plaintext message 0xffff8a7cd960 to 0x0000000000000000 of type 0x10 and . - disabled: true + [1635864513.699685][3850:3855] CHIP:IN: Prepared plaintext message 0xffff8a7cd960 to 0x0000000000000000 of type 0x10 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "Step 2b: Verify that the DNS-SD advertisement shows CM=2" - verification: | - On TH_CR1 send the below command - - avahi-browse -rt _matterc._udp - - On TH_CR1(chip-tool) Verify that the DNS-SD advertisement shows CM=2 - - + eth0 IPv6 4D0262FE51384D5A _matterc._udp local - = eth0 IPv6 4D0262FE51384D5A _matterc._udp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2753] - port = [5540] - txt = ["PI=" "PH=36" "CM=2" "D=3840" "T=1" "SAI=300" "SII=5000" "VP=65521+32769"] - disabled: true + - label: + "Step 2b: DNS-SD records shows DUT_CE advertising.Verify that the + DNS-SD advertisement shows CM=2" + PICS: CADMIN.S.C00.Rsp + cluster: "DiscoveryCommands" + command: "FindCommissionable" + response: + values: + - name: "commissioningMode" + value: 2 - label: - "Step 2c: TH_CR1 writes and reads the Basic Information Clusters - NodeLabel mandatory attribute of DUT_CE" + "Step 2c: TH_CR1 writes the Basic Information Clusters NodeLabel + mandatory attribute of DUT_CE" + command: "writeAttribute" PICS: BINFO.S.A0005 - verification: | - On TH_CR1 send the below command - - ./chip-tool basicinformation write node-label te9 1 0 - - Verify the success response on the TH_CR1(chip-tool) Log: - - - [1649245940.789388][10110:10115] CHIP:DMG: - [1649245940.789454][10110:10115] CHIP:DMG: StatusIB = - [1649245940.789519][10110:10115] CHIP:DMG: { - [1649245940.789588][10110:10115] CHIP:DMG: status = 0x00 (SUCCESS), - [1649245940.789654][10110:10115] CHIP:DMG: }, - [1649245940.789719][10110:10115] CHIP:DMG: - [1649245940.789778][10110:10115] CHIP:DMG: }, - [1649245940.789841][10110:10115] CHIP:DMG: - - ./chip-tool basicinformation read node-label 1 0 - - Verify the Nodelabel response on the TH_CR1(chip-tool) Log: - - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 - [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te9 - [1649245950.007024][10116:10121] CHIP:EM: Sending Standalone Ack for MessageCounter:12495101 on exchange 24816i - disabled: true + cluster: "Basic Information" + attribute: "NodeLabel" + arguments: + value: "chiptest" + - label: + "Step 2c: TH_CR1 reads the Basic Information Clusters NodeLabel + mandatory attribute of DUT_CE" + command: "readAttribute" + PICS: BINFO.S.A0005 + cluster: "Basic Information" + attribute: "NodeLabel" + response: + value: "chiptest" + constraints: + type: char_string + maxLength: 32 + + - label: "Step 3a: TH_CR2 starts a commissioning process with DUT_CE" + identity: "beta" + PICS: CADMIN.S && PICS_SDK_CI_ONLY + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload + + - label: "Step 3b: DUT_CE is commissioned by TH_CR2 on Fabric ID2" + PICS: CADMIN.S && PICS_SDK_CI_ONLY + identity: "beta" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId2 + + #Issue https://github.com/project-chip/connectedhomeip/issues/26127 - label: "Step 3: TH_CR2 starts a commissioning process with DUT_CE" - PICS: CADMIN.S verification: | On TH_CR2 send the below command - Below is the example when using chip tool as controller (considering 36177160937 as the manual code generated by 1st controller) - ./chip-tool pairing code 2 36177160937 --commissioner-name beta + ./chip-tool pairing code 0xCAFE 36177160937 --commissioner-name beta + Verify the below message in the TH_CR2(chip-tool) Log: - Device commissioning completed with success - disabled: true + Device commissioning completed with successoning step 'Cleanup' + [1657186359.584743][3509:3514] CHIP:TOO: Device commissioning completed with success + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: + "Step 3c: TH2 reads CurrentFabricIndex attribute and save it for + future use." + identity: "beta" + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "CurrentFabricIndex" + response: + saveAs: TH2FabricIndex - label: "Step 4: Verify DUT_CE is now discoverable over DNS-SD with two SRV @@ -134,144 +252,146 @@ tests: + eth0 IPv6 9B9C01C971F4119F-0000000000000001 _matter._tcp local + eth0 IPv6 C8A60CCA27F33379-0000000000000002 _matter._tcp local = eth0 IPv6 9B9C01C971F4119F-0000000000000001 _matter._tcp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2753] - port = [5540] - txt = ["T=1" "SAI=300" "SII=5000"] + hostname = [E45F010F27530000.local] + address = [fe80::e65f:1ff:fe0f:2753] + port = [5540] + txt = ["T=1" "SAI=300" "SII=5000"] = eth0 IPv6 C8A60CCA27F33379-0000000000000002 _matter._tcp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2753] - port = [5540] - txt = ["T=1" "SAI=300" "SII=5000"] + hostname = [E45F010F27530000.local] + address = [fe80::e65f:1ff:fe0f:2753] + port = [5540] + txt = ["T=1" "SAI=300" "SII=5000"] ubuntu@ubuntu:~/may16_cntrl/connectedhomeip/examples/chip-tool/out/debug$ - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 5: TH_CR1 reads the list of Fabrics on DUT_CE" + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "Fabrics" PICS: OPCREDS.S.A0001 - verification: | - On TH_CR1 send the below command - - ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 - - Verify the entiries on the TH_CR1(chip-tool) Log: - - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 3621507063 - [1649245825.315152][10098:10103] CHIP:TOO: Fabrics: 2 entries - [1649245825.315316][10098:10103] CHIP:TOO: [1]: { - [1649245825.315370][10098:10103] CHIP:TOO: RootPublicKey: 045541017FCEFD0D83963C9ED7F21380C6B789EB989B5D20DC318FAE92D60D0F685666505E9C4F86C49ADC71AB3A8B9B44FD43214CF9BE2B6D47DE01F28FE1544F - [1649245825.315436][10098:10103] CHIP:TOO: VendorId: 65521 - [1649245825.315479][10098:10103] CHIP:TOO: FabricId: 1 - [1649245825.315518][10098:10103] CHIP:TOO: NodeId: 1 - [1649245825.315557][10098:10103] CHIP:TOO: Label: - [1649245825.315596][10098:10103] CHIP:TOO: FabricIndex: 1 - [1649245825.315637][10098:10103] CHIP:TOO: } - [1649245825.315697][10098:10103] CHIP:TOO: [2]: { - [1649245825.315747][10098:10103] CHIP:TOO: RootPublicKey: 047D75BF7D91FCFFB29DAD375D09790FEBE9205227C44D4FF8EB70ADAD02E416E08269B9F77E86FE14270525B64C41417CEA3E9FDE0552AE8DF05F8D98B6B6E2E2 - [1649245825.315789][10098:10103] CHIP:TOO: VendorId: 65521 - [1649245825.315830][10098:10103] CHIP:TOO: FabricId: 1 - [1649245825.315870][10098:10103] CHIP:TOO: NodeId: 2 - [1649245825.315908][10098:10103] CHIP:TOO: Label: - [1649245825.315947][10098:10103] CHIP:TOO: FabricIndex: 2 - [1649245825.315986][10098:10103] CHIP:TOO: } - disabled: true + fabricFiltered: false + response: + constraints: + type: list + contains: + [ + { + Label: "", + FabricIndex: TH1FabricIndex, + NodeID: nodeId, + }, + { + Label: "", + FabricIndex: TH2FabricIndex, + NodeID: nodeId2, + }, + ] - label: "Step 6: TH_CR2 reads the list of Fabrics on DUT_CE" + identity: "beta" + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "Fabrics" PICS: OPCREDS.S.A0001 - verification: | - On TH_CR2 send the below command - - ./chip-tool operationalcredentials read fabrics 2 0 --fabric-filtered 0 --commissioner-name beta - - Verify the entiries on the TH_CR2(chip-tool) Log: - - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 3621507063 - [1649245825.315152][10098:10103] CHIP:TOO: Fabrics: 2 entries - [1649245825.315316][10098:10103] CHIP:TOO: [1]: { - [1649245825.315370][10098:10103] CHIP:TOO: RootPublicKey: 045541017FCEFD0D83963C9ED7F21380C6B789EB989B5D20DC318FAE92D60D0F685666505E9C4F86C49ADC71AB3A8B9B44FD43214CF9BE2B6D47DE01F28FE1544F - [1649245825.315436][10098:10103] CHIP:TOO: VendorId: 65521 - [1649245825.315479][10098:10103] CHIP:TOO: FabricId: 1 - [1649245825.315518][10098:10103] CHIP:TOO: NodeId: 1 - [1649245825.315557][10098:10103] CHIP:TOO: Label: - [1649245825.315596][10098:10103] CHIP:TOO: FabricIndex: 1 - [1649245825.315637][10098:10103] CHIP:TOO: } - [1649245825.315697][10098:10103] CHIP:TOO: [2]: { - [1649245825.315747][10098:10103] CHIP:TOO: RootPublicKey: 047D75BF7D91FCFFB29DAD375D09790FEBE9205227C44D4FF8EB70ADAD02E416E08269B9F77E86FE14270525B64C41417CEA3E9FDE0552AE8DF05F8D98B6B6E2E2 - [1649245825.315789][10098:10103] CHIP:TOO: VendorId: 65521 - [1649245825.315830][10098:10103] CHIP:TOO: FabricId: 1 - [1649245825.315870][10098:10103] CHIP:TOO: NodeId: 2 - [1649245825.315908][10098:10103] CHIP:TOO: Label: - [1649245825.315947][10098:10103] CHIP:TOO: FabricIndex: 2 - [1649245825.315986][10098:10103] CHIP:TOO: } - disabled: true + fabricFiltered: false + response: + constraints: + type: list + contains: + [ + { + Label: "", + FabricIndex: TH1FabricIndex, + NodeID: nodeId, + }, + { + Label: "", + FabricIndex: TH2FabricIndex, + NodeID: nodeId2, + }, + ] - label: - "Step 7: TH_CR1 writes and reads the Basic Information Clusters - NodeLabel mandatory attribute of DUT_CE" + "Step 7a: TH_CR1 writes the Basic Information Clusters NodeLabel + mandatory attribute of DUT_CE" + command: "writeAttribute" + cluster: "Basic Information" PICS: BINFO.S.A0005 - verification: | - On TH_CR1 send the below command - - ./chip-tool basicinformation write node-label te9 1 0 - - Verify the Success response on the TH_CR1(chip-tool) Log: - - [1649245940.789313][10110:10115] CHIP:DMG: } - [1649245940.789388][10110:10115] CHIP:DMG: - [1649245940.789454][10110:10115] CHIP:DMG: StatusIB = - [1649245940.789519][10110:10115] CHIP:DMG: { - [1649245940.789588][10110:10115] CHIP:DMG: status = 0x00 (SUCCESS), - [1649245940.789654][10110:10115] CHIP:DMG: }, - - - Verify read attribute returns the updated value written - - ./chip-tool basicinformation read node-label 1 0 - - Verify the Nodelabel response on the TH_CR1(chip-tool) Log: - - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 - [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te9 - [1649245950.007024][10116:10121] CHIP:EM: Sending Standalone Ack for MessageCounter:12495101 on exchange 24816i - disabled: true + attribute: "NodeLabel" + arguments: + value: "chiptest1" - label: - "Step 8: TH_CR2 reads, writes and then reads the Basic Information - Clusters NodeLabel mandatory attribute of DUT_CE" + "Step 7b: TH_CR1 reads the Basic Information Clusters NodeLabel + mandatory attribute of DUT_CE" + command: "readAttribute" + cluster: "Basic Information" PICS: BINFO.S.A0005 - verification: | - On TH_CR2 send the below command - - ./chip-tool basicinformation write node-label te9 2 0 --commissioner-name beta - - Verify the Success response on the TH_CR2(chip-tool) Log: - - [1649245940.789388][10110:10115] CHIP:DMG: - [1649245940.789454][10110:10115] CHIP:DMG: StatusIB = - [1649245940.789519][10110:10115] CHIP:DMG: { - [1649245940.789588][10110:10115] CHIP:DMG: status = 0x00 (SUCCESS), - [1649245940.789654][10110:10115] CHIP:DMG: }, - - Verify read attribute returns the updated value written - - ./chip-tool basicinformation read node-label 2 0 --commissioner-name beta - - Verify the Nodelabel response on the TH_CR1(chip-tool) Log: + attribute: "NodeLabel" + response: + value: "chiptest1" + constraints: + type: char_string + maxLength: 32 + - label: + "Step 8a: TH_CR2 writes the Basic Information Clusters NodeLabel + mandatory attribute of DUT_CE" + identity: "beta" + command: "writeAttribute" + cluster: "Basic Information" + PICS: BINFO.S.A0005 + attribute: "NodeLabel" + arguments: + value: "chiptest2" - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 - [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te9 - [1649245950.007024][10116:10121] CHIP:EM: Sending Standalone Ack for MessageCounter:12495101 on exchange 24816i - disabled: true + - label: + "Step 8b: TH_CR2 reads the Basic Information Clusters NodeLabel + mandatory attribute of DUT_CE" + identity: "beta" + command: "readAttribute" + cluster: "Basic Information" + PICS: BINFO.S.A0005 + attribute: "NodeLabel" + response: + value: "chiptest2" + constraints: + type: char_string + maxLength: 32 - label: "Step 9: TH_CR2 opens a commissioning window on DUT_CE using ECM" - PICS: CADMIN.S.C00.Rsp + cluster: "Administrator Commissioning" + command: "OpenCommissioningWindow" + PICS: CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY + identity: "beta" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: PIXIT.CADMIN.CwDuration + - name: "PAKEPasscodeVerifier" + value: PakeVerifier + - name: "Discriminator" + value: discriminator + - name: "Iterations" + value: 1000 + - name: "Salt" + value: "SPAKE2P Key Salt" + + #Issue https://github.com/project-chip/connectedhomeip/issues/26127 + - label: "Step 9: TH_CR2 opens a commissioning window on DUT_CE using ECM" verification: | On TH_CR2 send the below command - ./chip-tool pairing open-commissioning-window 2 1 200 1000 3840 --commissioner-name beta + ./chip-tool pairing open-commissioning-window 2 1 PIXIT.CADMIN.CwDuration 1000 3840 --commissioner-name beta Verify the Open commisioning window on the DUT_CE(all-cluster-app) Log: @@ -284,37 +404,69 @@ tests: [1635864513.699433][3850:3855] CHIP:DMG: ICR moving to [CommandSen] [1635864513.699489][3850:3855] CHIP:CTL: Manual pairing code: [36177160937] [1635864513.699566][3850:3855] CHIP:CTL: SetupQRCode: [MT:00000CQM00YZN476420] - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 10: Wait for the commissioning window in step 9 to timeout" - verification: | - Wait for the timeout of the above step - disabled: true + PICS: CADMIN.S.C00.Rsp + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: PIXIT.CADMIN.CwDuration * 1000 - label: "Step 11: TH_CR2 reads the window status to verify the DUT_CE window is closed" + cluster: "Administrator Commissioning" PICS: CADMIN.S.A0000 - verification: | - On TH_CR2 send the below command - - Below command is an example using chip tool - ./chip-tool administratorcommissioning read window-status 2 0 --commissioner-name beta - - Verify the WindowStatus on the TH_CR2(chip-tool) Log: - - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 2849200592 - [1651137648.760469][14047:14052] CHIP:TOO: WindowStatus: 0 - [1651137648.760534][14047:14052] CHIP:EM: Sending Standalone Ack for MessageCounter:5527412 on exchange 14590i - disabled: true + command: "readAttribute" + attribute: "WindowStatus" + response: + value: 0 - label: "Step 12: TH_CR2 opens a commissioning window on DUT_CE using ECM" - PICS: CADMIN.S.C00.Rsp + cluster: "Administrator Commissioning" + command: "OpenCommissioningWindow" + PICS: CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY + identity: "beta" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: PIXIT.CADMIN.CwDuration + - name: "PAKEPasscodeVerifier" + value: PakeVerifier + - name: "Discriminator" + value: discriminator + - name: "Iterations" + value: 1000 + - name: "Salt" + value: "SPAKE2P Key Salt" + + - label: "Waiting after opening commissioning window" + PICS: CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: waitAfterCommissioning + + #Issue https://github.com/project-chip/connectedhomeip/issues/26127 + - label: "Step 12: TH_CR2 opens a commissioning window on DUT_CE using ECM" verification: | On TH_CR2 send the below command - ./chip-tool pairing open-commissioning-window 2 1 200 1000 3840 --commissioner-name beta + ./chip-tool pairing open-commissioning-window 2 1 PIXIT.CADMIN.CwDuration 1000 3840 --commissioner-name beta Verify the Open commisioning window on the DUT_CE(all-cluster-app) Log: @@ -328,17 +480,39 @@ tests: [1635864513.699489][3850:3855] CHIP:CTL: Manual pairing code: [36177160937] [1635864513.699566][3850:3855] CHIP:CTL: SetupQRCode: [MT:00000CQM00YZN476420] [1635864513.699636][3850:3855] CHIP:EM: Sending Standalone Ack for MessageCounter:2599714227 on exchange 60688i - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: "Step 13: TH_CR1 starts a commissioning process with DUT_CE before the timeout from step 12" - PICS: CADMIN.S + cluster: "CommissionerCommands" + command: "PairWithCode" + PICS: CADMIN.S && PICS_SDK_CI_ONLY + arguments: + values: + - name: "nodeId" + value: nodeId + - name: "payload" + value: payload + response: + error: FAILURE + + #Issue https://github.com/project-chip/connectedhomeip/issues/26127 + - label: + "Step 13: TH_CR1 starts a commissioning process with DUT_CE before the + timeout from step 12" verification: | - On TH_CR1 send the below command - Below is the example when using chip tool as controller (considering 36177160937 as the manual code generated by 1st controller) - ./chip-tool pairing code 1 36177160937 + + ./chip-tool pairing code 0xCAFE 36177160937 Verify the OperationalCert error 9 in DUT_CE(all-clusters-app) Log @@ -353,4 +527,23 @@ tests: [1651786200275] [36301:315544] CHIP: [CTL] Device returned status 9 on receiving the NOC [1651786200275] [36301:315544] CHIP: [CTL] Add NOC failed with error ../../src/controller/CHIPDeviceController.cpp:1187: CHIP Error 0x0000007E: Trying to add a NOC for a fabric that already exists [1651786200275] [36301:315544] CHIP: [CTL] Error on commissioning step 'SendNOC': '../../src/controller/CHIPDeviceController.cpp:1187: CHIP Error 0x0000007E: Trying to add a NOC for a fabric that already exists' - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: "Remove TH2 FabricIndex" + PICS: OPCREDS.S.C0a.Rsp && CADMIN.S + identity: "beta" + cluster: "Operational Credentials" + command: "RemoveFabric" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "FabricIndex" + value: TH2FabricIndex diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml index 59b45e1ff87618..7c4eb7420173b3 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml @@ -356,16 +356,8 @@ tests: value: payload response: error: FAILURE - clusterError: 9 - - label: "Step 13b: TH_CR2 revokes the commissioning window" - identity: "beta" - cluster: "Administrator Commissioning" - command: "RevokeCommissioning" - PICS: CADMIN.S.C02.Rsp && CADMIN.S.C01.Rsp - timedInteractionTimeoutMs: 10000 - - - label: "Step 13c: Remove TH2 FabricIndex" + - label: "Remove TH2 FabricIndex" PICS: OPCREDS.S.C0a.Rsp && CADMIN.S identity: "beta" cluster: "Operational Credentials" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml index c5974efc25bbec..83c3617ab23343 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Project CHIP Authors +# Copyright (c) 2023 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. @@ -11,40 +11,112 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 4.1.5. [TC-CADMIN-1.5] Commissioning window handling timeout and revocation - using ECM [DUT - Commissionee] + 24.1.5. [TC-CADMIN-1.5] Commissioning window handling timeout and revocation + using ECM [DUT_CE - Commissionee] PICS: - CADMIN.S config: nodeId: 0x12344321 - cluster: "Basic Information" + timeout: 300 + nodeIdForDuplicateCommissioning: + type: node_id + defaultValue: 0x11 + nodeId2: + type: node_id + defaultValue: 0xCAFE + nodeId3: + type: node_id + defaultValue: 0xC00FEE endpoint: 0 + waitAfterCommissioning: + type: int16u + defaultValue: 5000 + discriminator: + type: int16u + defaultValue: 3840 + payload: + type: char_string + defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically + PakeVerifier: + type: octet_string + defaultValue: "hex:b96170aae803346884724fe9a3b287c30330c2a660375d17bb205a8cf1aecb350457f8ab79ee253ab6a8e46bb09e543ae422736de501e3db37d441fe344920d09548e4c18240630c4ff4913c53513839b7c07fcc0627a1b8573a149fcd1fa466cf" + IncorrectPakeVerifier: + type: octet_string + defaultValue: "hex:06c756dffcd722653452a12dcd945d8c54da2b0f3cbd1b4dc3f1adb223aeb26b047cd24c96866f979b1d83ec50e2b4ae30cdf2fdb32bd8a211b837dc94edcd56f4d14377191076bfc59d99b7dd3053efd6f02c4434f2bdd27a" + PIXIT.CADMIN.CwDuration: + type: int16u + defaultValue: 180 tests: - - label: "Precondition" + - label: "Precondition: Reset Devices to factory defaults" + PICS: PICS_SDK_CI_ONLY + cluster: "SystemCommands" + command: "FactoryReset" + + - label: "Precondition: Reset Devices to factory defaults" verification: | Reset Devices to factory defaults - disabled: true - - - label: "Step 1: TH_CR1 starts a commissioning process with DUT_CE" + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Factory Reset the DUT and enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: "Step 1a: TH_CR1 starts a commissioning process with DUT_CE" + cluster: "CommissionerCommands" + command: "PairWithCode" PICS: CADMIN.S - verification: | - "1. Provision the DUT_CE (all-cluster-app) device using TH_CR1 (chip-tool ) on the raspi" - disabled: true + arguments: + values: + - name: "nodeId" + value: nodeId + - name: "payload" + value: payload + + - label: "Step 1b: TH_CR1 commissioned with DUT_CE" + cluster: "DelayCommands" + command: "WaitForCommissionee" + PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId + - label: + "Step 2: TH_CR1 opens a new commissioning window on DUT_CE using ECM" + cluster: "Administrator Commissioning" + command: "OpenCommissioningWindow" + PICS: CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: PIXIT.CADMIN.CwDuration + - name: "PAKEPasscodeVerifier" + value: PakeVerifier + - name: "Discriminator" + value: discriminator + - name: "Iterations" + value: 1000 + - name: "Salt" + value: "SPAKE2P Key Salt" + + #Issue https://github.com/project-chip/connectedhomeip/issues/26127 - label: "Step 2: TH_CR1 opens a commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.S.C00.Rsp verification: | On TH_CR1 send the below command - ./chip-tool pairing open-commissioning-window 1 1 200 1000 3841 + ./chip-tool pairing open-commissioning-window 1 1 PIXIT.CADMIN.CwDuration 1000 3841 Verify the Open commisioning window on the DUT_CE(all-cluster-app) Log: @@ -59,31 +131,56 @@ tests: [1635864513.699566][3850:3855] CHIP:CTL: SetupQRCode: [MT:00000CQM00YZN476420] [1635864513.699636][3850:3855] CHIP:EM: Sending Standalone Ack for MessageCounter:2599714227 on exchange 60688i [1635864513.699685][3850:3855] CHIP:IN: Prepared plaintext message 0xffff8a7cd960 to 0x0000000000000000 of type - disabled: true - - - label: "Step 3: DNS-SD records shows DUT_CE advertising" - verification: | - On TH_CR1 send the below command - - avahi-browse -rt _matterc._udp - + eth0 IPv6 B755245DE9E5E186 _matterc._udp local - = eth0 IPv6 B755245DE9E5E186 _matterc._udp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2753] - port = [5540] - txt = ["PI=" "PH=36" "CM=2" "D=3840" "T=1" "SAI=300" "SII=5000" "VP=65521+32769"] - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: - "Step 4: TH_CR2 starts a commissioning process with DUT_CE after - PIXIT.CADMIN.CwDuration (that was given in step 2) + 10 seconds" + "Step 3: DNS-SD records shows DUT_CE advertising. Verify that the + DNS-SD advertisement shows CM=2" PICS: CADMIN.S.C00.Rsp + cluster: "DiscoveryCommands" + command: "FindCommissionable" + response: + values: + - name: "commissioningMode" + value: 2 + + - label: "Step 4a: Wait for PIXIT.CADMIN.CwDuration + 10 seconds" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: ( PIXIT.CADMIN.CwDuration + 10 ) * 1000 + + - label: "Step 4b: TH_CR2 starts a commissioning process with DUT_CE" + identity: "beta" + cluster: "CommissionerCommands" + PICS: CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload + response: + error: FAILURE + + #Issue https://github.com/project-chip/connectedhomeip/issues/26127 + - label: "Step 4b: TH_CR2 starts a commissioning process with DUT_CE" verification: | On TH_CR2 send the below command - Below is the example when using chip tool as controller (considering 36177160937 as the manual code generated by 1st controller) - ./chip-tool pairing code 2 36177160937 --commissioner-name beta + ./chip-tool pairing code 0xCAFE 36177160937 --commissioner-name beta Verify the below message in the TH_CR2(chip-tool) Log: @@ -92,16 +189,43 @@ tests: [1663841939.843673][13897:13897] CHIP:DL: BLE shutdown [1663841939.843727][13897:13897] CHIP:DL: System Layer shutdown [1663841939.844009][13897:13897] CHIP:TOO: Run command failure: ../../examples/chip-tool/commands/pairing/PairingCommand.cpp:151: CHIP Error 0x00000003: Incorrect state - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + - label: + "Ste 5: TH_CR1 opens a new commissioning window on DUT_CE using ECM" + cluster: "Administrator Commissioning" + command: "OpenCommissioningWindow" + PICS: CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: PIXIT.CADMIN.CwDuration + - name: "PAKEPasscodeVerifier" + value: PakeVerifier + - name: "Discriminator" + value: discriminator + - name: "Iterations" + value: 1000 + - name: "Salt" + value: "SPAKE2P Key Salt" + + #Issue https://github.com/project-chip/connectedhomeip/issues/26127 - label: "Step 5: TH_CR1 opens a new commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.S.C00.Rsp verification: | On TH_CR1 send the below command - ./chip-tool pairing open-commissioning-window 1 1 200 1000 3841 + ./chip-tool pairing open-commissioning-window 1 1 PIXIT.CADMIN.CwDuration 2000 3840 Verify the Open commisioning window on the DUT_CE(all-cluster-app) Log: @@ -115,122 +239,126 @@ tests: [1635864513.699489][3850:3855] CHIP:CTL: Manual pairing code: [36177160937] [1635864513.699566][3850:3855] CHIP:CTL: SetupQRCode: [MT:00000CQM00YZN476420] [1635864513.699636][3850:3855] CHIP:EM: Sending Standalone Ack for MessageCounter:2599714227 on exchange 60688i - [1635864513.699685][3850:3855] CHIP:IN: Prepared plaintext message 0xffff8a7cd960 to 0x0000000000000000 of type - disabled: true - - - label: - "Step 6: TH_CR1 revokes the commissioning window on DUT_CE using - RevokeCommissioning command" + [1635864513.699685][3850:3855] CHIP:IN: Prepared plaintext message 0xffff8a7cd960 to 0x0000000000000000 of type 0x10 + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: "Waiting after opening commissioning window" + PICS: PICS_SDK_CI_ONLY && CADMIN.S.C00.Rsp + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: waitAfterCommissioning + + - label: "Step 6: TH_CR1 revokes the commissioning window on DUT_CE" + cluster: "Administrator Commissioning" + command: "RevokeCommissioning" PICS: CADMIN.S.C02.Rsp - verification: | - On TH_CR1 send the below command - - ./chip-tool administratorcommissioning revoke-commissioning 1 0 --timedInteractionTimeoutMs 1000 - - Verify the Commissioning window is closed in DUT_CE(all-clusters-app) Log - - [1660901039.590891][3045:3045] CHIP:DMG: AccessControl: allowed - [1660901039.590962][3045:3045] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0002 - [1660901039.591036][3045:3045] CHIP:ZCL: Received command to close commissioning window - [1660901039.591094][3045:3045] CHIP:SVR: Closing pairing window - [1660901039.591169][3045:3045] CHIP:IN: SecureSession[0xaaaab010d400]: Released - Type:1 LSID:14411 - - Verify the success response On TH_CR1(chip-tool) Log - - [1648115245106] [6681:3894448] CHIP: [DMG] StatusIB = - [1648115245106] [6681:3894448] CHIP: [DMG] { - [1648115245106] [6681:3894448] CHIP: [DMG] status = 0x0, - [1648115245106] [6681:3894448] CHIP: [DMG] }, - disabled: true + timedInteractionTimeoutMs: 10000 - label: "Step 7: TH_CR2 starts a commissioning process with DUT_CE" - PICS: CADMIN.S + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + PICS: CADMIN.S && PICS_SDK_CI_ONLY + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload + response: + error: FAILURE + + #Issue https://github.com/project-chip/connectedhomeip/issues/26127 + - label: "Step 7: TH_CR2 starts a commissioning process with DUT_CE" verification: | On TH_CR2 send the below command - Below is the example when using chip tool as controller (considering 36177160937 as the manual code generated by 1st controller) - ./chip-tool pairing code 2 36177160937 --commissioner-name beta - - verify you got the following message On TH_CR2(chip-tool) Log + ./chip-tool pairing code 0xCAFE 36177160937 --commissioner-name beta - [1663841939.843550][13897:13897] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) - [1663841939.843617][13897:13897] CHIP:DL: Inet Layer shutdown - [1663841939.843673][13897:13897] CHIP:DL: BLE shutdown - [1663841939.843727][13897:13897] CHIP:DL: System Layer shutdown - [1663841939.844009][13897:13897] CHIP:TOO: Run command failure: ../../examples/chip-tool/commands/pairing/PairingCommand.cpp:151: CHIP Error 0x00000003: Incorrect state - disabled: true + Verify the below message in the TH_CR2(chip-tool) Log: - - label: - "Step 8: TH_CR1 revokes the commissioning window on DUT_CE using - RevokeCommissioning command" + Device commissioning completed with successoning step 'Cleanup' + [1657186359.584743][3509:3514] CHIP:TOO: Device commissioning completed with success + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: "Step 8: TH_CR1 revokes the commissioning window on DUT_CE" + cluster: "Administrator Commissioning" + command: "RevokeCommissioning" PICS: CADMIN.S.C02.Rsp - verification: | - On TH_CR1 send the below command - - ./chip-tool administratorcommissioning revoke-commissioning 1 0 --timedInteractionTimeoutMs 1000 - - verify you got the following message On TH_CR1(chip-tool) Log - - - [1650524034.112257][15422:15427] CHIP:DMG: CommandId = 0x2, - [1650524034.112345][15422:15427] CHIP:DMG: }, - [1650524034.112456][15422:15427] CHIP:DMG: - [1650524034.112543][15422:15427] CHIP:DMG: StatusIB = - [1650524034.112632][15422:15427] CHIP:DMG: { - [1650524034.112727][15422:15427] CHIP:DMG: status = 0x01 (FAILURE), - [1650524034.112825][15422:15427] CHIP:DMG: cluster-status = 0x4, - [1650524034.112914][15422:15427] CHIP:DMG: }, - [1650524034.113005][15422:15427] CHIP:DMG: - [1650524034.113084][15422:15427] CHIP:DMG: }, - disabled: true + timedInteractionTimeoutMs: 10000 + response: + error: FAILURE - label: - "Step 9: TH_CR1 writes and reads the Basic Information Clusters - NodeLabel mandatory attribute of DUT_CE" + "Step 9a: TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE" + cluster: "Basic Information" + command: "writeAttribute" + attribute: "NodeLabel" PICS: BINFO.S.A0005 - verification: | - On TH_CR1 send the below command + arguments: + value: "chiptest" - ./chip-tool basicinformation write node-label te5new 1 0 - - Verify the Success response on the TH_CR1(chip-tool) Log: - - - [1649245940.789388][10110:10115] CHIP:DMG: - [1649245940.789454][10110:10115] CHIP:DMG: StatusIB = - [1649245940.789519][10110:10115] CHIP:DMG: { - [1649245940.789588][10110:10115] CHIP:DMG: status = 0x00 (SUCCESS), - [1649245940.789654][10110:10115] CHIP:DMG: }, - [1649245940.789719][10110:10115] CHIP:DMG: - [1649245940.789778][10110:10115] CHIP:DMG: }, - [1649245940.789841][10110:10115] CHIP:DMG: - [1649245940.789885][10110:10115] CHIP:DMG: ], - [1649245940.789941][10110:10115] CHIP:DMG: - [1649245940.789984][10110:10115] CHIP:DMG: InteractionModelRevision = 1 - [1649245940.790033][10110:10115] CHIP:DMG: } - [1649245940.790167][10110:10115] CHIP:DMG: WriteClient moving to [AwaitingDe] - - ./chip-tool basicinformation read node-label 1 0 - - Verify the Nodelabel response on the TH_CR1(chip-tool) Log: - - CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 - [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te5new - [1649245950.007024][10116:10121] CHIP:EM: Sending Standalone Ack for MessageCounter:12495101 on exchange 24816i - disabled: true + - label: "Step 9b: TH_CR1 read the mandatory attribute NodeLabel of DUT_CE" + cluster: "Basic Information" + command: "readAttribute" + attribute: "NodeLabel" + PICS: BINFO.S.A0005 + response: + value: "chiptest" - label: - "Step 10: TH_CR1 opens a new commissioning window on DUT_CE using a - commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM but - with wrong PakeVerifier value" - PICS: CADMIN.S.C00.Rsp + "Step 10: TH_CR1 opens a new commissioning window on DUT_CE using + wrong PakeVerifier value using ECM" + cluster: "Administrator Commissioning" + command: "OpenCommissioningWindow" + PICS: CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: PIXIT.CADMIN.CwDuration + - name: "PAKEPasscodeVerifier" + value: IncorrectPakeVerifier + - name: "Discriminator" + value: discriminator + - name: "Iterations" + value: 1000 + - name: "Salt" + value: "SPAKE2P Key Salt" + response: + error: FAILURE + clusterError: 3 + + #Issue https://github.com/project-chip/connectedhomeip/issues/26127 + - label: + "Step 10: TH_CR1 opens a commissioning window on DUT_CE using a + commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" verification: | On TH_CR1 send the below command Below is example command by considering the "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd " as a wrong PakeVerifier value - ./chip-tool administratorcommissioning open-commissioning-window 200 \x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd 3841 1000 16 1 0 --timedInteractionTimeoutMs 1000 + ./chip-tool administratorcommissioning open-commissioning-window PIXIT.CADMIN.CwDuration \x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd 3841 1000 16 0x12344321 0 --timedInteractionTimeoutMs 1000 Verify the status on the TH_CR1(chip-tool) Log: @@ -249,16 +377,52 @@ tests: [1656434435.692112][3836:3842] CHIP:DMG: }, [1656434435.692191][3836:3842] CHIP:DMG: [1656434435.692257][3836:3842] CHIP:DMG: }, - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: - "Step 11: TH_CR1 opens a new commissioning window on DUT_CE using a + "Step 11: TH_CR1 opens a new commissioning window on DUT_CE using ECM" + cluster: "Administrator Commissioning" + command: "OpenCommissioningWindow" + PICS: CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: PIXIT.CADMIN.CwDuration + - name: "PAKEPasscodeVerifier" + value: PakeVerifier + - name: "Discriminator" + value: discriminator + - name: "Iterations" + value: 1000 + - name: "Salt" + value: "SPAKE2P Key Salt" + + - label: "Waiting after opening commissioning window" + PICS: CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: waitAfterCommissioning + + #Issue https://github.com/project-chip/connectedhomeip/issues/26127 + - label: + "Step 11: TH_CR1 opens a commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.S.C00.Rsp verification: | On TH_CR1 send the below command - ./chip-tool pairing open-commissioning-window 1 1 200 1000 3841 + ./chip-tool pairing open-commissioning-window 1 1 PIXIT.CADMIN.CwDuration 1000 3841 Verify the Open commisioning window on the DUT_CE(all-cluster-app) Log: @@ -273,12 +437,43 @@ tests: [1635864513.699566][3850:3855] CHIP:CTL: SetupQRCode: [MT:00000CQM00YZN476420] [1635864513.699636][3850:3855] CHIP:EM: Sending Standalone Ack for MessageCounter:2599714227 on exchange 60688i [1635864513.699685][3850:3855] CHIP:IN: Prepared plaintext message 0xffff8a7cd960 to 0x0000000000000000 of type - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - label: - "Step 12: TH_CR1 opens another commissioning window on DUT_CE using a + "Step 12: TH_CR1 opens another commissioning window on DUT_CE using + ECM" + cluster: "Administrator Commissioning" + command: "OpenCommissioningWindow" + PICS: CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: PIXIT.CADMIN.CwDuration + - name: "PAKEPasscodeVerifier" + value: PakeVerifier + - name: "Discriminator" + value: discriminator + - name: "Iterations" + value: 1000 + - name: "Salt" + value: "SPAKE2P Key Salt" + response: + error: FAILURE + clusterError: 2 + + #Issue https://github.com/project-chip/connectedhomeip/issues/26127 + - label: + "Step 13: TH_CR1 opens a commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.S.C00.Rsp verification: | On TH_CR1 send the below command @@ -299,56 +494,121 @@ tests: [1656405166.757846][5933:5938] CHIP:DMG: }, [1656405166.757929][5933:5938] CHIP:DMG: [1656405166.758014][5933:5938] CHIP:DMG: }, - disabled: true - + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: "Step 13a: TH_CR2 starts a commissioning process with DUT_CE" + PICS: CADMIN.S && PICS_SDK_CI_ONLY + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload + + - label: "Step 13b: DUT_CE is commissioned by TH_CR2" + identity: "beta" + cluster: "DelayCommands" + command: "WaitForCommissionee" + PICS: CADMIN.S && PICS_SDK_CI_ONLY + arguments: + values: + - name: "nodeId" + value: nodeId2 + + #Issue https://github.com/project-chip/connectedhomeip/issues/26127 - label: "Step 13: TH_CR2 starts a commissioning process with DUT_CE" - PICS: CADMIN.S verification: | On TH_CR2 send the below command - Below is the example when using chip tool as controller (considering 36177160937 as the manual code generated by 1st controller) - ./chip-tool pairing code 2 36177160937 --commissioner-name beta + + ./chip-tool pairing code 0xCAFE 36177160937 --commissioner-name beta Verify the below message in the TH_CR2(chip-tool) Log: Device commissioning completed with success - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: + "TH2 reads CurrentFabricIndex attribute and save it for future use." + identity: "beta" + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "CurrentFabricIndex" + response: + saveAs: TH2FabricIndex - label: "Step 14: TH_CR1 tries to revoke the commissioning window on DUT_CE using RevokeCommissioning command" + cluster: "Administrator Commissioning" + command: "RevokeCommissioning" PICS: CADMIN.S.C02.Rsp - verification: | - On TH_CR1 send the below command - - ./chip-tool administratorcommissioning revoke-commissioning 1 0 --timedInteractionTimeoutMs 1000 - - Verify that the DUT_CE is rejecting the opening of second commissioning session with the response status 0x01 failure - - [1656405166.756822][5933:5938] CHIP:DMG: { - [1656405166.756927][5933:5938] CHIP:DMG: EndpointId = 0x0, - [1656405166.757033][5933:5938] CHIP:DMG: ClusterId = 0x3c, - [1656405166.757120][5933:5938] CHIP:DMG: CommandId = 0x0, - [1656405166.757222][5933:5938] CHIP:DMG: }, - [1656405166.757333][5933:5938] CHIP:DMG: - [1656405166.757452][5933:5938] CHIP:DMG: StatusIB = - [1656405166.757557][5933:5938] CHIP:DMG: { - [1656405166.757641][5933:5938] CHIP:DMG: status = 0x01 (FAILURE), - [1656405166.757745][5933:5938] CHIP:DMG: cluster-status = 0x4, - [1656405166.757846][5933:5938] CHIP:DMG: }, - [1656405166.757929][5933:5938] CHIP:DMG: - [1656405166.758014][5933:5938] CHIP:DMG: }, - disabled: true + timedInteractionTimeoutMs: 10000 + response: + error: FAILURE + clusterError: 4 - label: "Step 15: TH_CR3 starts a commissioning process with DUT_CE" - PICS: CADMIN.S + identity: "gamma" + cluster: "CommissionerCommands" + command: "PairWithCode" + PICS: CADMIN.S && PICS_SDK_CI_ONLY + arguments: + values: + - name: "nodeId" + value: nodeId3 + - name: "payload" + value: payload + response: + error: FAILURE + + #Issue https://github.com/project-chip/connectedhomeip/issues/26127 + - label: "Step 15: TH_CR2 starts a commissioning process with DUT_CE" verification: | - On TH_CR3 send the below command - + On TH_CR2 send the below command Below is the example when using chip tool as controller (considering 36177160937 as the manual code generated by 1st controller) - ./chip-tool pairing code 3 36177160937 --commissioner-name gamma + + ./chip-tool pairing code 0xCAFE 36177160937 --commissioner-name beta verify you got the following message in the TH_CR3(chip-tool) log CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 CHIP:TOO: Secure Pairing Failed CHIP:TOO: Pairing Failure: ../../third_party/connectedhomeip/src/protocols/secure_channel/PASESession.cpp:324: CHIP Error 0x00000032: Timeout - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: "Remove TH2 FabricIndex" + PICS: OPCREDS.S.C0a.Rsp && CADMIN.S + identity: "beta" + cluster: "Operational Credentials" + command: "RemoveFabric" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "FabricIndex" + value: TH2FabricIndex diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml index 5b1e3340a78821..a6a0e380cc068c 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml @@ -62,7 +62,7 @@ tests: - name: "expectedValue" value: "y" - - label: "Step 1: TH_CR1 starts a commissioning process with DUT_CE" + - label: "Step 1a: TH_CR1 starts a commissioning process with DUT_CE" cluster: "CommissionerCommands" command: "PairWithCode" PICS: CADMIN.S @@ -73,7 +73,7 @@ tests: - name: "payload" value: payload - - label: "Step 1a: TH_CR1 commissioned with DUT_CE" + - label: "Step 1b: TH_CR1 commissioned with DUT_CE" cluster: "DelayCommands" command: "WaitForCommissionee" PICS: CADMIN.S diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml index d5394a1a28617d..a3d2de3641699e 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Project CHIP Authors +# Copyright (c) 2023 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. @@ -11,10 +11,9 @@ # 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. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 4.1.9. [TC-CADMIN-1.9] Device exit commissioning mode after 20 failed + 24.1.9. [TC-CADMIN-1.9] Device exit commissioning mode after 20 failed commission attempts [ECM] [DUT - Commissionee] PICS: @@ -22,29 +21,112 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic Information" + timeout: 700 + nodeIdForDuplicateCommissioning: + type: node_id + defaultValue: 0x11 + nodeId2: + type: node_id + defaultValue: 0xCAFE + nodeId3: + type: node_id + defaultValue: 0xC00FEE endpoint: 0 + waitAfterCommissioning: + type: int16u + defaultValue: 5000 + discriminator: + type: int16u + defaultValue: 3840 + correctPayload: + type: char_string + defaultValue: "MT:-24J0AFN00KA0648G00" + incorrectSetupCodePayload: + type: char_string + defaultValue: "MT:-24J0AFN00I.0648G00" + PakeVerifier: + type: octet_string + defaultValue: "hex:b96170aae803346884724fe9a3b287c30330c2a660375d17bb205a8cf1aecb350457f8ab79ee253ab6a8e46bb09e543ae422736de501e3db37d441fe344920d09548e4c18240630c4ff4913c53513839b7c07fcc0627a1b8573a149fcd1fa466cf" + PIXIT.CADMIN.CwDuration: + type: int16u + defaultValue: 900 tests: - - label: "Precondition" + - label: "Precondition: Reset Devices to factory defaults" + PICS: PICS_SDK_CI_ONLY + cluster: "SystemCommands" + command: "FactoryReset" + + - label: "Precondition: Reset Devices to factory defaults" verification: | Reset Devices to factory defaults - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Factory Reset the DUT and enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "Step 1: TH_CR1 starts a commissioning process with DUT_CE" + - label: "Step 1a: TH_CR1 starts a commissioning process with DUT_CE" + cluster: "CommissionerCommands" + command: "PairWithCode" PICS: CADMIN.S - verification: | - "1. Provision the DUT_CE (all-cluster-app) device using TH_CR1 (chip-tool ) on the raspi" - disabled: true + arguments: + values: + - name: "nodeId" + value: nodeId + - name: "payload" + value: correctPayload + + - label: "Step 1b: TH_CR1 commissioned with DUT_CE" + cluster: "DelayCommands" + command: "WaitForCommissionee" + PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId - label: "Step 2: TH_CR1 opens a commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - PICS: CADMIN.S.C00.Rsp + cluster: "Administrator Commissioning" + command: "OpenCommissioningWindow" + timedInteractionTimeoutMs: 10000 + PICS: CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY + arguments: + values: + - name: "CommissioningTimeout" + value: PIXIT.CADMIN.CwDuration + - name: "PAKEPasscodeVerifier" + value: PakeVerifier + - name: "Discriminator" + value: discriminator + - name: "Iterations" + value: 1000 + - name: "Salt" + value: "SPAKE2P Key Salt" + + - label: "Waiting after opening commissioning window" + PICS: CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: waitAfterCommissioning + + #Issue https://github.com/project-chip/connectedhomeip/issues/26127 + - label: + "Step 2: TH_CR1 opens a commissioning window on DUT_CE using a + commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" verification: | On TH_CR1 send the below command - ./chip-tool pairing open-commissioning-window 1 1 900 1000 3841 + ./chip-tool pairing open-commissioning-window 1 1 PIXIT.CADMIN.CwDuration 1000 3841 Verify the Open commisioning window on the DUT_CE(all-cluster-app) Log: @@ -59,63 +141,411 @@ tests: [1635864513.699566][3850:3855] CHIP:CTL: SetupQRCode: [MT:00000CQM00YZN476420] [1635864513.699636][3850:3855] CHIP:EM: Sending Standalone Ack for MessageCounter:2599714227 on exchange 60688i [1635864513.699685][3850:3855] CHIP:IN: Prepared plaintext message 0xffff8a7cd960 to 0x0000000000000000 of type - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: "Step 3: DNS-SD records shows DUT_CE advertising" - verification: | - On TH_CR1 send the below command - avahi-browse -rt _matterc._udp + - label: + "Step 3: DNS-SD records shows DUT_CE advertising. Verify that the + DNS-SD advertisement shows CM=2" + PICS: CADMIN.S.C00.Rsp + cluster: "DiscoveryCommands" + command: "FindCommissionable" + response: + values: + - name: "commissioningMode" + value: 2 - + eth0 IPv6 B755245DE9E5E186 _matterc._udp local - = eth0 IPv6 B755245DE9E5E186 _matterc._udp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2753] - port = [5540] - txt = [""PI="" ""PH=36"" ""CM=2"" ""D=3840"" ""T=1"" ""SAI=300"" ""SII=5000"" ""VP=65521+32769""]" - disabled: true + - label: + "Step 4.1: TH_CR2 starts a commissioning process with DUT_CE using + Invalid setup code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: incorrectSetupCodePayload + - name: discoverOnce + value: true + response: + error: FAILURE - label: - "Step 4: Before the expiration of PIXIT.CADMIN.CwDuration set in step - 2, Set up a TH_CR2 to start attempting to do PASE to DUT_CE and - failing 20 times. This can be done using a valid onboarding payload - with an incorrect setupcode" + "Step 4.2: TH_CR2 starts a commissioning process with DUT_CE using + Invalid setup code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" PICS: CADMIN.S - verification: | - On TH_CR2 send the below command + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: incorrectSetupCodePayload + - name: discoverOnce + value: true + response: + error: FAILURE + + - label: + "Step 4.3: TH_CR2 starts a commissioning process with DUT_CE using + Invalid setup code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: incorrectSetupCodePayload + - name: discoverOnce + value: true + response: + error: FAILURE + + - label: + "Step 4.4: TH_CR2 starts a commissioning process with DUT_CE using + Invalid setup code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: incorrectSetupCodePayload + - name: discoverOnce + value: true + response: + error: FAILURE + + - label: + "Step 4.5: TH_CR2 starts a commissioning process with DUT_CE using + Invalid setup code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: incorrectSetupCodePayload + - name: discoverOnce + value: true + response: + error: FAILURE + + - label: + "Step 4.6: TH_CR2 starts a commissioning process with DUT_CE using + Invalid setup code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: incorrectSetupCodePayload + - name: discoverOnce + value: true + response: + error: FAILURE + + - label: + "Step 4.7: TH_CR2 starts a commissioning process with DUT_CE using + Invalid setup code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: incorrectSetupCodePayload + - name: discoverOnce + value: true + response: + error: FAILURE + + - label: + "Step 4.8: TH_CR2 starts a commissioning process with DUT_CE using + Invalid setup code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: incorrectSetupCodePayload + - name: discoverOnce + value: true + response: + error: FAILURE + + - label: + "Step 4.9: TH_CR2 starts a commissioning process with DUT_CE using + Invalid setup code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: incorrectSetupCodePayload + - name: discoverOnce + value: true + response: + error: FAILURE + + - label: + "Step 4.10: TH_CR2 starts a commissioning process with DUT_CE using + Invalid setup code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: incorrectSetupCodePayload + - name: discoverOnce + value: true + response: + error: FAILURE + + - label: + "Step 4.11: TH_CR2 starts a commissioning process with DUT_CE using + Invalid setup code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: incorrectSetupCodePayload + - name: discoverOnce + value: true + response: + error: FAILURE + + - label: + "Step 4.12: TH_CR2 starts a commissioning process with DUT_CE using + Invalid setup code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: incorrectSetupCodePayload + - name: discoverOnce + value: true + response: + error: FAILURE + + - label: + "Step 4.13: TH_CR2 starts a commissioning process with DUT_CE using + Invalid setup code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: incorrectSetupCodePayload + - name: discoverOnce + value: true + response: + error: FAILURE + + - label: + "Step 4.14: TH_CR2 starts a commissioning process with DUT_CE using + Invalid setup code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: incorrectSetupCodePayload + - name: discoverOnce + value: true + response: + error: FAILURE + + - label: + "Step 4.15: TH_CR2 starts a commissioning process with DUT_CE using + Invalid setup code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: incorrectSetupCodePayload + - name: discoverOnce + value: true + response: + error: FAILURE - The manualcode with wrong setupcode is generated by using below command - ./chip-tool payload generate-manualcode --discriminator 0xF00 --setup-pin-code 20202022 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 - [1658404815.887421][2367:2367] CHIP:TOO: Manual Code: 34970212338 + - label: + "Step 4.16: TH_CR2 starts a commissioning process with DUT_CE using + Invalid setup code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: incorrectSetupCodePayload + - name: discoverOnce + value: true + response: + error: FAILURE - Attempt to do pairing with wrong manual code for 20 times - ./chip-tool pairing code 2 34970212338 --timeout 40 --commissioner-name beta + - label: + "Step 4.17: TH_CR2 starts a commissioning process with DUT_CE using + Invalid setup code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: incorrectSetupCodePayload + - name: discoverOnce + value: true + response: + error: FAILURE - Verify the failure response in any one of following error for 20 attempts of wrong passcode in TH_CR2(chip-tool) + - label: + "Step 4.18: TH_CR2 starts a commissioning process with DUT_CE using + Invalid setup code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: incorrectSetupCodePayload + - name: discoverOnce + value: true + response: + error: FAILURE - [1660903056.889713][31261:31266] CHIP:SC: Failed to verify peer's MAC. This can happen when setup code is incorrect. - [1660903056.889744][31261:31266] CHIP:SC: Sending status report. Protocol code 2, exchange 28732 - [1660903056.889781][31261:31266] CHIP:EM: Piggybacking Ack for MessageCounter:72597021 on exchange: 28732i - [1660903056.889817][31261:31266] CHIP:IN: Prepared unauthenticated message 0x7fbf5403c308 to 0x0000000000000000 (0) of type 0x40 and protocolId (0, 0) on exchange 28732i with MessageCounter:110107069. - [1660903056.889855][31261:31266] CHIP:IN: Sending unauthenticated msg 0x7fbf5403c308 with MessageCounter:110107069 to 0x0000000000000000 at monotonic time: 00000000012CB695 msec - [1660903056.890044][31261:31266] CHIP:IN: SecureSession[0x55686a679ff0]: Released - Type:1 LSID:10585 - [1660903056.890094][31261:31266] CHIP:SC: Failed during PASE session setup: ../../third_party/connectedhomeip/src/crypto/CHIPCryptoPALOpenSSL.cpp:1437: CHIP Error 0x000000AC: Internal error - (or) - [1678862522.832525][700613:700613] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) - [1678862522.832537][700613:700613] CHIP:DL: Inet Layer shutdown - [1678862522.832545][700613:700613] CHIP:DL: BLE shutdown - [1678862522.832554][700613:700613] CHIP:DL: System Layer shutdown - [1678862522.832663][700613:700613] CHIP:TOO: Run command failure: ../../commands/pairing/PairingCommand.cpp:215: CHIP Error 0x00000003: Incorrect state - disabled: true + - label: + "Step 4.19: TH_CR2 starts a commissioning process with DUT_CE using + Invalid setup code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: incorrectSetupCodePayload + - name: discoverOnce + value: true + response: + error: FAILURE - label: - "Step 5: Before the expiration of PIXIT.CADMIN.CwDuration set in step - 2, TH_CR2 attempts to do PASE to DUT_CE using the correct onboarding - payload" + "Step 4.20: TH_CR2 starts a commissioning process with DUT_CE using + Invalid setup code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" PICS: CADMIN.S + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: incorrectSetupCodePayload + - name: discoverOnce + value: true + response: + error: FAILURE + + # This step must match the verification step above where we checked `payload` + - label: + "Step 5: TH_CR2 starts a commissioning process with DUT_CE using valid + setup code" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + PICS: CADMIN.S && PICS_SDK_CI_ONLY + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: correctPayload + response: + error: FAILURE + + #Issue https://github.com/project-chip/connectedhomeip/issues/26127 + - label: "Step 5: TH_CR2 starts a commissioning process with DUT_CE" verification: | On TH_CR2 send the below command (with correct passcode) - ./chip-tool pairing code 2 36177160937 --commissioner-name beta + ./chip-tool pairing code 0xCAFE 36177160937 --commissioner-name beta + Verify the following error on 21st attempt using correct passcode in TH_CR2(chip-tool) [1665484807.015876][5399:5399] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) @@ -124,23 +554,50 @@ tests: [1665484807.016163][5399:5399] CHIP:DL: BLE shutdown [1665484807.016215][5399:5399] CHIP:DL: System Layer shutdown [1665484807.016460][5399:5399] CHIP:TOO: Run command failure: ../../commands/pairing/PairingCommand.cpp:164: CHIP Error 0x00000003: Incorrect state - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" - - label: - "Step 6: TH_CR3 starts a commissioning process with DUT_CE using the - correct PAKEVerifier" - PICS: CADMIN.S + - label: "Step 6: TH_CR3 starts a commissioning process with DUT_CE" + identity: "gamma" + cluster: "CommissionerCommands" + command: "PairWithCode" + PICS: CADMIN.S && PICS_SDK_CI_ONLY + arguments: + values: + - name: "nodeId" + value: nodeId3 + - name: "payload" + value: correctPayload + response: + error: FAILURE + + #Issue https://github.com/project-chip/connectedhomeip/issues/26127 + - label: "Step 6: TH_CR2 starts a commissioning process with DUT_CE" verification: | On TH_CR3 send the below command (with correct passcode) - ./chip-tool pairing code 3 36177160938 (With correct passcode) --commissioner-name gamma + ./chip-tool pairing code 0xC00FEE 36177160938 (With correct passcode) --commissioner-name gamma Verify the following error on correct passcode in TH_CR3(chip-tool) - [1665484807.015876][5399:5399] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) [1665484807.016042][5399:5399] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) [1665484807.016108][5399:5399] CHIP:DL: Inet Layer shutdown [1665484807.016163][5399:5399] CHIP:DL: BLE shutdown [1665484807.016215][5399:5399] CHIP:DL: System Layer shutdown [1665484807.016460][5399:5399] CHIP:TOO: Run command failure: ../../commands/pairing/PairingCommand.cpp:164: CHIP Error 0x00000003: Incorrect state - disabled: true + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y"