The ESP8266 module is a cheap Wireless module.It has SOC(system on chip) that can handle TCP protocols.By default, these modules come with an AT command processor and can act as a serial to WiFi bridge. There is lots of info on the web about this module.
I got 3 of the ESP8266 for my home automation project, initially the module was working perfect.
but accidently i uploaded wrong files and my esp8266 stopped working after then the serial port was giving me random garbage values,so i tried myself to solve this problem.
Step 1: Find an Esp8266 Flasher.
- Download ESP flasher from this link http://www.xess.com/blog/esp8266-reflash/
- The ESP flasher is easy software to put firmware on to the Esp SOC.
- Make sure you download write bin file (this bin files are firmware files of different version )
Step 2: Find Proper ESP8266 Firmware Files or Bin Files.
Go to this this link below to find firmware files.
Watch this video of Kevin Darrah on how to get start with esp8266. " https://www.youtube.com/watch?v=qU76yWHeQuw "
Step 3: Connecting ESP to Flash Mode
- ESP 8266-01 module
I connected esp directly to tx and rx of Arduino .Connect Esp RX to Arduino Rx and esp TX to Arduino TX, the module works on 3.3v logic according to documentation but I had no issue with 5v rx and tx of arduino ,play it at your own risk .you can use simple voltage divider to cutdown 5v to 3.3 v .I am not going into details of connection now .
The esp module goes into flash mode by making GPIO 0 ground
2. Esp 8266-12 module
I found daflabs instructables best for this module so far
I used Arduino instead of cp2102 module, and I had no issue in communication.
The connection will remain mostly same for esp8266-12 to run it in flash mode.
GPIO0 -> LOW
GPIO2 -> HIGH
GPIO15 -> LOW
YOU can upload any firmware to any of the Esp8266 module.
Step 4: Uploading Firmware
- Browse the bin file or firmware version files, you want to upload to Esp 8266 module, then write the proper address .By default it is 0x000000 but I used 0x40000080 and also check the correct com port
- Then just click download button ,if everything is fine the flasher will show you the status of download and also your esp 8266 module led will blink very fast.
- In the end at 99% it will show some error but this is ok. Congratulation!!! .you have uploaded latest firmware to esp8266.
- IT’s time to test your Esp module .now just remove GPIO 0 wire that was connected to GND ,you can connect it to VCC or leave it like this.
- Now plug your Arduino back to pc and open serial port.
- Open 9600 baud rate ,most of the esp works fine.on this baud rate .
- NOW its time to test AT commands .enter "AT" in serial port and you will get "OK". Now enter "AT+GMR" and check the firmware version.
Step 5: Using Esp Flash Download Toll V0.9.3.1
There are two software to install the bin file on soc of esp8266 ,The second method is by using esp flash download .
1.)Download the software from the below link
2.)Now just browse the bin file you want to upload on esp and do not change any of the settings except the com port and change baud rate to 115200 and click on start .you will see an uploading status .Have some patience until it says finish.
Step 6: Program Esp Using Esplorer
esplorer is a software specially made for esp8266 wifi module.you can upload lua code or AT commands on the esp8266 by using this software.
download this from the link given.
Step 7: Troubleshooting
1.)Power esp 8266 from external power supply .please avoid using arduino or computer for vcc.
2.)check the circuit thrice and always while uploading firmware try to manually reset esp8266 by making chpd gnd for some time and put it back to vcc .
3.)make sure you use either a buck or a 3.3 regulator. esp8266 needs constant current too.
4.)Note: http://www.allaboutcircuits.com/projects/update-the-firmware-in-your-esp8266-wi-fi-module/ another link that might help you to solve the problems with esp module.if non of the above