需要Arduino/ESP32的示例代码来通过http或ftp下载.bin文件进行OTA更新

问题描述 投票:0回答:1

我有很多 ESP32 设备分发给我的客户端,但手动更新代码并不容易。 最好的办法是让Arduino通过http下载(通过指令).bin文件并使用OTA自行更新。 谁能给我一个代码示例

  1. 通过http下载.bin文件(请不要使用ESP作为WEB服务器)
  2. 解压.bin文件并更新代码

谢谢你

arduino iot esp32 ota
1个回答
0
投票

这里有一些教程的链接,可以满足您的需求。

Renzo Mischianti 的一些教程。

另一个例子是 ESP8266/ESP32 的 AutoConnect 库 在“OTA 更新”->“使用更新服务器的 OTA”部分中 https://hieromon.github.io/AutoConnect/otaupdate.html

最后是 Espressif Arduino-esp32 更新库示例: https://github.com/espressif/arduino-esp32/tree/master/libraries/Update/examples https://hieromon.github.io/AutoConnect/otaserver.html

© www.soinside.com 2019 - 2024. All rights reserved.