| # 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.3.3. [TC-MOD-3.3] OTA Mode Verification (DUT as Server) |
| |
| PICS: |
| - MOD.S.A0004 |
| |
| config: |
| nodeId: 0x12344321 |
| cluster: "Basic" |
| endpoint: 0 |
| |
| tests: |
| - label: "Note" |
| verification: | |
| 1.To run this test case build the OTA Provider app to be build in the nRF Environment setup . Follow this step to setup the nRF build environment using container. |
| https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/nrfconnect#using-docker-container-for-setup |
| |
| Once the build environmnet is ready , build teh OTA-Provider-App inside the container. Follow the below link to build the OTA-Provider app |
| https://github.com/project-chip/connectedhomeip/tree/master/examples/ota-provider-app/linux |
| |
| 2. Build all-cluster-app in docker or Flash the pre-built folder from the delivered image |
| |
| To build maually and flash follow steps explained in: |
| https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/nrfconnect#building |
| |
| west build -b nrf52840dk_nrf52840 -- -DCONF_FILE=prj_dfu.conf -DCONFIG_CHIP_LIB_SHELL=y |
| |
| |
| 3.Flash |
| west flash --erase |
| |
| 4.OTA Image needs to build on the docker environment as like in the first step inside the all-clusters-app folder. Refer the below link to build the OTA image with new version. |
| |
| https://github.com/project-chip/connectedhomeip/tree/master/examples/ota-requestor-app/linux#ota-requestor-app-linux |
| |
| To build the ota image with new version for nRF, use the following command inside the all-clusters-app folder , which will build matter.ota |
| |
| west build -b nrf52840dk_nrf52840 -d build2 -- -DCONFIG_CHIP_DEVICE_SOFTWARE_VERSION=2 -DCONF_FILE=prj_dfu.conf -DCONFIG_CHIP_LIB_SHELL=y |
| disabled: true |
| |
| - label: "TH reads the StartUpMode attribute from the DUT" |
| PICS: MOD.S.A0004 |
| verification: | |
| ./chip-tool modeselect read start-up-mode 1 1 |
| |
| on TH(chip-tool),Verify that the DUT response is the integer. Record this value for usage in step 2. |
| |
| [1645778279.693082][4898:4903] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003DataVersion: 3781469722 |
| [1645778279.693151][4898:4903] CHIP:TOO: StartUpMode: 0 |
| disabled: true |
| |
| - label: "TH reads the CurrentMode attribute from the DUT" |
| PICS: MOD.S.A0003 |
| verification: | |
| ./chip-tool modeselect read current-mode 1 1 |
| |
| on TH(chip-tool),Verify that the DUT response is the integer. Record this value for usage in step 2b and 3. |
| |
| [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 |
| [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0 |
| disabled: true |
| |
| - label: |
| "If the StartUpMode and CurrentMode attributes have the same value, |
| proceed to step 2c, Otherwise proceed to step 3a." |
| PICS: MOD.S.A0003 && MOD.S.A0004 |
| verification: | |
| NOTE: |
| If the StartUpMode and CurrentMode attributes have the same value, proceed to step 2c, Otherwise proceed to step 3a. |
| disabled: true |
| |
| - label: "TH reads the SupportedModes attribute from the DUT" |
| PICS: MOD.S.A0002 |
| verification: | |
| ./chip-tool modeselect read supported-modes 1 1 |
| |
| on TH(chip-tool),Verify that the DUT response provides a list of supported modes |
| |
| [1645776742.667057][4661:4666] CHIP:TOO: SupportedModes: 3 entries |
| [1645776742.669546][4661:4666] CHIP:TOO: [1]: { |
| [1645776742.669588][4661:4666] CHIP:TOO: Label: Black |
| [1645776742.669613][4661:4666] CHIP:TOO: Mode: 0 |
| [1645776742.669636][4661:4666] CHIP:TOO: SemanticTag: 0 |
| [1645776742.669661][4661:4666] CHIP:TOO: } |
| [1645776742.669692][4661:4666] CHIP:TOO: [2]: { |
| [1645776742.669715][4661:4666] CHIP:TOO: Label: Cappuccino |
| [1645776742.669737][4661:4666] CHIP:TOO: Mode: 4 |
| [1645776742.669757][4661:4666] CHIP:TOO: SemanticTag: 0 |
| [1645776742.669779][4661:4666] CHIP:TOO: } |
| [1645776742.669808][4661:4666] CHIP:TOO: [3]: { |
| [1645776742.669831][4661:4666] CHIP:TOO: Label: Espresso |
| [1645776742.669853][4661:4666] CHIP:TOO: Mode: 7 |
| [1645776742.669874][4661:4666] CHIP:TOO: SemanticTag: 0 |
| [1645776742.669896][4661:4666] CHIP:TOO: } |
| disabled: true |
| |
| - label: |
| "Select a value from the list in step 2c with a different value than |
| the StartUpMode value read in step 1. TH sends a ChangeToMode command |
| to the DUT with the selected value." |
| PICS: MOD.S.A0002 && MOD.S.C00.Rsp |
| verification: | |
| ./chip-tool modeselect change-to-mode 4 1 1 |
| |
| on TH(chip-tool),Verify that the DUT responds with a successful (value 0x00) status response. |
| |
| [1645778189.045030][4888:4893] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0050 Command=0x0000_0000 Status=0x0 |
| disabled: true |
| |
| - label: |
| "Perform an OTA update on the device that requires a reboot. Allow for |
| the DUT to update and fully reboot." |
| verification: | |
| To perform an OTA update on Thread device follow the cmmds below: |
| |
| Step-1 : Where we builded OTA provider app execute this cmmd . (In my case I ran connectedhomeip/out/debug ./chip-ota-provider-app -f ) |
| |
| ./chip-ota-provider-app -f ~/chip_repos/connectedhomeip/examples/all-clusters-app/nrfconnect/build2/zephyr/matter.ota |
| |
| Ran on chip-tool: |
| |
| Step-2: ./chip-tool pairing onnetwork 2 20202021 |
| |
| Step-3 : ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets": [{"cluster": 41, "endpoint": null, "deviceType": null}]}]" 2 0 |
| |
| Step-4: ./chip-tool otasoftwareupdaterequestor write default-ota-providers "[{"fabricIndex": 1, "providerNodeID": 2, "endpoint": 0}]" 1 0 |
| |
| Step-5: ./chip-tool otasoftwareupdaterequestor announce-ota-provider 2 0 0 0 1 0 |
| disabled: true |
| |
| - label: "TH reads the CurrentMode attribute from the DUT" |
| PICS: MOD.S.A0003 |
| verification: | |
| ./chip-tool modeselect read current-mode 1 1 |
| |
| on TH(chip-tool),Verify that the DUT response is the integer recorded in step 2a or, if the mode was changed, 2d. |
| |
| [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 |
| [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 4 |
| disabled: true |