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
http://www.electrodragon.com/w/ESP8266_Firmware#Firmware_Log_0.952
https://drive.google.com/folderview?id=0B_ctPy0pJuW6d1FqM1lvSkJmNU0&usp=sharing

and esptool.py can be used to burn the firmware onto the WiFi module.
https://github.com/themadinventor/esptool/

clone the project and esptool.py will be available to be executed.

git clone https://github.com/themadinventor/esptool.git

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

sudo ./esptool.py -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.
AT+GMR

Result
AT+GMR
00200.9.5(b1)
compiled @ Dec 25 2014 21:40:28
AI-THINKER Dec 25 2014

OK

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 ./esptool.py -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.


0 comments:

Post a Comment

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