feat(hosted): Add OTA and version functionality to esp-hosted #11936
+101
−2
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.
This pull request adds firmware version management and update capabilities to the ESP-Hosted integration. The changes introduce functions for retrieving firmware versions, checking for updates, and managing over-the-air (OTA) updates of the co-processor. Additionally, the initialization process now checks for version mismatches and logs update information.
Firmware version management and update features:
hostedGetHostVersionandhostedGetSlaveVersionfunctions to retrieve the firmware version of the host and co-processor, respectively. [1] [2]hostedHasUpdateto compare host and slave firmware versions, log differences, and determine if an update is needed. [1] [2]hostedGetUpdateURLto generate a URL for downloading the appropriate firmware update. [1] [2]OTA update workflow:
hostedBeginUpdate,hostedWriteUpdate, andhostedEndUpdatefor starting, writing, and finalizing OTA updates to the co-processor. [1] [2]Initialization improvements:
hostedInitto connect to the slave device and automatically check for firmware updates during initialization, logging results as appropriate.Code cleanup: