| # 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.7.2. [TC-SU-3.2] Handling different QueryImageResponse scenarios on |
| Provider |
| |
| PICS: |
| - MCORE.OTA.Provider |
| |
| config: |
| nodeId: 0x12344321 |
| cluster: "Basic Information" |
| endpoint: 0 |
| |
| tests: |
| - label: |
| "OTA-R/TH sends a QueryImage Command to the DUT. RequestorCanConsent |
| field can be set to either True or False in the QueryImage Command. |
| DUT responds with the QueryImageResponse to the OTA-R/TH." |
| verification: | |
| ./chip-tool otasoftwareupdaterequestor announce-otaprovider 0xDEADBEEF 0 0 0 0x1234567890 0 |
| |
| where 0x1234567890 is OTA Requestor node ID and 0xDEADBEEF is OTA Provider node ID |
| |
| Verify on the OTA Requestor logs receives QueryImageResponse which contains the following |
| Status - UpdateAvailable |
| DelayedActionTime if present should be of type uint32. |
| ImageURI - contain a URI where the OTA Requestor SHOULD download a Software Image |
| SoftwareVersion is the same as the new software image version. |
| SoftwareVersionString - This is the string type of the Software version. |
| UpdateToken - verify it is within 8-32 bytes. |
| |
| |
| |
| [1673337981.104652][28428:28428] CHIP:SWU: QueryImageResponse: |
| [1673337981.104695][28428:28428] CHIP:SWU: status: 0 |
| [1673337981.104735][28428:28428] CHIP:SWU: imageURI: bdx://000000000000007B/ota-requestor-app.ota |
| [1673337981.104776][28428:28428] CHIP:SWU: softwareVersion: 2 |
| [1673337981.104816][28428:28428] CHIP:SWU: softwareVersionString: 2.0 |
| [1673337981.104856][28428:28428] CHIP:SWU: updateToken: 32 |
| [1673337981.104896][28428:28428] CHIP:SWU: userConsentNeeded: 0 |
| [1673337981.104948][28428:28428] CHIP:SWU: Update available from version 1 to 2 |
| disabled: true |
| |
| - label: |
| "There should not be any new software update available for the |
| OTA-R/TH. OTA-R/TH sends a QueryImage Command to the DUT. DUT responds |
| with the QueryImageResponse to the OTA-R/TH." |
| verification: | |
| ./chip-ota-provider-app --discriminator 22 --secured-device-port 5565 --KVS /tmp/chip_kvs_provider --filepath /tmp/test.bin -q updateNotAvailable |
| |
| ./chip-tool otasoftwareupdaterequestor announce-otaprovider 0xDEADBEEF 0 0 0 0x1234567890 0 |
| |
| where 0x1234567890 is OTA Requestor node ID and 0xDEADBEEF is OTA Provider node ID |
| |
| Verify on the OTA Requestor logs receives QueryImageResponse with the Status as Not Available |
| |
| [1673423580.333750][2898:2898] CHIP:SWU: QueryImageResponse: |
| [1673423580.333776][2898:2898] CHIP:SWU: status: 2 |
| [1673423580.333803][2898:2898] CHIP:SWU: userConsentNeeded: 0 |
| disabled: true |
| |
| - label: |
| "OTA-R/TH sends a QueryImage Command to the DUT. ProtocolSupported |
| field should list BDX. DUT responds with the QueryImageResponse to the |
| OTA-R/TH." |
| verification: | |
| ./chip-tool otasoftwareupdaterequestor announce-otaprovider 0xDEADBEEF 0 0 0 0x1234567890 0 |
| |
| where 0x1234567890 is OTA Requestor node ID and 0xDEADBEEF is OTA Provider node ID |
| |
| Verify on the OTA Requestor logs receives QueryImageResponse |
| |
| [1673417165.348812][2114:2114] CHIP:SWU: QueryImageResponse: |
| [1673417165.348861][2114:2114] CHIP:SWU: status: 0 |
| [1673417165.348908][2114:2114] CHIP:SWU: imageURI: bdx://000000000000007B/ota-requestor-app.ota |
| [1673417165.348957][2114:2114] CHIP:SWU: softwareVersion: 2 |
| [1673417165.349003][2114:2114] CHIP:SWU: softwareVersionString: 2.0 |
| [1673417165.349050][2114:2114] CHIP:SWU: updateToken: 32 |
| [1673417165.349096][2114:2114] CHIP:SWU: userConsentNeeded: 0 |
| [1673417165.349155][2114:2114] CHIP:SWU: Update available from version 1 to 2 |
| |
| |
| Verify all the image URI field requirements. |
| disabled: true |
| |
| - label: |
| "OTA-R/TH sends a QueryImage Command to the DUT. ProtocolSupported |
| field should list 'https'. DUT responds with a QueryImageResponse to |
| the OTA-R/TH." |
| verification: | |
| Out of scope for V1.0 |
| disabled: true |
| |
| - label: |
| "OTA-R/TH sends a QueryImage Command to the DUT. DUT responds with the |
| QueryImageResponse with QueryStatus set to 'Busy', DelayedActionTime |
| set to 3 minutes. On the subsequent QueryImage command, DUT sends a |
| QueryImageResponse back to OTA-R/TH. QueryStatus is set to |
| 'UpdateAvailable'." |
| PICS: OTAP.S.M.DelayedActionTime |
| verification: | |
| ./chip-ota-provider-app --discriminator 22 --secured-device-port 5565 --KVS /tmp/chip_kvs_provider --filepath /tmp/test.bin -q busy -t 180 |
| |
| ./chip-tool otasoftwareupdaterequestor announce-otaprovider 0xDEADBEEF 0 0 0 0x1234567890 0 |
| |
| where 0x1234567890 is OTA Requestor node ID and 0xDEADBEEF is OTA Provider node ID |
| |
| Verify on the OTA Requestor logs receives QueryImageResponse with Status as busy and DelayedActionTime as 3 minutes |
| |
| [1673425035.586964][3055:3055] CHIP:SWU: QueryImageResponse: |
| [1673425035.586994][3055:3055] CHIP:SWU: status: 1 |
| [1673425035.587022][3055:3055] CHIP:SWU: delayedActionTime: 180 seconds |
| [1673425035.587052][3055:3055] CHIP:SWU: userConsentNeeded: 0 |
| [1673425035.587083][3055:3055] CHIP:SWU: Scheduling a retry |
| |
| |
| Verify that the OTA-R/TH starts the download from the DUT after the second QueryImageResponse with UpdateAvailable status. |
| |
| [1673425215.698563][3055:3055] CHIP:SWU: QueryImageResponse: |
| [1673425215.698602][3055:3055] CHIP:SWU: status: 0 |
| [1673425215.698633][3055:3055] CHIP:SWU: imageURI: bdx://000000000000007B/ota-requestor-app.ota |
| [1673425215.698664][3055:3055] CHIP:SWU: softwareVersion: 2 |
| [1673425215.698695][3055:3055] CHIP:SWU: softwareVersionString: 2.0 |
| [1673425215.698731][3055:3055] CHIP:SWU: updateToken: 32 |
| [1673425215.698760][3055:3055] CHIP:SWU: userConsentNeeded: 0 |
| [1673425215.698801][3055:3055] CHIP:SWU: Update available from version 1 to 2 |
| |
| Verify that the Image downloaded by the OTA-R/TH is valid and is the same image that was supposed to be downloaded. |
| disabled: true |