Internet of Things IOT Firmware Upgrade

foreword

In the manufacture of smart devices, after the products are sold, users will encounter various problems in the process of using the products, and some problems need to be solved through firmware upgrades. In our physical network cloud platform, there was a firmware upgrade function, but there were various problems. In this context, I need to carry out overall optimization and transformation of the firmware upgrade function as a product.

what is firmware

A kind of software, or something between software and hardware, is a bridge between software and hardware, and the machine can directly control the hardware through firmware ( firmware is responsible for the identification of hardware by software ). Most electronic products require firmware to function properly.

Firmware upgrade needs to be cautious

Sometimes in order to increase product functions or fix bugs, it is necessary to upgrade the firmware. For example: upgrade the BIOS board so that the motherboard supports the CPU of the same slot.

However, you need to be cautious when upgrading the firmware, because if the device is powered off during the upgrade process and the firmware upgrade fails, the device may become "bricked" forever and cannot be solved by upgrading the firmware again. Because the premise of firmware upgrade is to have normal firmware and tell the system how to upgrade. If the upgrade fails, people may need to re-burn it through tools. Normal users do not have this ability.

Of course, some firmware cannot be upgraded, such as stored in ROM, which is a read-only chip.

How does the application layer support firmware upgrades?

overview

Here we mainly talk about how to design firmware upgrades that are biased towards the application layer. Users need to use a system to manage firmware, upgrade distribution, record monitoring and other needs, so FOTA came into being.

The core logic of firmware upgrade is to push the firmware package to the device , and finally complete the firmware upgrade operation in the device.

In the process of pushing the firmware package, there are different communication methods depending on the product type and the actual business:

  • Wired communication technology

Ethernet, RS-232, RS-485, M-Bus, PLS, etc.

  • wireless communication technology

Bluetooth, cellular mobile communication (2G/3G/4G), WIFI, ZigBee, Zwave, etc.

Collaboration between each system

Upgrading via Bluetooth requires three terminals to be synchronized, namely: the APP terminal, the upgrade device terminal, and the cloud server terminal.

 

Main upgrade process

According to the FOTA model, the optimized firmware upgrade system, the product process is divided into the following parts:

1. Upload the firmware package

Upload the firmware package to the cloud platform, and manually define the firmware package, such as adding version number, supporting device upgrade, version description, etc.

2. Firmware package merge

Because each device contains multiple firmwares, the actual business can only upgrade multiple firmwares in the device uniformly, so there is a link of firmware package merging.

3. Create an upgrade task

Select the firmware package that needs to be delivered and upgrade, and complete the pre-steps of upgrading the firmware package through task configuration. For example, define the upgradeable time, specify the device SN, specify a specific user to upgrade, etc.

4. Perform the upgrade steps

Execution of the upgrade step is finally carried out. For example, in the upgrade task, if the Bluetooth upgrade is selected, the user approaches the device and connects the device via Bluetooth on the APP, then downloads the firmware upgrade package from the cloud server to the APP, and transmits it to the device through the APP Bluetooth to complete the upgrade task.

Guess you like

Origin blog.csdn.net/weixin_48181168/article/details/126227147