✖ Update failed
Closed this issue · 4 comments
Hi,
I am trying to install updates on my ESP8266 ESP-01E Over-the-Air but it always fails like this:
homie-ota log file
2016-04-27 23:40:05,862 INFO Starting homie-ota
2016-04-27 23:40:05,862 INFO INFO MODE
2016-04-27 23:40:05,863 DEBUG DEBUG MODE
2016-04-27 23:40:05,863 DEBUG INIFILE = homie-ota.ini
2016-04-27 23:40:05,865 DEBUG Attempting connection to MQTT broker at localhost:1883...
2016-04-27 23:40:05,907 DEBUG devices/13c8f3e0/$online (qos=0, r=1) true
2016-04-27 23:40:05,907 DEBUG devices/13c8f3e0/$nodes (qos=0, r=1) light:switch
2016-04-27 23:40:05,907 DEBUG devices/13c8f3e0/$name (qos=0, r=1) ESP8266
2016-04-27 23:40:05,907 DEBUG devices/13c8f3e0/$localip (qos=0, r=1) 192.168.178.37
2016-04-27 23:40:05,907 DEBUG devices/13c8f3e0/$fwname (qos=0, r=1) test-firmware
2016-04-27 23:40:05,907 DEBUG devices/13c8f3e0/$fwversion (qos=0, r=1) 1.0.0
2016-04-27 23:40:05,908 DEBUG devices/13c8f3e0/$signal (qos=0, r=1) 56
2016-04-27 23:40:05,908 DEBUG devices/13c8f3e0/$uptime (qos=0, r=1) 5
2016-04-27 23:40:18,600 INFO OTA request sent to device 13c8f3e0 for update to test-firmware@1.0.1
2016-04-27 23:40:18,601 DEBUG devices/13c8f3e0/$ota (qos=0, r=0) f04c442713@1.0.1
2016-04-27 23:40:23,976 DEBUG X-Esp8266-Ap-Mac = 5E:CF:7F:13:C8:F3
2016-04-27 23:40:23,976 DEBUG Content-Length =
2016-04-27 23:40:23,976 DEBUG X-Esp8266-Free-Space = 77824
2016-04-27 23:40:23,976 DEBUG X-Esp8266-Chip-Size = 1048576
2016-04-27 23:40:23,976 DEBUG X-Esp8266-Sdk-Version = 1.5.2(7eee54f4)
2016-04-27 23:40:23,976 DEBUG Host = 192.168.178.34
2016-04-27 23:40:23,976 DEBUG X-Esp8266-Sketch-Size = 359132
2016-04-27 23:40:23,976 DEBUG X-Esp8266-Sta-Mac = 5C:CF:7F:13:C8:F3
2016-04-27 23:40:23,976 DEBUG User-Agent = ESP8266-http-Update
2016-04-27 23:40:23,976 DEBUG Connection = close
2016-04-27 23:40:23,976 DEBUG X-Esp8266-Mode = sketch
2016-04-27 23:40:23,976 DEBUG X-Esp8266-Version = 13c8f3e0=test-firmware=1.0.0=f04c442713@1.0.1
2016-04-27 23:40:23,976 DEBUG Content-Type = text/plain
2016-04-27 23:40:23,976 INFO Homie firmware=test-firmware, have=1.0.0, want=f04c442713@1.0.1 on device=13c8f3e0
2016-04-27 23:40:23,977 INFO Returning OTA firmware ./firmwares/test-firmware-1.0.1.bin
2016-04-27 23:40:29,284 DEBUG devices/13c8f3e0/$online (qos=0, r=0) true
2016-04-27 23:40:29,328 DEBUG devices/13c8f3e0/$nodes (qos=0, r=0) light:switch
2016-04-27 23:40:29,331 DEBUG devices/13c8f3e0/$name (qos=0, r=0) ESP8266
2016-04-27 23:40:29,335 DEBUG devices/13c8f3e0/$localip (qos=0, r=0) 192.168.178.37
2016-04-27 23:40:29,338 DEBUG devices/13c8f3e0/$fwname (qos=0, r=0) test-firmware
2016-04-27 23:40:29,342 DEBUG devices/13c8f3e0/$fwversion (qos=0, r=0) 1.0.0
2016-04-27 23:40:29,389 DEBUG devices/13c8f3e0/$signal (qos=0, r=0) 60
2016-04-27 23:40:29,391 DEBUG devices/13c8f3e0/$uptime (qos=0, r=0) 5
homie-ota output on console
192.168.178.21 - - [27/Apr/2016 23:40:18] "POST /update HTTP/1.1" 200 69
192.168.178.37 - - [27/Apr/2016 23:40:30] "GET /ota HTTP/1.0" 200 49152
Traceback (most recent call last):
File "/usr/lib/python2.7/wsgiref/handlers.py", line 86, in run
self.finish_response()
File "/usr/lib/python2.7/wsgiref/handlers.py", line 128, in finish_response
self.write(data)
File "/usr/lib/python2.7/wsgiref/handlers.py", line 217, in write
self._write(data)
File "/usr/lib/python2.7/socket.py", line 324, in write
self.flush()
File "/usr/lib/python2.7/socket.py", line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
192.168.178.37 - - [27/Apr/2016 23:40:30] "GET /ota HTTP/1.0" 500 59
Exception happened during processing of request from ('192.168.178.37', 17833)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 295, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 321, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 657, in init
self.finish()
File "/usr/lib/python2.7/SocketServer.py", line 716, in finish
self.wfile.close()
File "/usr/lib/python2.7/socket.py", line 279, in close
self.flush()
File "/usr/lib/python2.7/socket.py", line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
Serial Monitor Arduino
✴ OTA available (version f04c442713@1.0.1)
Flagged for OTA
Device is in a resettable state
↻ Rebooting into OTA mode...
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 1264, room 16
tail 0
chksum 0x0f
csum 0x0f
~ld
Triggering HOMIE_OTA_MODE event...
** Booting into OTA mode **
↕ Connecting to Wi-Fi (attempt 2/3)
✔ Connected to Wi-Fi
Starting OTA...
✖ Update failed
↻ Rebooting into normal mode...
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 1264, room 16
tail 0
chksum 0x0f
csum 0x0f
~ld
Triggering HOMIE_NORMAL_MODE event...
** Booting into normal mode **
Is there anything I can do about it?
Thanks for your help and this great peace of software!
I have seen this myself on occasion, it looks to me like the device does not have a very good connection to your WiFi AP and drops/loses the connection midway thru the firmware download.
Connecting to Wi-Fi (attempt 2/3)
looks to me like it is on the threshold of being a usable connection perhaps?
As I say I have seen this exact error, but after a couple of attempts the update eventually goes thru. Not much we can do from the homie-ota
side if the device is dropping the connection unfortunately.
Can you try moving the device closer to the AP and see if this helps?
I moved the device so the signal is on 100, but even trying different times it didn't work out.
Also using other OTA-solutions failed with the same result. Looks like I am facing a Hardware-issue here.
Thanks for looking into this and keep up the good work! 👍
Thanks for the report. If you do then find out what the issue was, we'd appreciate a note; it may help us or others in future.
Just as an update: I finally managed to do FOTA on several ESP-01/12s. I had to adjust my Arduino IDE settings to the values mentioned here: https://github.com/arendst/Sonoff-MQTT-OTA-Arduino#compile-and-upload
The defaults for the Generic ESP8266 module were different in their Flash Mode/Size settings.