Issue with HTTP_UPDATE
Posted: Sat Aug 06, 2016 12:18 am
I am using a 12f and attempting to get HTTP Update sorted. I have asked for help with it on Github but it seems more active here. With the following code I am getting:
HTTP_UPDATE_FAILED Error (-1): HTTP error: connection refused
I have removed any HTACCESS redirects on that folder and the SHA1 is correct, any ideas guys, getting pretty frustrated with this one At the moment the page in question is just returning the NO UPDATES header yet it is returning connection denied.
HTTP_UPDATE_FAILED Error (-1): HTTP error: connection refused
Code: Select all
void setup() {
Serial.begin(9600);
delay(10);
Serial.println(F("System Initiating..."));
client.setServer(mqtt_server,mqttPort);
pinMode(powerPin, OUTPUT);
readSpiffs();
if ( esid != "" ) {
WiFi.begin(esid.c_str(), epass.c_str());
if (checkWifiConnection()) {
serverType = "WC";
Serial.println(F("Successfully connected to WiFi"));
t_httpUpdate_return ret = ESPhttpUpdate.update("https://iot.techbubbletechnologies.com/updates/updater.php","","E1 D2 56 D8 9B 14 F2 8E 3D 36 D9 35 BC B3 4F 19 45 C1 97 98");
switch(ret) {
case HTTP_UPDATE_FAILED:
Serial.printf("HTTP_UPDATE_FAILD Error (%d): %s", ESPhttpUpdate.getLastError(), ESPhttpUpdate.getLastErrorString().c_str());
Serial.println("");
break;
case HTTP_UPDATE_NO_UPDATES:
Serial.println("HTTP_UPDATE_NO_UPDATES");
break;
case HTTP_UPDATE_OK:
Serial.println("HTTP_UPDATE_OK");
break;
}
long rssi = WiFi.RSSI();
digitalWrite(powerPin, HIGH);
delay(1000);
dht.begin();
delay(2);
return;
}
}
I have removed any HTACCESS redirects on that folder and the SHA1 is correct, any ideas guys, getting pretty frustrated with this one At the moment the page in question is just returning the NO UPDATES header yet it is returning connection denied.