A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/esp8266/Arduino/issues/2022 below:

HttpUpdate Example - HTTP_UPDATE_FAILD Error (-104): Wrong HTTP code · Issue #2022 · esp8266/Arduino · GitHub

I have tried to implement the HttpUpdate Example albeit it with a few changes. Here is my sketch:

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**

*/

include "Arduino.h" include "ESP8266WiFi.h" include "ESP8266HTTPClient.h" include "ESP8266httpUpdate.h"

const char* ssid = "ssid";
const char* password = "password";

void setup()
{
// put your setup code here, to run once:
Serial.begin(115200);
delay(100);

// We start by connecting to a WiFi network
Serial.println();
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.print(".");
}

Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
delay(500);

}

void loop()
{

    t_httpUpdate_return ret = ESPhttpUpdate.update("https://rawgit.com/Zyxmn/esp8266_BlinkyBin/master/Blinky.cpp.bin");

    delay(500);
    switch(ret) {
        case HTTP_UPDATE_FAILED:
            Serial.printf("HTTP_UPDATE_FAILD Error (%d): %s", ESPhttpUpdate.getLastError(), ESPhttpUpdate.getLastErrorString().c_str());
            Serial.println();
            Serial.println();
            Serial.println();
            break;

        case HTTP_UPDATE_NO_UPDATES:
            Serial.println("HTTP_UPDATE_NO_UPDATES");
            Serial.println();
            Serial.println();
            break;

        case HTTP_UPDATE_OK:
            Serial.println("HTTP_UPDATE_OK");
            Serial.println();
            Serial.println();
            Serial.println();
            break;
    }
    delay(500);

}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

I get the wrong http code error as mentioned in the title, I tried looking online but could not find anything useful. I was wondering if anyone can help me figure out how to resolve it.

Thanks a lot in advance fellas! Appreciate the help.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4