Skip to content

nRF52 Firmware Updates

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. Firmware updates are also available via the ESPHome command-line interface. For flashing over BLE, the MCUmgr Web Tool provides a convenient browser-based interface.

In addition to OTA updates, ESPHome also supports a “safe mode” to help with recovery if/when updates don’t work as expected. This is automatically enabled by this component, but it may be disabled if desired. See Safe Mode for details.

# Example configuration entry
ota:
- platform: zephyr_mcumgr
  • transport (Optional, mapping): Specifies the transport method used by Zephyr MCUmgr for OTA updates. By default, Bluetooth Low Energy (ble: true) is enabled.

Zephyr MCUmgr can operate over multiple transport protocols, which are selected via configuration options.

# Example configuration entry
ota:
- platform: zephyr_mcumgr
transport:
ble: true
hardware_uart: CDC
  • 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.

To connect and update the device over BLE:

Terminal window
esphome upload nrf52_device.yaml --device BLE

Or connect to a specific BLE address:

Terminal window
esphome upload nrf52_device.yaml --device 00:11:22:33:44:55

To connect and update the device over serial:

Terminal window
esphome upload nrf52_device.yaml

Or connect to a specific serial:

Terminal window
esphome upload nrf52_device.yaml --device /dev/ttyACM0