| # 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.2.1. [TC-SU-2.1] QueryImage Command from DUT to OTA-P |
| |
| PICS: |
| - MCORE.OTA.Requestor |
| |
| config: |
| nodeId: 0x12344321 |
| cluster: "Basic Information" |
| endpoint: 0 |
| |
| tests: |
| - label: "DUT sends a QueryImage command to the TH/OTA-P" |
| 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 |
| |
| Verify on the OTA Provider logs received QueryImage: |
| Verify the QueryImage command has the following mandatory fields |
| VendorID - Should match the value reported by the Basic Information Cluster VendorId attribute of the DUT. |
| ProductID - Should match the value reported by the Basic Information Cluster ProductId attribute of the DUT. |
| SoftwareVersion - Should match the value reported by the Basic Information Cluster SoftwareVersion attribute of the DUT. |
| Verify the ProtocolsSupported lists the BDX Synchronous protocol. |
| HardwareVersion - If present, verify that it matches the value reported by the Basic Information Cluster HardwareVersion attribute of the DUT. |
| Location field is same as Basic Information Cluster Attribute of the DUT. |
| RequestorCanConsent field should be set to True. Otherwise it should be False. |
| |
| |
| [1645743053317] [97806:20280749] CHIP: [ZCL] OTA Provider received QueryImage |
| [1645743053317] [97806:20280749] CHIP: [ZCL] VendorID: 0xfff1 |
| [1645743053317] [97806:20280749] CHIP: [ZCL] ProductID: 32769 |
| [1645743053317] [97806:20280749] CHIP: [ZCL] SoftwareVersion: 0 |
| [1645743053317] [97806:20280749] CHIP: [ZCL] ProtocolsSupported: [ |
| [1645743053317] [97806:20280749] CHIP: [ZCL] 0 |
| [1645743053317] [97806:20280749] CHIP: [ZCL] ] |
| [1645743053317] [97806:20280749] CHIP: [ZCL] HardwareVersion: 0 |
| [1645743053317] [97806:20280749] CHIP: [ZCL] Location: XX |
| [1645743053317] [97806:20280749] CHIP: [ZCL] RequestorCanConsent: 0 |
| disabled: true |
| |
| - label: |
| "DUT sends a QueryImage command to the TH/OTA-P. Wait for 2 minute." |
| verification: | |
| Run the OTA Provider App using the command: |
| |
| ./chip-ota-provider-app --discriminator ${PROVIDER_LONG_DISCRIMINATOR} --secured-device-port ${PROVIDER_UDP_PORT} --KVS ${KVS_STORE_LOCATION} --filepath ${SW_IMAGE_FILE} -q busy |
| |
| ./chip-tool otasoftwareupdaterequestor announce-ota-provider 0xDEADBEEF 0 1 0 0x1234567890 0 |
| |
| where 0x1234567890 is OTA Requestor node ID and 0xDEADBEEF is OTA Provider node ID |
| |
| Verify on the OTA Provider logs that the QueryImage command is sent only once in that 2 minute interval. |
| disabled: true |
| |
| - label: |
| "TH2/Administrator sends an AnnounceOTAProvider command to the DUT." |
| verification: | |
| ./chip-tool otasoftwareupdaterequestor announce-ota-provider 0xDEADBEEF 0 1 0 0x1234567890 0 |
| |
| where 0x1234567890 is OTA Requestor node ID and 0xDEADBEEF is OTA Provider node ID |
| |
| Verify on the OTA Provider logs received QueryImage: |
| |
| [1645743053317] [97806:20280749] CHIP: [ZCL] OTA Provider received QueryImage |
| [1645743053317] [97806:20280749] CHIP: [ZCL] VendorID: 0xfff1 |
| [1645743053317] [97806:20280749] CHIP: [ZCL] ProductID: 32769 |
| [1645743053317] [97806:20280749] CHIP: [ZCL] SoftwareVersion: 0 |
| [1645743053317] [97806:20280749] CHIP: [ZCL] ProtocolsSupported: [ |
| [1645743053317] [97806:20280749] CHIP: [ZCL] 0 |
| [1645743053317] [97806:20280749] CHIP: [ZCL] ] |
| [1645743053317] [97806:20280749] CHIP: [ZCL] HardwareVersion: 0 |
| [1645743053317] [97806:20280749] CHIP: [ZCL] Location: XX |
| [1645743053317] [97806:20280749] CHIP: [ZCL] RequestorCanConsent: 0 |
| disabled: true |