Back to Zephyr

Over-the-Air Update

doc/services/device_mgmt/ota.rst

4.4.04.3 KB
Original Source

.. _ota:

Over-the-Air Update ###################

Overview


Over-the-Air (OTA) Update is a method for delivering firmware updates to remote devices using a network connection. Although the name implies a wireless connection, updates received over a wired connection (such as Ethernet) are still commonly referred to as OTA updates. This approach requires server infrastructure to host the firmware binary and implement a method of signaling when an update is available. Security is a concern with OTA updates; firmware binaries should be cryptographically signed and verified before upgrading.

The :ref:dfu section discusses upgrading Zephyr firmware using MCUboot. The same method can be used as part of OTA. The binary is first downloaded into an unoccupied code partition, usually named slot1_partition, then upgraded using the :ref:mcuboot process.

Examples of OTA


Golioth

Golioth_ is an IoT management platform that includes OTA updates. Devices are configured to observe your available firmware revisions on the Golioth Cloud. When a new version is available, the device downloads and flashes the binary. In this implementation, the connection between cloud and device is secured using TLS/DTLS, and the signed firmware binary is confirmed by MCUboot before the upgrade occurs.

  1. A working sample can be found on the Golioth Firmware SDK repository_
  2. The Golioth OTA documentation_ includes complete information about the versioning process

Eclipse hawkBit™

Eclipse hawkBit™_ is an update server framework that uses polling on a REST api to detect firmware updates. When a new update is detected, the binary is downloaded and installed. MCUboot can be used to verify the signature before upgrading the firmware.

There is a :zephyr:code-sample:hawkbit-api sample included in the Zephyr :zephyr:code-sample-category:mgmt section.

UpdateHub

UpdateHub_ is a platform for remotely updating embedded devices. Updates can be manually triggered or monitored via polling. When a new update is detected, the binary is downloaded and installed. MCUboot can be used to verify the signature before upgrading the firmware.

There is an :zephyr:code-sample:updatehub-fota sample included in the Zephyr :zephyr:code-sample-category:mgmt section.

SMP Server

A Simple Management Protocol (SMP) server can be used to update firmware via Bluetooth Low Energy (LE) or UDP. :ref:mcu_mgr is used to send a signed firmware binary to the remote device where it is verified by MCUboot before the upgrade occurs.

There is an :zephyr:code-sample:smp-svr sample included in the Zephyr :zephyr:code-sample-category:mgmt section.

Lightweight M2M (LWM2M)

The :ref:lwm2m_interface protocol includes support for firmware update via :kconfig:option:CONFIG_LWM2M_FIRMWARE_UPDATE_OBJ_SUPPORT. Devices securely connect to an LwM2M server using DTLS. A :zephyr:code-sample:lwm2m-client sample is available but it does not demonstrate the firmware update feature.

mender-mcu

mender-mcu_ enables robust firmware updates on resource-constrained devices by integrating with Zephyr. It implements an Update Module interface and provides a default Update Module that integrates with MCUboot to provide A/B updates. This allows microcontroller units (MCUs) to perform atomic, fail-safe OTA updates with automatic rollback on failure.

See :ref:external_module_mender_mcu for integration details and examples.

Memfault and nRF Cloud powered by Memfault

Memfault_ is a IoT observability platform that includes OTA management. Devices check-in with Memfault's service periodically for an OTA update, and when an update is available, download and install the binary.

See :ref:external_module_memfault_firmware_sdk for overall integration details and examples.

.. _MCUboot bootloader: https://mcuboot.com/ .. _Golioth: https://golioth.io/ .. _Golioth Firmware SDK repository: https://github.com/golioth/golioth-firmware-sdk/tree/main/examples/zephyr/fw_update .. _Golioth OTA documentation: https://docs.golioth.io/device-management/ota .. _Eclipse hawkBit™: https://www.eclipse.org/hawkbit/ .. _UpdateHub: https://updatehub.io/ .. _mender-mcu: https://github.com/mendersoftware/mender-mcu .. _Memfault: https://memfault.com/