diff --git a/content/components/_index.md b/content/components/_index.md index 2944f894a7..530bd7ce17 100644 --- a/content/components/_index.md +++ b/content/components/_index.md @@ -147,6 +147,7 @@ Install updates over-the-air (OTA). "OTA Core","components/ota/index","system-update.svg","dark-invert" "OTA Updates","components/ota/esphome","system-update.svg","dark-invert" "OTA Updates via HTTP Request","components/ota/http_request","system-update.svg","dark-invert" +"OTA Updates for nRF52","components/ota/zephyr_mcumgr","system-update.svg","dark-invert" {{< /imgtable >}} ## Update Management diff --git a/content/components/ota/_index.md b/content/components/ota/_index.md index 63c9ac7343..19d008dd42 100644 --- a/content/components/ota/_index.md +++ b/content/components/ota/_index.md @@ -20,6 +20,7 @@ Available platforms: - **esphome**: The default OTA method using ESPHome's native protocol (used by the dashboard and CLI) - **http_request**: Pull firmware updates from a remote web server - **web_server**: Enable firmware uploads through the device's web interface +- **zephyr_mcumgr**: Enable firmware upload support for the `nRF52` platform ```yaml # Example configuration entry diff --git a/content/components/ota/zephyr_mcumgr.md b/content/components/ota/zephyr_mcumgr.md new file mode 100644 index 0000000000..d2d460b851 --- /dev/null +++ b/content/components/ota/zephyr_mcumgr.md @@ -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" >}}