1.. _ota: 2 3Over-the-Air Update 4################### 5 6Overview 7******** 8 9Over-the-Air (OTA) Update is a method for delivering firmware updates to remote 10devices using a network connection. Although the name implies a wireless 11connection, updates received over a wired connection (such as Ethernet) 12are still commonly referred to as OTA updates. This approach requires server 13infrastructure to host the firmware binary and implement a method of signaling 14when an update is available. Security is a concern with OTA updates; firmware 15binaries should be cryptographically signed and verified before upgrading. 16 17The :ref:`dfu` section discusses upgrading Zephyr firmware using MCUboot. The 18same method can be used as part of OTA. The binary is first downloaded 19into an unoccupied code partition, usually named ``slot1_partition``, then 20upgraded using the :ref:`mcuboot` process. 21 22Examples of OTA 23*************** 24 25Golioth 26======= 27 28`Golioth`_ is an IoT management platform that includes OTA updates. Devices are 29configured to observe your available firmware revisions on the Golioth Cloud. 30When a new version is available, the device downloads and flashes the binary. In 31this implementation, the connection between cloud and device is secured using 32TLS/DTLS, and the signed firmware binary is confirmed by MCUboot before the 33upgrade occurs. 34 351. A working sample can be found on the `Golioth Firmware SDK repository`_ 362. The `Golioth OTA documentation`_ includes complete information about the 37 versioning process 38 39Eclipse hawkBit |trade| 40======================= 41 42`Eclipse hawkBit`_ |trade| is an update server framework that uses polling on a 43REST api to detect firmware updates. When a new update is detected, the binary 44is downloaded and installed. MCUboot can be used to verify the signature before 45upgrading the firmware. 46 47There is a :zephyr:code-sample:`hawkbit-api` sample included in the 48Zephyr :zephyr:code-sample-category:`mgmt` section. 49 50UpdateHub 51========= 52 53`UpdateHub`_ is a platform for remotely updating embedded devices. Updates can 54be manually triggered or monitored via polling. When a new update is detected, 55the binary is downloaded and installed. MCUboot can be used to verify the 56signature before upgrading the firmware. 57 58There is an :zephyr:code-sample:`updatehub-fota` sample included in the Zephyr 59:zephyr:code-sample-category:`mgmt` section. 60 61SMP Server 62========== 63 64A Simple Management Protocol (SMP) server can be used to update firmware via 65Bluetooth Low Energy (BLE) or UDP. :ref:`mcu_mgr` is used to send a signed 66firmware binary to the remote device where it is verified by MCUboot before the 67upgrade occurs. 68 69There is an :zephyr:code-sample:`smp-svr` sample included in the Zephyr 70:zephyr:code-sample-category:`mgmt` section. 71 72Lightweight M2M (LWM2M) 73======================= 74 75The :ref:`lwm2m_interface` protocol includes support for firmware update via 76:kconfig:option:`CONFIG_LWM2M_FIRMWARE_UPDATE_OBJ_SUPPORT`. Devices securely 77connect to an LwM2M server using DTLS. A :zephyr:code-sample:`lwm2m-client` sample is 78available but it does not demonstrate the firmware update feature. 79 80.. _MCUboot bootloader: https://mcuboot.com/ 81.. _Golioth: https://golioth.io/ 82.. _Golioth Firmware SDK repository: https://github.com/golioth/golioth-firmware-sdk/tree/main/examples/zephyr/fw_update 83.. _Golioth OTA documentation: https://docs.golioth.io/device-management/ota 84.. _Eclipse hawkBit: https://www.eclipse.org/hawkbit/ 85.. _UpdateHub: https://updatehub.io/ 86