blob: 4b161cf03692b5ffd10f8d68766916191ce1db1f [file] [log] [blame]
# 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: 3.5.1. [TC-SU-2.7] Events generated by OTA-R(DUT)
PICS:
- MCORE.OTA.Requestor
config:
nodeId: 0x12344321
cluster: "Basic"
endpoint: 0
tests:
- label: "Perform a software update on the DUT."
verification: |
./chip-tool interactive start
Subscribe to StateTransition event using command
otasoftwareupdaterequestor subscribe-event state-transition 5 10 0x1234567890 0
Trigger OTA query using command
otasoftwareupdaterequestor announce-ota-provider 0xDEADBEEF 0 0 0 0x1234567890 0
where 0x1234567890 is OTA Requestor node ID and 0xDEADBEEF is OTA Provider node ID
Verify that the chip-tool receives below StateTransition event notifications
1644017070772] [33044:1032132] CHIP: [TOO] StateTransition: {
[1644017070772] [33044:1032132] CHIP: [TOO] PreviousState: 1
[1644017070772] [33044:1032132] CHIP: [TOO] NewState: 2
[1644017070772] [33044:1032132] CHIP: [TOO] Reason: 1
[1644017070772] [33044:1032132] CHIP: [TOO] TargetSoftwareVersion: null
[1644017070772] [33044:1032132] CHIP: [TOO] }
[1644017070772] [33044:1032132] CHIP: [TOO] StateTransition: {
[1644017070772] [33044:1032132] CHIP: [TOO] PreviousState: 2
[1644017070772] [33044:1032132] CHIP: [TOO] NewState: 4
[1644017070772] [33044:1032132] CHIP: [TOO] Reason: 1
[1644017070772] [33044:1032132] CHIP: [TOO] TargetSoftwareVersion: 1
[1644017070772] [33044:1032132] CHIP: [TOO] }
[1644017080776] [33044:1032131] CHIP: [TOO] StateTransition: {
[1644017080776] [33044:1032131] CHIP: [TOO] PreviousState: 4
[1644017080776] [33044:1032131] CHIP: [TOO] NewState: 5
[1644017080776] [33044:1032131] CHIP: [TOO] Reason: 1
[1644017080776] [33044:1032131] CHIP: [TOO] TargetSoftwareVersion: 1
[1644017080776] [33044:1032131] CHIP: [TOO] }
[1644017080776] [33044:1032131] CHIP: [TOO] StateTransition: {
[1644017080776] [33044:1032131] CHIP: [TOO] PreviousState: 5
[1644017080776] [33044:1032131] CHIP: [TOO] NewState: 1
[1644017080776] [33044:1032131] CHIP: [TOO] Reason: 1
[1644017080776] [33044:1032131] CHIP: [TOO] TargetSoftwareVersion: null
[1644017080776] [33044:1032131] CHIP: [TOO] }
disabled: true
- label:
"DUT sends a QueryImage command to the TH/OTA-P. TH/OTA-P sends a
QueryImageResponse back to DUT. QueryStatus is set to Busy."
verification: |
./chip-tool interactive start
Subscribe to StateTransition event using command
otasoftwareupdaterequestor subscribe-event state-transition 5 10 0x1234567890 0
Trigger OTA query using command
otasoftwareupdaterequestor announce-ota-provider 0xDEADBEEF 0 0 0 0x1234567890 0
where 0x1234567890 is OTA Requestor node ID and 0xDEADBEEF is OTA Provider node ID
Verify that the chip-tool receives below StateTransition event notification
[1651282443727] [28764:35514810] CHIP: [TOO] StateTransition: {
[1651282443727] [28764:35514810] CHIP: [TOO] PreviousState: 1
[1651282443727] [28764:35514810] CHIP: [TOO] NewState: 2
[1651282443727] [28764:35514810] CHIP: [TOO] Reason: 1
[1651282443727] [28764:35514810] CHIP: [TOO] TargetSoftwareVersion: null
[1651282443727] [28764:35514810] CHIP: [TOO] }
[1651282443727] [28764:35514810] CHIP: [TOO] StateTransition: {
[1651282443727] [28764:35514810] CHIP: [TOO] PreviousState: 2
[1651282443727] [28764:35514810] CHIP: [TOO] NewState: 3
[1651282443727] [28764:35514810] CHIP: [TOO] Reason: 4
[1651282443727] [28764:35514810] CHIP: [TOO] TargetSoftwareVersion: null
[1651282443727] [28764:35514810] CHIP: [TOO] }
disabled: true
- label:
"DUT sends a QueryImage command to the TH/OTA-P. TH/OTA-P does not
respond back to DUT."
verification: |
./chip-tool interactive start
Subscribe to StateTransition event using command
otasoftwareupdaterequestor subscribe-event state-transition 5 10 0x1234567890 0
Kill OTA Provider App before issuing query using
otasoftwareupdaterequestor announce-ota-provider 0xDEADBEEF 0 0 0 0x1234567890 0
where 0x1234567890 is OTA Requestor node ID and 0xDEADBEEF is OTA Provider node ID
Verify that the chip-tool receives below StateTransition event notification
[1651282794539] [28929:35519901] CHIP: [TOO] StateTransition: {
[1651282794539] [28929:35519901] CHIP: [TOO] PreviousState: 1
[1651282794539] [28929:35519901] CHIP: [TOO] NewState: 2
[1651282794539] [28929:35519901] CHIP: [TOO] Reason: 1
[1651282794539] [28929:35519901] CHIP: [TOO] TargetSoftwareVersion: null
[1651282794539] [28929:35519901] CHIP: [TOO] }
[1651282804542] [28929:35519900] CHIP: [TOO] StateTransition: {
[1651282804542] [28929:35519900] CHIP: [TOO] PreviousState: 2
[1651282804542] [28929:35519900] CHIP: [TOO] NewState: 1
[1651282804542] [28929:35519900] CHIP: [TOO] Reason: 2
[1651282804542] [28929:35519900] CHIP: [TOO] TargetSoftwareVersion: null
[1651282804542] [28929:35519900] CHIP: [TOO] }
disabled: true
- label:
"DUT sends a QueryImage command to the TH/OTA-P. RequestorCanConsent
is set to True by DUT. OTA-P/TH responds with a QueryImageResponse
with UserConsentNeeded field set to True."
PICS: MCORE.OTA.RequestorConsent
verification: |
Run the Provider App using
./chip-ota-provider-app --discriminator 22 --secured-device-port 5565 --KVS /tmp/chip_kvs_provider --filepath /tmp/test.bin -c
./chip-tool interactive start
Subscribe to StateTransition event using command
otasoftwareupdaterequestor subscribe-event state-transition 5 10 0x1234567890 0
Trigger OTA query using command
otasoftwareupdaterequestor announce-ota-provider 0xDEADBEEF 0 0 0 0x1234567890 0
where 0x1234567890 is OTA Requestor node ID and 0xDEADBEEF is OTA Provider node ID
Verify that the OTA-Subscriber receives a StateTransition event notification for the state change to DelayedOnUserConsent.
disabled: true
- label:
"Force an error during the download of the OTA image to the DUT. Wait
for the Idle timeout which should be no less than 5 minutes."
verification: |
./chip-tool interactive start
Subscribe to StateTransition and DownloadError events using command
otasoftwareupdaterequestor subscribe-event-by-id 0,2 30 60 0x1234567890 0
Trigger OTA query using command
otasoftwareupdaterequestor announce-ota-provider 0xDEADBEEF 0 0 0 0x1234567890 0
where 0x1234567890 is OTA Requestor node ID and 0xDEADBEEF is OTA Provider node ID
Verify that the chip-tool receives a DownloadError event notification on BDX Idle timeout which should be no less than 5 minutes.
Verify that the chip-tool receives a StateTransition event notification for the state change to Idle.
[1651520178426] [98732:38086919] CHIP: [TOO] DownloadError: {
[1651520178426] [98732:38086919] CHIP: [TOO] SoftwareVersion: 2
[1651520178426] [98732:38086919] CHIP: [TOO] BytesDownloaded: 2995
[1651520178426] [98732:38086919] CHIP: [TOO] ProgressPercent: 65
[1651520178426] [98732:38086919] CHIP: [TOO] PlatformCode: null
[1651520178426] [98732:38086919] CHIP: [TOO] }
[1654558704063] [57765:69159905] CHIP: [TOO] StateTransition: {
[1654558704064] [57765:69159905] CHIP: [TOO] PreviousState: 4
[1654558704064] [57765:69159905] CHIP: [TOO] NewState: 1
[1654558704064] [57765:69159905] CHIP: [TOO] Reason: 3
[1654558704064] [57765:69159905] CHIP: [TOO] TargetSoftwareVersion: null
[1654558704064] [57765:69159905] CHIP: [TOO] }
disabled: true
- label:
"After the OTA image is transferred, DUT sends ApplyUpdateRequest to
the OTA-P. OTA-P/TH sends the ApplyUpdateResponse Command to the DUT.
Action field is set to AwaitNextAction."
verification: |
./chip-tool interactive start
Subscribe to StateTransition event using command
otasoftwareupdaterequestor subscribe-event state-transition 5 10 0x1234567890 0
Trigger OTA query using command
otasoftwareupdaterequestor announce-ota-provider 0xDEADBEEF 0 0 0 0x1234567890 0
where 0x1234567890 is OTA Requestor node ID and 0xDEADBEEF is OTA Provider node ID
[1651283503471] [29332:35530821] CHIP: [TOO] StateTransition: {
[1651283503471] [29332:35530821] CHIP: [TOO] PreviousState: 1
[1651283503471] [29332:35530821] CHIP: [TOO] NewState: 2
[1651283503471] [29332:35530821] CHIP: [TOO] Reason: 1
[1651283503471] [29332:35530821] CHIP: [TOO] TargetSoftwareVersion: null
[1651283503471] [29332:35530821] CHIP: [TOO] }
[1651283503471] [29332:35530821] CHIP: [TOO] StateTransition: {
[1651283503471] [29332:35530821] CHIP: [TOO] PreviousState: 2
[1651283503471] [29332:35530821] CHIP: [TOO] NewState: 4
[1651283503471] [29332:35530821] CHIP: [TOO] Reason: 1
[1651283503471] [29332:35530821] CHIP: [TOO] TargetSoftwareVersion: 2
[1651283503471] [29332:35530821] CHIP: [TOO] }
[1651283513475] [29332:35531053] CHIP: [TOO] StateTransition: {
[1651283513475] [29332:35531053] CHIP: [TOO] PreviousState: 4
[1651283513475] [29332:35531053] CHIP: [TOO] NewState: 5
[1651283513475] [29332:35531053] CHIP: [TOO] Reason: 1
[1651283513475] [29332:35531053] CHIP: [TOO] TargetSoftwareVersion: 2
[1651283513475] [29332:35531053] CHIP: [TOO] }
[1651283513475] [29332:35531053] CHIP: [TOO] StateTransition: {
[1651283513475] [29332:35531053] CHIP: [TOO] PreviousState: 5
[1651283513475] [29332:35531053] CHIP: [TOO] NewState: 6
[1651283513475] [29332:35531053] CHIP: [TOO] Reason: 4
[1651283513475] [29332:35531053] CHIP: [TOO] TargetSoftwareVersion: null
[1651283513475] [29332:35531053] CHIP: [TOO] }
disabled: true
- label:
"DUT successfully finishes applying a software update and the new
software image version is being executed on the DUT. OTA-Subscriber
sends a read request to read the VersionApplied event from the DUT."
verification: |
./chip-tool otasoftwareupdaterequestor announce-ota-provider 0xDEADBEEF 0 0 0 0x1234567890 0
where 0x1234567890 is OTA Requestor node ID and 0xDEADBEEF is OTA Provider node ID
Read VersionApplied event when a new version starts executing after being applied due to a software update.
./chip-tool otasoftwareupdaterequestor read-event version-applied 0x1234567890 0
Verify that the chip-tool receives below VersionApplied event notification
[1645818271254] [21222:21170014] CHIP: [TOO] VersionApplied: {
[1645818271254] [21222:21170014] CHIP: [TOO] SoftwareVersion: 2
[1645818271254] [21222:21170014] CHIP: [TOO] ProductID: 32769
[1645818271254] [21222:21170014] CHIP: [TOO] }
disabled: true