| # 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: 217.1.6. [TC-ICDM-3.4] ICDCounter persistence with DUT as Server |
| |
| PICS: |
| - ICDM.S |
| |
| config: |
| nodeId: 0x12344321 |
| cluster: "ICD Management" |
| endpoint: 0 |
| |
| CheckInNodeID1: |
| type: node_id |
| defaultValue: 1 |
| MonitorSubID1: |
| type: subject-id |
| defaultValue: 2 |
| Key1: |
| type: octstr |
| defaultValue: "hex:1234567890abcdef1234567890abcdef" |
| IdleModedurationValue: |
| type: int16u |
| defaultValue: 5 |
| |
| tests: |
| - label: |
| "Precondition: Commission DUT to TH (can be skipped if done in a |
| preceding test)" |
| cluster: "DelayCommands" |
| command: "WaitForCommissionee" |
| arguments: |
| values: |
| - name: "nodeId" |
| value: nodeId |
| |
| - label: |
| "Precondition: TH reads the RegisteredClients attribute from the DUT" |
| PICS: ICDM.S.A0003 |
| command: "readAttribute" |
| attribute: "RegisteredClients" |
| response: |
| saveAs: RegisteredClientsIDs |
| constraints: |
| type: list |
| |
| - label: |
| "Precondition: If list of registered clients is not empty, unregister |
| existing client(s)" |
| verification: | |
| Please send the 'unregister client' command using the check-in nodeID received from the previous read |
| ./chip-tool icdmanagement unregister-client 112233 1 0 |
| |
| [1704888949.629057][71657:71659] CHIP:DMG: |
| [1704888949.629066][71657:71659] CHIP:DMG: InteractionModelRevision = 11 |
| [1704888949.629074][71657:71659] CHIP:DMG: }, |
| [1704888949.629125][71657:71659] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_0046 Command=0x0000_0002 Status=0x0 |
| [1704888949.629153][71657:71659] CHIP:DMG: ICR moving to [AwaitingDe] |
| cluster: "LogCommands" |
| command: "UserPrompt" |
| PICS: PICS_USER_PROMPT && ICDM.S.C02.Rsp |
| arguments: |
| values: |
| - name: "message" |
| value: "Please enter 'y' for success" |
| - name: "expectedValue" |
| value: "y" |
| |
| - label: |
| "Precondition: TH reads from the DUT the RegisteredClients attribute. |
| Verify that the DUT response contains empty list of registered |
| clients." |
| PICS: ICDM.S.A0003 && PICS_USER_PROMPT |
| command: "readAttribute" |
| attribute: "RegisteredClients" |
| response: |
| value: [] |
| constraints: |
| type: list |
| |
| - label: "Step 1: TH reads from the DUT the IdleModeDuration attribute" |
| PICS: ICDM.S.A0000 |
| command: "readAttribute" |
| attribute: "IdleModeDuration" |
| response: |
| saveAs: IdleModeDuration1 |
| constraints: |
| type: int32u |
| minValue: 1 |
| maxValue: 64800 |
| |
| - label: "Step 2: TH reads from the DUT the ICDCounter attribute." |
| PICS: ICDM.S.A0004 |
| command: "readAttribute" |
| attribute: "ICDCounter" |
| response: |
| saveAs: ICDCounter1 |
| constraints: |
| type: int32u |
| minValue: 0 |
| maxValue: 4294967295 |
| |
| - label: |
| "Step 3a & 3b: TH sends RegisterClient command. - CheckInNodeID: |
| registering clients node ID (CheckInNodeID1) - MonitoredSubject: |
| monitored subject ID (MonitorSubID1) - Key: shared secret between the |
| client and the ICD (Key1). Verify DUT responds w/ status |
| SUCCESS(0x00); Verify that the DUT response contains IcdCounter1" |
| PICS: ICDM.S.C00.Rsp && ICDM.S.C01.Tx |
| command: "RegisterClient" |
| arguments: |
| values: |
| - name: "CheckInNodeID" |
| value: CheckInNodeID1 |
| - name: "MonitoredSubject" |
| value: MonitorSubID1 |
| - name: "Key" |
| value: Key1 |
| response: |
| values: |
| - name: "ICDCounter" |
| value: ICDCounter1 |
| constraints: |
| type: int32u |
| |
| - label: "Step 4: Wait for 1 or more Idle Mode duration." |
| cluster: "DelayCommands" |
| command: "WaitForMs" |
| arguments: |
| values: |
| - name: "ms" |
| value: ( IdleModedurationValue * 1000 ) |
| |
| #Issue https://github.com/project-chip/connectedhomeip/issues/31297 |
| - label: "Step 5: TH reads from the DUT the ICDCounter attribute." |
| verification: | |
| ./chip-tool icdmanagement read icdcounter 1 0 |
| |
| [1702421000.635860][1431:1433] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0046 Attribute 0x0000_0004 DataVersion: 2255930497 |
| [1702421000.635970][1431:1433] CHIP:TOO: ICDCounter: 1706188496 |
| cluster: "LogCommands" |
| command: "UserPrompt" |
| PICS: PICS_USER_PROMPT && ICDM.S.A0004 |
| arguments: |
| values: |
| - name: "message" |
| value: "Please enter 'y' for success" |
| - name: "expectedValue" |
| value: "y" |
| |
| - label: "Step 6: Reboot DUT" |
| PICS: PICS_SDK_CI_ONLY |
| cluster: "SystemCommands" |
| endpoint: 0 |
| command: "Reboot" |
| |
| - label: "Step Reboot target device(DUT)" |
| verification: | |
| Did the DUT successfully reboot? |
| cluster: "LogCommands" |
| command: "UserPrompt" |
| PICS: PICS_SKIP_SAMPLE_APP |
| arguments: |
| values: |
| - name: "message" |
| value: "Please reboot the DUT and enter 'y' after DUT starts" |
| - name: "expectedValue" |
| value: "y" |
| |
| - label: "Wait for the commissioned device to be retrieved" |
| cluster: "DelayCommands" |
| command: "WaitForCommissionee" |
| arguments: |
| values: |
| - name: "nodeId" |
| value: nodeId |
| |
| - label: "Step 7: TH reads from the DUT the ICDCounter attribute." |
| PICS: ICDM.S.A0004 && PICS_USER_PROMPT |
| command: "readAttribute" |
| attribute: "ICDCounter" |
| response: |
| constraints: |
| type: int32u |
| minValue: ICDCounter2 |
| maxValue: 4294967295 |