-
Notifications
You must be signed in to change notification settings - Fork 13.3k
HTTP_UPDATE_FAILD Error (-5): HTTP error: connection lost #6256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The basic example clearly shows an http url, while github requires https, i. e. secure. Therefore that example won't work in your case. You have to use a WiFiClientSecure client, and set it up correctly before passing it as arg to the updater. |
Hi, I'm using the same example of httpUpdate and I get wrong http code the server link is this: http://qualitysystems.com.co/Blink.bin I searched the internet and found this 2016 post #2022 I tried what it says but it did not work for me. I do not know what else to do to solve this problem. |
@Jhony9625: I assume the error is reported in file |
@Jhony9625 I have resolved the issue. I was passing a https address to http_update method. it won't work without ssl certificates fingerprint. Try to give it local server address running on your pc. like http://192.168.0.12/Blink.bin |
I was able to solve it, I leave the link they gave me the solution. Thank you all |
Hello All,
I am trying to update my firmware for NodeMCU through OTA. I am using the basic HTTP_UPDATE example code given in arduino. The Bin File is placed on Github and trying to download that and upload it to the board.
Platform
Settings in IDE
/**
httpUpdate.ino
*/
#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESP8266WiFiMulti.h>
#include <ESP8266HTTPClient.h>
#include <ESP8266httpUpdate.h>
#define USE_SERIAL Serial
#ifndef APSSID
#define APSSID "Akhtar"
#define APPSK "akhtar1234"
#endif
ESP8266WiFiMulti WiFiMulti;
void setup() {
USE_SERIAL.begin(115200);
// USE_SERIAL.setDebugOutput(true);
USE_SERIAL.println();
USE_SERIAL.println();
USE_SERIAL.println();
for (uint8_t t = 4; t > 0; t--) {
USE_SERIAL.printf("[SETUP] WAIT %d...\n", t);
USE_SERIAL.flush();
delay(1000);
}
WiFi.mode(WIFI_STA);
WiFiMulti.addAP(APSSID, APPSK);
}
void loop() {
// wait for WiFi connection
if ((WiFiMulti.run() == WL_CONNECTED)) {
}
}
Debug Messages
The text was updated successfully, but these errors were encountered: