-
Notifications
You must be signed in to change notification settings - Fork 513
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 protocol v3 #2199
Merged
Merged
OTA protocol v3 #2199
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sergeuz
force-pushed
the
ota_v3/ch55392
branch
2 times, most recently
from
September 21, 2020 15:19
5a44800
to
a97a44a
Compare
sergeuz
force-pushed
the
ota_v3/ch55392
branch
from
October 8, 2020 15:39
a97a44a
to
8061794
Compare
avtolstoy
approved these changes
Nov 16, 2020
sergeuz
force-pushed
the
ota_v3/ch55392
branch
3 times, most recently
from
November 18, 2020 17:59
c92e8ab
to
b338dcb
Compare
…possible to restart SHA-256 computations and clone contexts
…e transfer state file is synced
…tion and use the global disconnection settings instead
sergeuz
force-pushed
the
ota_v3/ch55392
branch
from
November 23, 2020 13:48
9c8e6ca
to
64fc1c1
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
This PR implements the OTA protocol v3 and adds support for resumable firmware updates. The protocol is heavily based on SCTP and thus some familiarity with RFC 4960 will be helpful to understand it better. The SDD for the protocol can be found here.
Both features (the protocol and resumable updates) can be enabled/disabled independently at compile time via the platform feature macros
HAL_PLATFORM_OTA_PROTOCOL_V3
andHAL_PLATFORM_RESUMABLE_OTA
, although, at present, resumable updates require the new protocol in order to work.Other internal features and refactoring introduced in this PR:
system::FirmwareUpdate
. Legacy APIs (Spark_Prepare_For_Firmware_Update()
, etc.) now use the new class internally.CoapMessageEncoder
,CoapMessageDecoder
.SimpleFileStorage
class allows saving/loading an arbitrary structure to/from a file in a way optimized for LittleFS.MBEDTLS_SSL_MAX_CONTENT_LEN
. Note that this PR still uses 512-byte chunks.Steps to Test