Hi,
I’m using different ESPs (NodeMCU, …) all over the house. They run a custom piece of code with customization for the purpose. OTA works for all of them meanwhile.
The SONOFF Mini is different - it has 1MB flash only and OTA fails
Device info
./esptool.py --port /dev/ttyS15 flash_id esptool.py v2.2.1 Connecting.... Detecting chip type... ESP8266 Chip is ESP8285 Uploading stub... Running stub... Stub running... Manufacturer: 51 Device: 4014 Detected flash size: 1MB
Flashing via cable works
./esptool.py --port /dev/ttyS15 write_flash -fm dout -fs 1MB 0x0 firmware.$ip.bin
esptool.py v2.3-dev
Connecting…
Detecting chip type… ESP8266
Chip is ESP8285
Uploading stub…
Running stub…
Stub running…
Configuring flash size…
Flash params set to 0x0320
Compressed 329008 bytes to 233983…
Wrote 329008 bytes (233983 compressed) at 0x00000000 in 21.0 seconds (effective 125.6 kbit/s)…
Hash of data verified.
OTA fails - [error 8] on serial console
while true; do python2 ./espota.py -d -i $ip -p 8266 --auth=PASS -f firmware.$ip.bin -d -r -s; RC=$?; if [ “$RC” == “0” ]; then break; fi ; sleep 1;echo; done
17:48:31 [DEBUG]: Options: {‘esp_ip’: ‘192.168.177.34’, ‘host_port’: 55888, ‘image’: ‘firmware.192.168.177.34.bin’, ‘host_ip’: ‘0.0.0.0’, ‘auth’: ‘PASS’, ‘esp_port’: 8266, ‘spiffs’: True, ‘debug’: True, ‘progress’: True}
17:48:31 [INFO]: Starting on 0.0.0.0:55888
17:48:31 [INFO]: Upload size: 329008
17:48:31 [INFO]: Sending invitation to: 192.168.177.34
Authenticating…OK
17:48:31 [INFO]: Waiting for device…
Uploading: [== ] 3%
17:48:31 [ERROR]: Error Uploading17:48:33 [DEBUG]: Options: {‘esp_ip’: ‘192.168.177.34’, ‘host_port’: 58148, ‘image’: ‘firmware.192.168.177.34.bin’, ‘host_ip’: ‘0.0.0.0’, ‘auth’: ‘PASS’, ‘esp_port’: 8266, ‘spiffs’: True, ‘debug’: True, ‘progress’: True}
17:48:33 [INFO]: Starting on 0.0.0.0:58148
17:48:33 [INFO]: Upload size: 329008
17:48:33 [INFO]: Sending invitation to: 192.168.177.34
Authenticating…OK
17:48:33 [INFO]: Waiting for device…
Uploading: [=== ] 4%
17:48:33 [ERROR]: Error Uploading17:48:34 [DEBUG]: Options: {‘esp_ip’: ‘192.168.177.34’, ‘host_port’: 47630, ‘image’: ‘firmware.192.168.177.34.bin’, ‘host_ip’: ‘0.0.0.0’, ‘auth’: ‘PASS’, ‘esp_port’: 8266, ‘spiffs’: True, ‘debug’: True, ‘progress’: True}
17:48:34 [INFO]: Starting on 0.0.0.0:47630
17:48:34 [INFO]: Upload size: 329008
17:48:34 [INFO]: Sending invitation to: 192.168.177.34
Authenticating…OK
17:48:34 [INFO]: Waiting for device…
Uploading: [=== ] 4%
17:48:34 [ERROR]: Error Uploading
I’ve had error 8 earlier on another device and fixed it by using " -fs 4MB" on initial flash via cable.
However, the Mini doesn’t have that 4MB. On the other hand, the firmware seems to be 350kb only - so two versions of that should fit?
I’m guessing that I miss something - help is appreciated. What’s the FW size I’d need to shrink to - and how?
I’ve also flashed my SONOFF Mini with Tasmota - upgrading via WebUI works if i use the minimal image - which is similar in size to my customer FW.
Cheers,
Alex