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

[ota-provider-app] fix location parsing and BDX sender #9733

Merged

Conversation

holbrookt
Copy link
Contributor

Problem

This PR contains necessary changes for completing an OTA BDX transfer with an ota-requestor-app (which will also require changes submitted in another PR).

  • file I/O for BDX sending was erroring out on EOF instead of sending the last block
  • code that verified QueryImage parameters was using emberAfStringLength() which is incompatible with CHIP TLV format
  • The BDX ExchangeContext was closing after every message send
  • Fixes Fix QueryImage param length checking #9703

Change overview

  • don't consider EOF as an error condition when reading blocks for BDX transfer
  • don't keep calling gcount() to get the number of bytes read
  • add kExpectResponse for all BDX messages except StatusReport in order to keep exchange open
  • use strlen() to parse location string instead of emberAfStringLength()
  • fix message for printing location string length

Testing

  • tested again modified ota-requestor-app (PR will be submitted soon)

@github-actions
Copy link

Size increase report for "esp32-example-build" from 4763c91

File Section File VM
chip-all-clusters-app.elf .flash.text 4 4
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
.debug_abbrev,0,24
.debug_line,0,4
.flash.text,4,4
[Unmapped],0,-4
.debug_loc,0,-7
.debug_info,0,-97


@woody-apple
Copy link
Contributor

@woody-apple woody-apple merged commit 31e2695 into project-chip:master Sep 16, 2021
@selissia selissia self-requested a review September 16, 2021 14:00
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.

Fix QueryImage param length checking
5 participants