ESP8266 OTA funktioniert nicht

#5625107
Lesenswert?

Hallo,
Ich habe ein ESP8266 Modul, ESP-03 mit 4M Flash (512KByte). Ich habe in 
der Arduino IDE ein Beispiel program per UART programmiert. Das Program 
funktioniert, also das Modul bekommt eine IP Adresse, webserver 
funktioniert wenn ich auf dem Browser die IP Adresse von ESP eingebe. 
Allerdings funktioniert die Update-Funktionalität nicht. Ich gehe auf 
update-Seite und wähle eine kompilierte bin Datei und drücke Update 
Knopf, bekomme ich nur "FAIL" im webbrowser. Im Serialkonsol bekomme ich 
keine Fehlermeldung.

Beispielkode Webupdater:
1
/*
2
  To upload through terminal you can use: curl -F "image=@firmware.bin" esp8266-webupdate.local/update
3
*/
4

5
#include <ESP8266WiFi.h>
6
#include <WiFiClient.h>
7
#include <ESP8266WebServer.h>
8
#include <ESP8266mDNS.h>
9
#include <ESP8266HTTPUpdateServer.h>
10

11
const char* host = "esp8266-webupdate";
12
const char* ssid = "Meine SSID"; // Echte SSID ist unterdrückt
13
const char* password = "Passwort"; // Echte PW ist unterdrückt
14

15
ESP8266WebServer httpServer(80);
16
ESP8266HTTPUpdateServer httpUpdater;
17

18
void setup(void){
19

20
  Serial.begin(115200);
21
  Serial.println();
22
  Serial.println("Booting Sketch...");
23
  WiFi.mode(WIFI_AP_STA);
24
  WiFi.begin(ssid, password);
25

26
  while(WiFi.waitForConnectResult() != WL_CONNECTED){
27
    WiFi.begin(ssid, password);
28
    Serial.println("WiFi failed, retrying.");
29
  }
30

31
  Serial.println("");
32
  Serial.print("Connected to ");
33
  Serial.println(ssid);
34
  Serial.print("IP address: ");
35
  Serial.println(WiFi.localIP());
36

37
  MDNS.begin(host);
38

39
  httpUpdater.setup(&httpServer);
40
  httpServer.begin();
41

42
  MDNS.addService("http", "tcp", 80);
43
  Serial.printf("HTTPUpdateServer ready! Open http://%s.local/update in your browser\n", host);
44
}
45

46
void loop(void){
47
  httpServer.handleClient();
48
  delay(1);
49
}

Serial Konsol:
1
 ets Jan  8 2013,rst cause:1, boot mode:(3,0)
2

3
load 0x4010f000, len 1264, room 16 
4
tail 0
5
chksum 0x0f
6
csum 0x0f
7
~ld
8

9
Booting Sketch...
10

11
Connected to [Mein wifi-ssid]
12
IP address: 192.168.0.227
13
HTTPUpdateServer ready! Open http://esp8266-webupdate.local/update in your browser
Angehängte Dateien:

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren