Skip to content

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
txkbaldlaw:feature/companion-dfu-working-v3
Draft

Add Remote DFU OTA update start to Companion firmware for nRF52- and ESP32-based boards #2078
txkbaldlaw wants to merge 8 commits intomeshcore-dev:devfrom
txkbaldlaw:feature/companion-dfu-working-v3

Conversation

@txkbaldlaw
Copy link

@txkbaldlaw txkbaldlaw commented Mar 18, 2026

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant