Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement miscellaneous OTA Provider cluster spec changes #9874

Merged
merged 12 commits into from
Sep 30, 2021

Conversation

holbrookt
Copy link
Contributor

Problem

Since much of the OTA code was written, there have been a number of changes to the cluster spec definitions that have not been reflected in the code. These include name changes to attributes and/or command arguments, removing/adding arguments to commands, and changing size requirements of one command argument. See the full list below.

Change overview

  • Rename CurrentVersion attribute to SoftwareVersion
  • Remove ImageType field of ImageQuery
  • Change accepted length of UpdateToken
  • Add SoftwareVersionString field to QueryImageResponse
  • Rename CriticalUpdateAvailable to UrgentUpdateAvailable
  • change serverLocation to providerLocation and regen all

This PR does not bring OTA fully up to spec. Still need to implement events and related changes.

Testing

In one terminal:

./chip-ota-provider-app [-f <filepath>]

In a second terminal:

./chip-tool pairing onnetwork 0 20202021 3840 ::1 5540
./chip-ota-requestor-app [-p <provider node id>]

Verified image transfer completes successfully.

@todo
Copy link

todo bot commented Sep 22, 2021

(#5542): The cluster handlers should accept a ByteSpan for all string types.

// TODO(#5542): The cluster handlers should accept a ByteSpan for all string types.
TLVUnpackError = aDataTlv.GetDataPtr(softwareVersionString);
break;
case 5:
TLVUnpackError = aDataTlv.Get(updateToken);
break;
case 6:
TLVUnpackError = aDataTlv.Get(userConsentNeeded);
break;
case 7:
TLVUnpackError = aDataTlv.Get(metadataForRequestor);


This comment was generated by todo based on a TODO comment in 1e2b55d in #9874. cc @holbrookt.

@todo
Copy link

todo bot commented Sep 22, 2021

(#5542): The cluster handlers should accept a ByteSpan for all string types.

// TODO(#5542): The cluster handlers should accept a ByteSpan for all string types.
TLVUnpackError = aDataTlv.GetDataPtr(softwareVersionString);
break;
case 5:
TLVUnpackError = aDataTlv.Get(updateToken);
break;
case 6:
TLVUnpackError = aDataTlv.Get(userConsentNeeded);
break;
case 7:
TLVUnpackError = aDataTlv.Get(metadataForRequestor);


This comment was generated by todo based on a TODO comment in 1e2b55d in #9874. cc @holbrookt.

@holbrookt holbrookt requested a review from selissia September 23, 2021 18:16
@holbrookt holbrookt merged commit 07ff4f1 into project-chip:master Sep 30, 2021
@holbrookt holbrookt deleted the ota-clusters-update branch September 30, 2021 17:09
@github-actions
Copy link

Size increase report for "esp32-example-build" from 663cfc6

File Section File VM
chip-all-clusters-app.elf .flash.rodata -8 -8
chip-all-clusters-app.elf .flash.text -20 -20
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
[Unmapped],0,28
.debug_loc,0,14
.shstrtab,0,1
.riscv.attributes,0,-1
.strtab,0,-1
.debug_frame,0,-4
.debug_line,0,-8
.flash.rodata,-8,-8
.flash.text,-20,-20
.debug_info,0,-22
.debug_str,0,-23


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bring OTA Cluster up to spec
7 participants