当前位置:网站首页>10. Tencent cloud IOT device side learning - firmware upgrade

10. Tencent cloud IOT device side learning - firmware upgrade

2022-06-24 07:43:00 fancyxu

The main purpose of this series is to record the learning notes of Tencent cloud Internet of things device , And on the device side SDK Make a supplementary explanation .

brief introduction

Firmware upgrade

Firmware upgrade is basically a necessary function of IOT devices , The firmware upgrade function is in IoT Hub and IoT Explorer All supported . In fact, it can be seen as two parts :

  • Control messages : Interact with Tencent cloud IOT platform , This includes getting firmware download information , Realize the logic of interaction
  • Firmware data : Interact with Tencent cloud object storage platform , Pull the actual firmware data

The general process is as follows :

Firmware upgrade process

Development considerations

Firmware upgrade is a very sensitive operation , To achieve a stable firmware upgrade, you generally need to do the following :

  • Firmware verification : Developers need to verify the downloaded firmware on the device side ( Not only here md5 check , The equipment supplier's own calibration shall also be included , because md5 Only the correctness of the document can be guaranteed , There is no guarantee that the firmware itself is faulty ), To avoid accidents .
  • Breakpoint continuation : For weak network scenarios or devices with large firmware , You need to do a good job of breakpoint continuation , Ensure the success rate of downloading , That is to save the breakpoint information in the corresponding storage after each download ( It's usually flash in , There are also placed in ram in , Only for breakpoints in the boot scenario ).SDK This feature is already supported .
  • Firmware backup : Routinely , The firmware to be upgraded is stored in the backup area , When the equipment is powered on , Read the firmware from the backup area through the program to upgrade , Because the backup area is read-only , So even if there are abnormal conditions such as power failure in the midway , It can also ensure the availability of the equipment .
  • Multi firmware : In fact, there is no essential difference between multi firmware and single firmware , Because the firmware upgrade is for files , Information can be added to the file to split a single file into multiple firmware . Of course , Another way is to use resources to download ( Subsequent articles will mention ), This is also one of the important features supported by Tencent cloud Internet of things .
原网站

版权声明
本文为[fancyxu]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/06/20210628215309712q.html