blob: b25c6ad3b3bf9021113b7469b308d23245b231ea [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.3.1.[TC-SU-2.3]Transfer of Software Update images between DUT and TH/OTA-P
PICS:
- MCORE.OTA.Requestor
config:
nodeId: 0x12344321
cluster: "Basic"
endpoint: 0
tests:
- 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 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} -c
./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 that the DUT obtains user consent before transferring the image. This step is vendor specific.
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 UpdateAvailable.
Set ImageURI to the location where the image is located."
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 updateAvailable
./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 that the transfer of the software image happens all the way until the last Block is acknowledged on the OTA Provider logs:
[1645748688025] [99779:20370762] CHIP: [BDX] OutputEvent type: AckEOFReceived
[1645748688025] [99779:20370762] CHIP: [BDX] Transfer completed, got AckEOF"
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 UpdateAvailable.
Set ImageURI with the https url of the software image."
PICS: MCORE.OTA.HTTPS
verification: |
Out of scope for V1.0
disabled: true
- label:
"During the transfer of the image to the DUT, force fail the transfer
before it completely transfers the image. Wait for the Idle timeout so
that reading the UpdateState Attribute of the OTA Requestor returns
the value as Idle. Initiate another QueryImage Command from DUT 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
Kill the OTA Provider App during the transfer of the image to the DUT before it completely transfers the image.
Wait for atleast 5 minutes or more until reading the UpdateState Attribute of the OTA Requestor returns the value as Idle (Value 1)
chip-tool otasoftwareupdaterequestor read update-state 0x1234567890 0
[1651259701990] [18726:35135506] CHIP: [DMG] ReportDataMessage =
[1651259701990] [18726:35135506] CHIP: [DMG] {
[1651259701990] [18726:35135506] CHIP: [DMG] AttributeReportIBs =
[1651259701990] [18726:35135506] CHIP: [DMG] [
[1651259701990] [18726:35135506] CHIP: [DMG] AttributeReportIB =
[1651259701990] [18726:35135506] CHIP: [DMG] {
[1651259701990] [18726:35135506] CHIP: [DMG] AttributeDataIB =
[1651259701990] [18726:35135506] CHIP: [DMG] {
[1651259701990] [18726:35135506] CHIP: [DMG] DataVersion = 0xa8a08a2a,
[1651259701990] [18726:35135506] CHIP: [DMG] AttributePathIB =
[1651259701990] [18726:35135506] CHIP: [DMG] {
[1651259701990] [18726:35135506] CHIP: [DMG] Endpoint = 0x0,
[1651259701990] [18726:35135506] CHIP: [DMG] Cluster = 0x2a,
[1651259701990] [18726:35135506] CHIP: [DMG] Attribute = 0x0000_0002,
[1651259701990] [18726:35135506] CHIP: [DMG] }
[1651259701990] [18726:35135506] CHIP: [DMG]
[1651259701990] [18726:35135506] CHIP: [DMG] Data = 1,
[1651259701990] [18726:35135506] CHIP: [DMG] },
[1651259701990] [18726:35135506] CHIP: [DMG]
[1651259701990] [18726:35135506] CHIP: [DMG] },
[1651259701990] [18726:35135506] CHIP: [DMG]
[1651259701990] [18726:35135506] CHIP: [DMG] ],
[1651259701990] [18726:35135506] CHIP: [DMG]
[1651259701990] [18726:35135506] CHIP: [DMG] SuppressResponse = true,
[1651259701990] [18726:35135506] CHIP: [DMG] InteractionModelRevision = 1
[1651259701990] [18726:35135506] CHIP: [DMG] }
[1653645452.044092][15281:15286] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_002A Attribute 0x0000_0002 DataVersion: 1306504521
[1653645452.044186][15281:15286] CHIP:TOO: UpdateState: 1
Relaunch the OTA Provider App and initiate another query
chip-tool otasoftwareupdaterequestor announce-ota-provider 0xDEADBEEF 0 0 0 0x1234567890 0
Verify that the DUT starts a new transfer of software image when sending another QueryImage request i.e. Start Offset field in ReceiveInit message received on OTA Provider side is 0
[1651260350133] [18661:35147439] CHIP: [ATM] ReceiveInit
[1651260350133] [18661:35147439] CHIP: [ATM] Proposed Transfer Control: 0x20
[1651260350133] [18661:35147439] CHIP: [ATM] Range Control: 0x0
[1651260350133] [18661:35147439] CHIP: [ATM] Proposed Max Block Size: 1024
[1651260350133] [18661:35147439] CHIP: [ATM] Start Offset: 0x0000000000000000
[1651260350133] [18661:35147439] CHIP: [ATM] Proposed Max Length: 0x0000000000000000
[1651260350133] [18661:35147439] CHIP: [ATM] File Designator Length: 8
[1651260350133] [18661:35147439] CHIP: [ATM] File Designator: test.ota
disabled: true
- label:
"During the transfer of the image to the DUT, force fail the transfer
before it completely transfers the image. Initiate another QueryImage
Command from DUT to the TH/OTA-P. Set the RC[STARTOFS] bit and
associated STARTOFS field in the ReceiveInit Message to indicate the
resumption of a transfer previously aborted."
PICS: MCORE.OTA.Resume
verification: |
Out of scope for V1.0
disabled: true
- label: "Perform the OTA Update on DUT using vendor specific mechanism."
PICS: MCORE.OTA.VendorSpecific
verification: |
Use vendor specific steps to initiate OTA Update and verify that the software image is transferred to the DUT
disabled: true