OTA Update

Last Updated on : 2024-05-14 08:00:15download

This topic describes how to update firmware over-the-air (OTA).

Background

An OTA update is the wireless delivery of new software, firmware, or other data to connected IoT devices.

The MCU SDK for gateway enables you to update the firmware on the MCU and the sub-device by using the OTA technology.

To deploy an update, you need to upload the firmware updates to the Tuya IoT Development Platform. Then, the module can download the file from Tuya’s server and transmit the update file to the MCU through the serial protocol. This way, the MCU can get the updates and process them according to your implemented logic.

For more information, see Update Firmware and Select and Change the Firmware Version.

This topic describes how the device interacts with the cloud during an OTA update process.

Serial protocol for OTA update

The update procedure works for both the MCU on the gateway and the sub-devices connected to the gateway. The module on the gateway downloads the updates and then transmits them to the MCU through serial communication. There are no requirements for the update method for the sub-devices and the MCU.

Sequence diagram for MCU firmware update

OTA Update

Sequence diagram for sub-device firmware update

The update sequence for the sub-devices is much the same as the one for the MCU except for the adopted commands.

OTA Update

Serial communication between module and MCU

The following diagram shows how the transfer of the update works. Based on this, you can implement the firmware update logic on your terms.

OTA Update