BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

How to Backup & Restore Official Firmware on any Espressif ESP8266 & ESP32

  1. Download and install Python 2.x or 3.x from https://www.python.org/downloads
  2. Download Esptool from https://github.com/espressif/esptool/releases.
  3. Extract the contents of esptool compressed file to c:\esptool.
  4. Open Command Prompt ( Start > Run > cmd ) and navigate to esptool folder cd c:/esptool .

Install the esptool by issuing the commands below.

python setup.py install

pip install pyserial

Change COM3 to your own Port

For  1M Flash:
python esptool.py -b 115200 --port COM3 read_flash 0x000000 0x100000 flash_1M.bin 
python esptool.py -b 115200 --port COM3 write_flash --flash_freq 80m 0x000000 flash_1M.bin 

For  4M Flash:
python esptool.py -b 115200 --port COM3 read_flash 0x00000 0x400000 flash_4M.bin
python esptool.py -b 115200 --port COM3 write_flash --flash_freq 80m 0x000000 flash_4M.bin

that is all
you should get something like this for the 4M flash

D:\SONOFF\ESPTool\esptool-2.6\esptool-2.6>python esptool.py -b 115200 --port COM3 read_flash 0x00000 0x400000 flash_4M.bin
esptool.py v2.6
Serial port COM3
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
MAC: 80:7d:3a:33:xx:xx
Uploading stub...
Running stub...
Stub running...
4194304 (100 %)
4194304 (100 %)
Read 4194304 bytes at 0x0 in 402.0 seconds (83.5 kbit/s)...
Hard resetting via RTS pin...

to write flash you need to erase it first by

esptool.py erase_flash

4 Likes

More information

esptool.py

A Python-based, open source, platform independent, utility to communicate with the ROM bootloader in Espressif ESP8266 & ESP32 chips.

esptool.py was started by Fredrik Ahlberg (@themadinventor) as an unofficial community project. It is now also supported by Espressif. Current primary maintainer is Angus Gratton (@projectgus).

esptool.py is Free Software under a GPLv2 license.

2 Likes
  • Take care when you backup, both Sonoff POW and POW R2 have a 4M flash and not 1M .

  • When restoring your device always use the SAME FILE you backed up from that device otherwise it will not work .


another interesting site

1 Like

Flashing ESP8266 Firmware using esptool.py, run on “Linux” with Python 2.7.

Another good video for Windows but in “Thai Language”

this person had many interesting videos related to Blynk you can find here

latest video in our forum @pasagame
**** Earned 'Popular Link’

Another good video showing how to Backup Firmware for ESP32 & ESP8266

3 Likes

@Ze_Pico Thank you.

1 Like