-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[nrf52,ota] zephyr mcumgr ota #5740
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
Open
tomaszduda23
wants to merge
6
commits into
esphome:next
Choose a base branch
from
tomaszduda23:ota
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| --- | ||
| description: "Instructions for setting up ESPHome's nRF52 platform to allow remote firmware updates of devices." | ||
| title: "ESPHome nRF52 Firmware Updates" | ||
| params: | ||
| seo: | ||
| description: Instructions for setting up ESPHome's nRF52 platform to allow remote firmware updates of devices. | ||
| image: system-update.svg | ||
| --- | ||
|
|
||
| The nRF52 platform supports firmware updates via Over-the-Air (OTA) mechanisms. The **only supported bootloader** for OTA updates is **MCUboot**. | ||
|
|
||
| To flash firmware onto the device, you can use any of the tools or libraries listed in the [Zephyr MCUmgr documentation](https://docs.zephyrproject.org/latest/services/device_mgmt/mcumgr.html#tools-libraries). | ||
| Firmware updates are also available via the ESPHome command-line interface. | ||
| For flashing over **BLE**, the [MCUmgr Web Tool](https://boogie.github.io/mcumgr-web/) provides a convenient browser-based interface. | ||
|
|
||
| ```yaml | ||
| # Example configuration entry | ||
| ota: | ||
| - platform: zephyr_mcumgr | ||
| ``` | ||
|
|
||
| ## Configuration variables | ||
|
|
||
| - **transport** (*Optional*, mapping): Specifies the transport method used by Zephyr MCUmgr for OTA updates. By default, Bluetooth Low Energy (`ble: true`) is enabled. | ||
|
|
||
| ## `transport` | ||
|
|
||
| Zephyr MCUmgr can operate over multiple transport protocols, which are selected via configuration options. | ||
|
|
||
| ```yaml | ||
| # Example configuration entry | ||
| ota: | ||
| - platform: zephyr_mcumgr | ||
| transport: | ||
| ble: true | ||
| hardware_uart: CDC | ||
| ``` | ||
|
|
||
| ### Configuration variables | ||
|
|
||
| - **ble** (*Optional*, boolean): Enable Bluetooth Low Energy transport for MCUmgr OTA. Default `false`. | ||
| - **hardware_uart** (*Optional*, enum): Select a hardware UART interface to use for MCUmgr OTA communication. This is used when updating devices over a serial interface rather than BLE. Options: `CDC`, `CDC1`, `UART0`, `UART1`. | ||
|
|
||
| ## Usage | ||
|
|
||
| To connect and update the device over BLE: | ||
|
|
||
| ```bash | ||
| esphome upload h.yaml --device BLE | ||
| ``` | ||
|
|
||
| Or connect to a specific BLE address: | ||
|
|
||
| ```bash | ||
| esphome upload h.yaml --device 00:11:22:33:44:55 | ||
| ``` | ||
|
|
||
| To connect and update the device over serial: | ||
|
|
||
| ```bash | ||
| esphome upload h.yaml | ||
| ``` | ||
|
|
||
| Or connect to a specific serial: | ||
|
|
||
| ```bash | ||
| esphome upload h.yaml --device /dev/ttyACM0 | ||
| ``` | ||
|
|
||
| ## See Also | ||
|
|
||
| - {{< apiref "ota/ota_component.h" "ota/ota_component.h" >}} | ||
| - {{< docref "/components/ota" >}} | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we improve the documentation on what we need around MCUboot? Most of what I read suggests that we only need slot0 partition but I suspect we need at least two slots for MCUBoot? My nice!nano nRF52 currently has an Adarfruit boot loader and I'm not certain what is required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Best if you could open a PR with redaction of the doc. Push to this branch or just open new PR. I can link it to main PR.
nrf52doc could be improved in few places but I have no much time to think about it.In the nut shell you need:
By default it use slot0 and slot1. https://docs.nordicsemi.com/bundle/ncs-latest/page/mcuboot/readme-zephyr.html