| # Copyright (c) 2021 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. |
| # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default |
| |
| name: 80.2.1. [TC-MOD-2.1] ChangeToMode Verification (DUT as Server) |
| |
| PICS: |
| - MOD.S.C00.Rsp |
| |
| config: |
| nodeId: 0x12344321 |
| cluster: "Basic Information" |
| endpoint: 0 |
| |
| tests: |
| - label: "Preconditions" |
| verification: | |
| This test case is verified after the device is provisioned. Pls provision device first, Pass appropriate nodeID in the below command |
| disabled: true |
| |
| - label: "TH reads the SupportedModes attribute from the DUT" |
| PICS: MOD.S.A0002 |
| verification: | |
| ./chip-tool modeselect read supported-modes 1 1 |
| |
| Verify on TH(chip-tool) logs supported modes provides a list of mode, each mode should be a struct containing a label and All of these values should be no larger than 16 bits and below is the sample log provided for the raspi platform: |
| |
| |
| [1654595268.854568][14400:14405] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 366231602 |
| [1654595268.854678][14400:14405] CHIP:TOO: SupportedModes: 3 entries |
| [1654595268.854743][14400:14405] CHIP:TOO: [1]: { |
| [1654595268.854772][14400:14405] CHIP:TOO: Label: Black |
| [1654595268.854811][14400:14405] CHIP:TOO: Mode: 0 |
| [1654595268.854843][14400:14405] CHIP:TOO: SemanticTags: 1 entries |
| [1654595268.854891][14400:14405] CHIP:TOO: [1]: { |
| [1654595268.854918][14400:14405] CHIP:TOO: MfgCode: 0 |
| [1654595268.854945][14400:14405] CHIP:TOO: Value: 0 |
| [1654595268.854971][14400:14405] CHIP:TOO: } |
| [1654595268.855000][14400:14405] CHIP:TOO: } |
| [1654595268.855038][14400:14405] CHIP:TOO: [2]: { |
| [1654595268.855064][14400:14405] CHIP:TOO: Label: Cappuccino |
| [1654595268.855089][14400:14405] CHIP:TOO: Mode: 4 |
| [1654595268.855117][14400:14405] CHIP:TOO: SemanticTags: 1 entries |
| [1654595268.855149][14400:14405] CHIP:TOO: [1]: { |
| [1654595268.855175][14400:14405] CHIP:TOO: MfgCode: 0 |
| [1654595268.855199][14400:14405] CHIP:TOO: Value: 0 |
| [1654595268.855223][14400:14405] CHIP:TOO: } |
| [1654595268.855249][14400:14405] CHIP:TOO: } |
| [1654595268.855284][14400:14405] CHIP:TOO: [3]: { |
| [1654595268.855310][14400:14405] CHIP:TOO: Label: Espresso |
| [1654595268.855332][14400:14405] CHIP:TOO: Mode: 7 |
| [1654595268.855360][14400:14405] CHIP:TOO: SemanticTags: 1 entries |
| [1654595268.855390][14400:14405] CHIP:TOO: [1]: { |
| [1654595268.855416][14400:14405] CHIP:TOO: MfgCode: 0 |
| [1654595268.855440][14400:14405] CHIP:TOO: Value: 0 |
| [1654595268.855464][14400:14405] CHIP:TOO: } |
| [1654595268.855490][14400:14405] CHIP:TOO: } |
| [1649677252.376226][10804:10809] CHIP:TOO: SemanticTag: 0 |
| [1649677252.376252][10804:10809] CHIP:TOO: } |
| disabled: true |
| |
| - label: "TH reads the CurrentMode attribute from the DUT" |
| PICS: MOD.S.A0003 |
| verification: | |
| ./chip-tool modeselect read current-mode 1 1 |
| |
| Verify on TH(chip-tool), current modes provides a mode Record for usage in steps 3 and below is the sample log provided for the raspi platform: |
| |
| [1649678800.298128][10854:10861] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 |
| |
| [1649678800.298279][10854:10861] CHIP:TOO: CurrentMode: 0 |
| disabled: true |
| |
| - label: |
| "TH sends a ChangeToMode command to the DUT with a integer from the |
| list in step 1,but different from the integer from step 2" |
| PICS: MOD.S.C00.Rsp |
| verification: | |
| ./chip-tool modeselect change-to-mode 4 1 1 |
| |
| Verify on TH(chip-tool) log,shows successful status response and below is the sample log provided for the raspi platform: |
| |
| |
| [1649677293.280207][10810:10815] CHIP:DMG: StatusIB = |
| [1649677293.280283][10810:10815] CHIP:DMG: { |
| [1649677293.280358][10810:10815] CHIP:DMG: status = 0x00 (SUCCESS), |
| [1649677293.280421][10810:10815] CHIP:DMG: }, |
| disabled: true |
| |
| - label: "TH reads the CurrentMode attribute from the DUT" |
| PICS: MOD.S.A0003 |
| verification: | |
| ./chip-tool modeselect read current-mode 1 1 |
| |
| Verify on TH(chip-tool), current modes provides integer provided in step 3a, not the integer from step 2 and below is the sample log provided for the raspi platform: |
| |
| [1649678800.298128][10854:10861] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 |
| |
| [1649678800.298279][10854:10861] CHIP:TOO: CurrentMode: 4 |
| disabled: true |
| |
| - label: |
| "TH sends a Change to Mode command to the DUT with a integer that is |
| not in the list in step 1." |
| PICS: MOD.S.C00.Rsp |
| verification: | |
| ./chip-tool modeselect change-to-mode 2 1 1 |
| |
| Verify on TH(chip-tool)logs , with a INVALID_COMMAND (hex value 0x85/decimal 133) and below is the sample log provided for the raspi platform: |
| |
| CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0050 Command=0x0000_0000 Status=0x85 |
| CHIP:TOO: Error: IM Error 0x00000585: General error: 0x85 (INVALID_COMMAND) |
| disabled: true |