Q: 为什么云端升级 (OTA) 在更新 SDK 后会失败?
目前云端升级分为三个步骤,
步骤一:发送 HEAD 指令到云端服务器,询问待升级的 bin 文件长度,服务器回复的 HTTP 包头中要求带有 bin 文件的长度信息。
步骤二:根据步骤一查询到的长度,在 ESP8266 模块的 Flash 待升级区域,擦除该指定长度 (spi_flash_erase_sector),等待下载。
步骤三:发送 GET 指令,从服务器下载 bin 文件,写入到 Flash 的待升级区域。
因此,如果开发者使用自己的服务器,则要求服务器支持步骤一中返回 bin 文件长度信息的功能,和步骤三下载 bin 文件的功能,否则无法进行云端升级。
另请注意,user1.bin 和 user2.bin 应该是不同的两个 bin 文件,编译步骤:
1. 编译 user1.bin
2. make clean 清除上次编译生成的临时文件
3. 与步骤 1 中的其他编译选项均一致,区别仅在于选择编译 user2
不能运行 user1.bin 又下载 user1.bin,应该是运行 user1.bin 下载 user2.bin;运行 user2.bin 下载 user1.bin。
Q: 为什么云端升级 (OTA) 在更新 SDK 后会失败?
Who is online
Users browsing this forum: No registered users and 1 guest
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.