Sunday, March 15, 2015

Flashing Firmware on ESP8266

In my previous post on ESP8266 I explained how I connected the cheap WiFi module with my computer using a USB to TTL adapter. I had a old version of firmware on WiFi module when I brought it. I wanted to update it to the latest firmware.

GPIO0 pin should be grounded to put ESP8266 into the flash mode. see below diagram. The SW1 should be on before trying to flash the firmware on it.

Now we are good to go. The latest firmware can be downloaded from

and can be used to burn the firmware onto the WiFi module.

clone the project and will be available to be executed.

git clone

using below command, the firmware can be burn out to the WiFi module

sudo ./ -p /dev/ttyUSB0 write_flash 0x000000 AI-v0.9.5.0_AT_Firmware.bin

It will take few minutes to complete the process and you may notice the blue LED indicator on ESP8266 binks very fast while flashing. If it was succeeded you should see a similar result on your console.

Now disconnect the GPIO0 PIN from GND and reconnect the USB-TTL adapter again to the computer.
Issue below command and verify the firmware update is successful.

compiled @ Dec 25 2014 21:40:28
AI-THINKER Dec 25 2014


There is an unofficial Firmware called NodeMCU which allows scripting using Lua programming language. It can be clones from below github repo.

Now locate the firmware(nodemcu_512k_20141219.bin) and issue below command 

sudo ./ -p /dev/ttyUSB0 write_flash 0x000000 nodemcu_512k_20141219.bin

Now follow same steps when flashing is done.
Now on you can execute Lua statements on serial monitor rather than using AT commands.

I tried few statements successfully see below output.


Post a Comment

© kani.stack.notez 2012 | Blogger Template by Enny Law - Ngetik Dot Com - Nulis