-
Notifications
You must be signed in to change notification settings - Fork 85
OTA: chunked download #520
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #520 +/- ##
=======================================
Coverage 95.39% 95.39%
=======================================
Files 33 33
Lines 1520 1520
=======================================
Hits 1450 1450
Misses 70 70 ☔ View full report in Codecov by Sentry. |
|
@andreagilardoni would it be better to use |
I think you are right! this could be a good use for them, since they are designed to accommodate settings for the OtaProcedure |
|
Memory usage change @ 0f53459
Click for full report table
Click for full report CSV |
This pull request introduces several changes to the OTA update process in the Arduino IoT Cloud library. The key changes focus on improving the reliability of OTA updates by adding support for chunked downloads and refining OTA policy management.
Improvements to OTA policy management:
src/ArduinoIoTCloudTCP.h: ReplacedsetOtaPolicieswithenableOtaPolicyanddisableOtaPolicymethods to manage OTA policies more flexibly. Added a new methodsetOTAChunkModeto enable or disable chunked downloads.src/ota/interface/OTAInterface.cpp: Updated theotaAvailablemethod to use the newgetOtaPolicymethod for checking OTA policies.src/ota/interface/OTAInterface.h: Added new methodsenableOtaPolicy,disableOtaPolicy, andgetOtaPolicyto manage OTA policies. Introduced a newChunkDownloadflag for chunked downloads.Enhancements to OTA download process:
src/ota/interface/OTAInterfaceDefault.cpp: Refactored thestartOTAandfetchmethods to support chunked downloads. Added a new methodrequestOtato handle HTTP requests for OTA updates, including chunked requests.src/ota/interface/OTAInterfaceDefault.h: Added new constants and methods to support chunked downloads, includingmaxChunkSize,requestOta, andfetchMore. Updated theContextstruct to include new fields for managing chunked downloads.