Add Remote DFU OTA update start to Companion firmware for nRF52- and ESP32-based boards #2078
Draft
txkbaldlaw wants to merge 8 commits intomeshcore-dev:devfrom
Draft
Add Remote DFU OTA update start to Companion firmware for nRF52- and ESP32-based boards #2078txkbaldlaw wants to merge 8 commits intomeshcore-dev:devfrom
txkbaldlaw wants to merge 8 commits intomeshcore-dev:devfrom
Conversation
This file contains hidden or 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
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.
Implementation of Feature Request/Issue #160
This PR is designed to allow putting the updated companion board into DFU OTA mode so that it can be updated over the air, using apps such as Nordic DFU, etc.
For now, it is only intended to work on nRF52- and ESP32-based boards.
I only have RAK3401 and RAK4631 boards here to test. It works on both. I have not tested the ESP32 end of things, but I think it will work.
Also, I have not tested this with the factory standard bootloader that comes on RAK boards. All of my boards were updated to the OTAFIX2.1 bootloader previously.
Under the hood, essentially it created a new command at slot 62 and associated functions to trigger the board to reboot into its OTA update mode. It treats nRF52 boards slightly different b/c I kept hitting a snag on getting it into OTA mode.
I'm VERY open to suggestions on improvements.
I created a helper script at bin/companion_start_dfu.py that will allow you to trigger the new command 62 over BLE via python until this PR is merged and @liamcottle updates the Meshcore app with the appropriate functions.
Usage for this test script is: python3 bin/companion_start_dfu.py from the root directory. It requires installation of bleak to run.
Hope this helps.
PS: I did most of this with Codex, so there may be a much more elegant/efficient way to do it, and I'm open to help/suggestions.
PSS: Marking this as a draft until some others test it.