Hello to all. I've programmed the esp8266 by ESP8266WebServer->HelloServer program and AT Command doesn't work any more. How to recovery ESP8266? Very thank you.
You download the right firmware from a chinese web site, hoping they don't do mysterious things in there and then use either their tools if you are on windows or command line with esptool if you are on a mac / linux to re-flash your unit
OK changed computer and went back to my notes
You go to espressif web site: http://bbs.espressif.com in the DOWNLOADS sections you pick the SDKs entry in the page you get, scroll down a bit unless you speak chinese :)
look for the SDK Release for the ESP8266 with a NON OS SDK - name will be like this
[SDK Release] ESP8266_NONOS_SDK_V2.0.0_16_07_19
at the moment that gets you to this page: http://bbs.espressif.com/viewtopic.php?f=46&t=2451
scroll all the way down past the chinese text and in the ATTACHMENTS section you will see that you can download
Then if you are on the PC go back to the main page http://bbs.espressif.com and in the DOWNLOAD section you have a Tools section, go there and go get the Flash Download Tool and associated doc and you can use that to re-flash your ESP.
(Their web site sometimes crashes... so save a copy of the working SDK you like)
if you are on a Unix (Mac, Linux) machine, then you need to download and install esptool.py and do things a bit more manually.
after extracting the right files from the NON OS SDK download, you need to know which files to use and where to write them in flash memory
So you need to find out exactly what type of ESP8266 you have
In order to know which model you have
sudo python ./esptool.py --port /dev/tty.usbserial-A50285BI --baud 115200 flash_id
/dev/tty.usbserial-A50285BI is where my FTDI is connected - what you see in your arduino IDE as the port to talk to your ESP)
That command will only give you a hex manufacturer & chip ID
On my ESP-01 for example I get
———————————————— Manufacturer: c8 Device: 4014 ————————————————
then you go to this web site https://code.coreboot.org/svn/flashrom/trunk/flashchips.h
and find a matching Device
define GIGADEVICE_GD25Q80 0x4014 /* Same as GD25Q80B (which has OTP) */
so I know it's a GIGADEVICE so I went to the site http://www.gigadevice.com/product/detail/5/98.html?locale=en_US an in the data sheet I could see "8M-bit Serial Flash"
In the documentation (go to the uncompressed ZIP to find the file ESP8266_NONOS_SDK_V2.0.0_16_07_19/ESP8266_NONOS_SDK/bin/at_sdio/README.md ) there is some information about where to put which file which looks like this (this one is from an old version)
***********************NON-BOOT MODE*********************** download [color=blue]eagle.flash.bin[/color] [color=purple]0x00000[/color] [color=blue]eagle.irom0text.bin[/color] [color=purple]0x40000[/color] [color=blue]blank.bin[/color] Flash size 4Mbit: 0x3e000 & 0x7e000 [b] Flash size 8Mbit: [color=red]0x7e000[/color] & [color=red]0xfe000[/color] [/b] Flash size 16Mbit: 0x7e000 & 0x1fe000 Flash size 16Mbit-C1: 0xfe000 & 0x1fe000 Flash size 32Mbit: 0x7e000 & 0x3fe000 Flash size 32Mbit-C1: 0xfe000 & 0x3fe000 esp_init_data_default.bin (optional) Flash size 4Mbit: 0x7c000 (not use since at v0.51) Flash size 8Mbit: 0xfc000 Flash size 16Mbit: 0x1fc000 Flash size 16Mbit-C1: 0x1fc000 Flash size 32Mbit: 0x3fc000 Flash size 32Mbit-C1: 0x3fc000 *NOTICE*: UPDATE is not supported in non-boot mode
So now I know which files to use and where they go in flash memory so I need to enter my ESP in flash mode and upload the files
I do a reset, set GPIO 0 HIGH then LOW to go to flash mode and in a terminal I run those commands by doing a reset (pin Low/High on the ESP) in between each command line
sudo python ./esptool.py --port /dev/tty.usbserial-A50285BI --baud 115200 erase_flash [i](here reset your ESP)[/i] sudo python ./esptool.py --port /dev/tty.usbserial-A50285BI --baud 115200 write_flash [color=purple]0x00000[/color] ~/esptool-master/bin/at/noboot/[color=blue]eagle.flash.bin[/color] [i](here reset your ESP)[/i] sudo python ./esptool.py --port /dev/tty.usbserial-A50285BI --baud 115200 write_flash [color=purple]0x40000[/color] ~/esptool-master/bin/at/noboot/[color=blue]eagle.irom0text.bin[/color] [i](here reset your ESP)[/i] sudo python ./esptool.py --port /dev/tty.usbserial-A50285BI --baud 115200 write_flash [color=red]0x7e000[/color] ~/esptool-master/bin/[color=blue]blank.bin[/color] [i](here reset your ESP)[/i] sudo python ./esptool.py --port /dev/tty.usbserial-A50285BI --baud 115200 write_flash [color=red]0xfe000[/color] ~/esptool-master/bin/[color=blue]blank.bin[/color] [i](here reset your ESP)[/i]
and then I'm back in business...
I've found that some of their SDK don't always work and fail to get the device back in AT command mode (non OS SDK) and I find the SDK 1.5.2 from January pretty stable for my needs
hope this helps
Thanks for your answer.
Is there any better way to do that,I think it is some difficult for me.
I’m working by arduino on Windows 7 and also my Esp8266 is the same as below pic?
You have an ESP01 and you are on windows.
so just use the first part of my direction. they have a tool for windows
don't even bother reading the second part of my post - I dumped that there for other readers who might be on Unix.
Does somebody have the latest version of firmware bin file of ESP8266 ESP01?
Thanks every one. Above way is very complete. But for windows Os and ESP01 module I found better way. Please follow below link: http://www.instructables.com/id/Intro-Esp-8266-firmware-update/ Thanks again.
Sure as long as you trust those software you install on your machine
I don't know where The ESP flasher comes from - may be it is legit may be its not that's why I try to stay away from those solutions running on my machines.
Double check forums about it before downloading and running something on your machine