如何通过HTTPS(ESP8266)进行OTA更新?

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

在esp8266上,如何使用HTTPS从Web服务器更新ESP8266中的bin文件?

我已经尝试过,但是出现了http更新失败错误。

Error debug in Arduino ide serial window

/ Check for a firmware update
  LOG("Checking for firmware, same URL.\r\n");
  Result = ESPhttpUpdate.update(HTTPSURL,Fingerprint);

  // if successful, ESP will restart
  LOG("Oh noes, update failed!\r\nResult:");
  LOG(Result);
  LOG("\r\n");

  switch(Result) {
    case HTTP_UPDATE_FAILED:
        sprintf((char *)Buffer, "Update failed, error %d: %s\r\n", ESPhttpUpdate.getLastError(), ESPhttpUpdate.getLastErrorString().c_str());
        LOG((char *)Buffer);
        break;
    case HTTP_UPDATE_NO_UPDATES:
        LOG("No update available.\r\n");
        break;
    case HTTP_UPDATE_OK:
        LOG("You shouldn't see this message because I should be rebooting :)\r\n");
        break;
  }  
arduino esp8266 ota
1个回答
0
投票

[您好,请检查此链接,了解适用于Esp8266的OTA编程它对我有用

http://www.codestars.in

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