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 entryota: - platform: zephyr_mcumgrConfiguration variables
Section titled “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
Section titled “transport”Zephyr MCUmgr can operate over multiple transport protocols, which are selected via configuration options.
# Example configuration entryota: - platform: zephyr_mcumgr transport: ble: true hardware_uart: CDCConfiguration variables
Section titled “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.
To connect and update the device over BLE:
esphome upload nrf52_device.yaml --device BLEOr connect to a specific BLE address:
esphome upload nrf52_device.yaml --device 00:11:22:33:44:55To connect and update the device over serial:
esphome upload nrf52_device.yamlOr connect to a specific serial:
esphome upload nrf52_device.yaml --device /dev/ttyACM0