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] Support for error/timeout midway in transfer and later resume #11760

Closed
ukatira opened this issue Nov 12, 2021 · 4 comments · Fixed by #15768
Closed

[ota-provider-app] Support for error/timeout midway in transfer and later resume #11760

ukatira opened this issue Nov 12, 2021 · 4 comments · Fixed by #15768
Assignees

Comments

@ukatira
Copy link

ukatira commented Nov 12, 2021

Problem

There is no way right now to trigger an error/timeout midway in OTA file transfer.

Proposed Solution

Add support for error/timeout midway in OTA file transfer in the ota-provider-app to verify requestor handles these correctly and can resume transfer successfully.

Section 11.20.3.5 Pg 665: Idle time-out SHALL be no less than 5 minutes for either Receiver-Driver or Asynchronous mode, before aborting a transfer.
Section 11.20.3.5 Pg 666: The ReceiveInit message from the OTA Requestor MAY have the RC[STARTOFS] bit set and associated STARTOFS field set to indicate the resumption of a transfer previously aborted, or to affect partial windowed access to the portion of a Software Image desired.

@yufengwangca
Copy link
Contributor

@holbrookt could you help to take a look?

@holbrookt
Copy link
Contributor

This seems necessary for cert and 1.0. Can you confirm @ukatira ?

@holbrookt holbrookt removed their assignment Feb 2, 2022
@ukatira
Copy link
Author

ukatira commented Feb 2, 2022

I think Resume functionality got moved to post V1.0 so this will be needed when Requestors can support resuming a transfer previously aborted.

@woody-apple woody-apple added the ota label Feb 8, 2022
@carol-apple
Copy link
Contributor

I think even without resume supported, this part can still be validated:

Section 11.20.3.5 Pg 665: Idle time-out SHALL be no less than 5 minutes for either Receiver-Driver or Asynchronous mode, before aborting a transfer.

@isiu-apple isiu-apple self-assigned this Feb 17, 2022
isiu-apple added a commit to isiu-apple/connectedhomeip that referenced this issue Mar 3, 2022
isiu-apple added a commit to isiu-apple/connectedhomeip that referenced this issue Mar 3, 2022
isiu-apple added a commit to isiu-apple/connectedhomeip that referenced this issue Mar 3, 2022
isiu-apple added a commit to isiu-apple/connectedhomeip that referenced this issue Mar 4, 2022
woody-apple pushed a commit that referenced this issue Mar 5, 2022
…out (#15768)

* Issue #11760 - [ota-provider-app] Support for error/timeout midway in transfer

* restyle-diff.sh changes

* Code review changes.

- Moved mTimeout to BDXDownloader class.
- Moved prevPercentageComplete to BDXDownloader class.
- Renamed StartTimeoutTimerHandler to TransferTimeoutCheckHandler.
- Added sanity checks.

* Code review changes.

- Moved mTimeoutSec to a constant define kTimeoutSec.
- Moved resetting of timeout timer and prevPercentageComplete to a Reset() function.

* Code review changes.

- Renamed prevPercentageComplete to mPrevPercentageComplete

* Code review changes.

- Renmed CheckTransferTimeout() to HasTransferTimedOut().
- Calculate timeout using block counter instead of percentage complete.
- Use 5*60 instead of 300 for timeout value for readability.

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

Successfully merging a pull request may close this issue.

7 participants