在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;
}
[您好,请检查此链接,了解适用于Esp8266的OTA编程它对我有用