Hi @Martin_Harizanov; just closing the loop on this. Apologies for the delay, I had to make sure I had alternative firmware ready and time to sort it out before messing with the OEM firmware, just in case.
I was able to backup the original firmware (using Win10x64 PowerShell as Admin) with:
python esptool.py --port COM3 --baud 115200 read_flash 0x00000 0x400000 oem_v2609.bin
I then successfully uploaded and used custom firmware (using PlatformIO).
Attempting to reflash the OEM firmware using the command from the wiki page failed with the following response:
PS C:\Users\Denis\Documents\Git\esptool> python esptool.py --port COM3 --baud 460800 write_flash --flash_freq 80m --flas
h_mode qio --flash_size 16m-c1 0x1000 oem_v2609.bin
WARNING: Flash size arguments in megabits like '16m-c1' are deprecated.
Please use the equivalent size '2MB-c1'.
Megabit arguments may be removed in a future release.
esptool.py v2.0-beta1
Connecting....
Detecting chip type... ESP8266
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Attaching SPI flash...
Configuring flash size...
A fatal error occurred: File oem_v2609.bin (length 4194304) at offset 4096 will not fit in 2097152 bytes of flash. Use --flash-size argument, or change flashing address.
However I was able to successfully reflash the backed up firmware using:
python esptool.py --port COM3 --baud 460800 write_flash --flash_freq 80m --flash_mode dio 0x00000 oem_v2609.bin
Which returned an error after flashing, but was all back to working fine after cycling the power:
PS C:\Users\Denis\Documents\Git\esptool> python esptool.py --port COM3 --baud 460800 write_flash --flash_freq 80m --flas
h_mode dio 0x00000 oem_v2609.bin
esptool.py v2.0-beta1
Connecting....
Detecting chip type... ESP8266
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Attaching SPI flash...
Configuring flash size...
Auto-detected Flash size: 4MB
Flash params set to 0x024f
Compressed 4194304 bytes to 307265...
Wrote 4194304 bytes (307265 compressed) at 0x00000000 in 7.2 seconds (effective 4674.6 kbit/s)...
A fatal error occurred: Timed out waiting for packet header
I did have to connect to the AP and reconfigure wifi, but after that all settings were as they were at the time of backup.
So backup and restore works, more like reimaging an entire hard disk than backing up individual partitions.
Whilst your firmware would be a fantastic start to further tinkering, setting up an ESP8266 build environment for C in Windows was killing me, so I’m playing with others written in C++/Arduino using PlatformIO instead.
Best regards,
Denis.