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 )
<p>what is .bin file for esp8266 flashing and how to dwn it ,pls help me</p>
Thanks man, i have been spendig days without finding a solution!
<p>I was having the same problem,I solved this by changed usb to ttl from Figure 1 to Figure 2. </p>
<p>Those of you who are having the problem &quot;Failed to Connect&quot; just make sure:</p><p>1. GPIO 0 --&gt; GND</p><p>2. Use external 3.3V source to power ESP</p><p>3. Make common GND between Arduino and ESP power source (this is most important) </p>
<p>Hi All, After Reading the Instructable and doing it on 2 diffrenet esp . I always end up with an unresponsive AT. I want to know the easist way to factory reset esp8266. So i can Send AT commsnds.</p>
<p>Let me know how your are powering the esp8266 first and the other connections too.This is the first hurdle when you use the esp8266.</p><p> Next is the firmware file is itself corrupt.you need to download the AT firmware file from github.com. </p><p>Also check the esp8266 temperature regularly.If the temperature is exceeded due to excess of voltage the esp can get internally damage.</p><p>There are fake esp8266 01 modules available in market be careful. </p>
<p>Hi NavalJ ,I am also stuck in same error plz share what did you find.</p>
Let me know how your are powering the esp8266 first and the other connections too
<p>Hi,</p><p>I have just started learning ESP8266-01 module. </p><p>Is it necessary to flash the 8266 module before programming it with any code to use it for some purpose ?</p><p>OR</p><p>Does it it come pre-flashed and we can start programming it with our own code without the need of flashing ?</p>
By default it comes with AT firmware.There is no need to flash new firmware.
<p>Hi thanks Ravi,</p><p>Got that. So then how and when a re-flash is needed for ESP8266. Is that when the chip corrupts or freezes or what ?</p>
<p>Hi, I'm stuck with trying to communicate with my esp8266 -01.</p><p>Any ideas on what could be going wrong? I can't upload any lua code. I've followed the firmware flash and done it a few times. I feel like I'm missing something.. </p>
how are u powering esp8266?make sure you do not power from laptop nor arduino .use an external power supply and then try.
<p>ah perfect!! that worked! thank you.</p>
<p>Hey.. I always get &quot;invalid head of packet&quot; on 6%.. what to do? &sup2;</p>
<p>I had this issue. Swapped USB cords and got to 100%.</p>
<p>Try some other esp8266 firmware .it looks like the firmware that you are trying to put is corrupt </p>
I'm using fimware recommended for you
<p>Kindly check the power. provided to ESP-01</p>
<p>Hi EliasA5 - I get the very same problem. If you find a solution, it will be very much appreciated if you share it.</p>
<p>Hi Ranip, I found a soluction. I using the esptool <br>(https://github.com/themadinventor/esptool) . First I changed the line <br>44 to &quot;ESP_RAM_BLOCK = 0x180&quot; and changed the line 45 for or to &quot;ESP_FLASH_BLOCK = 0x40&quot; (<a href="https://github.com/themadinventor/esptool" rel="nofollow">esptool</a>/<strong>esptool.py</strong>).</p><p>Firmwares ----&gt; <a href="http://bbs.espressif.com/viewforum.php?f=46" rel="nofollow"> http://bbs.espressif.com/viewforum.php?f=46</a></p><p>I have a esp01</p>
<p>Thank you Elias for sharing your opinion.</p>
<p>Great guide!</p><p>[SOLVED] To all the people having &quot;Failed to connect&quot;, this is how I solved it.</p><p>My setup:</p><p>1) os: OSX El Capitan</p><p>2) esp: ESP8266-01</p><p>3) Arduino Uno: DCCDuino clone</p><p>4) flasher: esptool.py</p><p>5) connections:</p><p>ESP---&gt;Arduino</p><p>GND(-): GND</p><p>GPIO0: GND</p><p>EN(CH_PD): 3.3v</p><p>VCC(+): 3.3v</p><p>TX: TX</p><p>RX: RX</p><p>This was failing, so the solution was:</p><p>Add 1000mf capacitor between + and -, and that's it!</p><p>Hope it helps, I spent more than a day 100% on this, and finally got it working thanks to the above..</p><p>cheers</p>
<p>I was having the same Issue,I solved this but by pressing the reset button 2 or 3 times (while holding the [PROG] button) when it tries to connect.<br></p>
<p>just to avoid some confusion, the Rx-Rx and Tx-Tx connection I presume is when you use arduino board to flash the software as connecting the Tx of ESP8266 to Tx of Arduino, is in fact connecting it to Rx of the USB interface.<br><br>Obviously if you want to have your ESP8266 work with yr Arduino, e.g. as a WiFi shield, you need to connect Rx-Tx and Tx-Rx</p>
<p>Thank you berlingozzo for sharing it.</p>
<p>Hi, can you draw the scheme of your setup, because i'm new in this...</p><p>And, what capacitor voltage do you use...?</p><p>Thanks..</p>
<p>Thank you for such a nice Tutorial :) !<br><br>Yeah I worked for me. and solved the following Issues:</p><p><strong>1- My ESP-01</strong> <em>(Black PCB 1024k)</em> was printing garbage on serial monitor. But after re-flashing that problem is gone !. and the <strong>BAUD rate restored to 9600</strong>.<br><strong>2-</strong> I was failing flashing again and again even I thought I bricked my module (The blue LED was blinking very fast even if there was no Rx and TX wires attached to USB-TTL converter)</p><p><strong>3-</strong> Error occur right after resting the Module &quot;ets Jan 8 2013,rst cause:2, boot mode:(3,6)&quot; also gone. </p><p>Thank you once again :) !</p>
<p>Please help me in following :</p><p>I have successfully upgraded firmware in my ESP8266-01, but after upgrading when I connect ch_pd to 3.3v it disconnects my arduino, and LED on uno starts blinking fast, </p><p>I have tried to add pull up resister of 3k between 3.3v and ch_pd pin, but still it disconnects my arduino.</p>
<p>Kindly post the picture of the schematic you used.<br>Try these :</p><p>Disconnect RX and TX connections, GND, VCC (must be 3.3V) CH_PD(pull high),RESET(PULL HIGH) and press the RESET button 2 OR 3 times rapidly. circuit should be as following(image attached) .<br>The Continuous/ fast blinking Blue LED should stop.<br>the problem will not go until you re-flash it. (worked for me!).</p>
<p>I'm a complete beginner. I'm using a 201 module (also tried the 01 with the same issues) I flashed the newest firmware called &quot;nodemcu_float_0.9.6-dev_20150704&quot;. In Lua Loader I get a page of this gibberish when uploading a file to the esp. In esplorer I get this &quot;Can't autodetect firmware, because proper answer not received. Please, reset module or continue manually...&quot; In case this is a situation with the firmware I also tried the stock firmware with ESP8266Flasher and also v0.9.2.2 AT Firmware. I followed the steps to cycle reset a few times but nothing works GPIO0 is indeed high, GPIO2 10k resistor high, GPIO15 10k to low, reset to high, CH_PD high, RX through a voltage divider. Any other clues? I've spent days trying to get this going.</p><p>Thanks</p>
<p>Please Help resolve this error</p>
<p>Have you solved your problem? I have same issue.</p>
<p>I am done I have done all the steps as you mentioned but at last I am able to sent at commands using esplorer but I am unable to send any LUA file to esp it sends error after every line on right hand side of the software's window </p>
<p>Hello Experts <br><br>We<br> have been struggling to execute application on ESP8266 and I tried all the flashing procedure mentioned above but no luck and <br>our esp8266-01 is resetting again &amp; again with watchdog reset error<br><br>wdt reset<br>load 0x4010f000, len 1264, room 16<br>tail 0<br>chksum 0x42<br>csum 0x42<br>~ld<br> Setup don start<br><br>We have been using below schematic for the connection and here is the part number.<br><br><strong>ESP8266 01 wifi transreciver </strong></p>D-SUN &quot;USB to TTL&quot; (Blue)<p>We are connecting 2 pencil cells to supply 3.3V to ESP8266. is that correct ? what should be the current ?</p><p>Please advice how to proceed further.</p>
<p>getting error: FILE=&quot;init.lua&quot; file.remove(FILE) file.open(FILE,&quot;w+&quot;) uart.setup(0,9600,8,0,1,0)</p><p>file.close();</p><p>Error</p>
<p>while uploading the code to ESP using Esplorer I get the error stating: &quot;waiting answer from ESP &ndash; timeout reached,send abort.&quot;.. how to solve it?</p>
How did you connect the esp? Have you grounded esp gpio 0?
Yes I grounded the Gpio0 pin
<p>I've already downloaded the firmware to esp8266. However, when I disconnect the gpio0 , the com port of the computer disappeared. Any AT command to esp8266 cannot get any response. Is there any solution to this problem?</p>
<p>Here is the link for firmware : <a href="https://github.com/espressif/ESP8266_AT" style="">https://github.com/espressif/ESP8266_AT</a></p>
<p>How have you connected the esp module?</p>
<p>So if i dont update the firmware, i wont be able to run esp8266 with arduino codes? cause it works when i insert AT commands in serial monitor but when i write a code and upload it, it gives me garbage. </p>
<p>Remove the tx and rx pin of esp from arduino during uploading.</p><p>You can program esp 8266 with three methods .one is using AT commands other is node mcu firmware and last is with arduino itself. </p><p>1.)if you like to use esp as standalone then use arduino ide to flash the sketch in esp </p><p>2.)if you want to use arduino and esp together ,you have two choices AT and node mcu ,i prefer node mcu as it is easy to write and understand.</p><p>if you know any another method feel free to share :)</p>
<p>Can you tell me if using Arduino needs any special firmware preflashed to ESP or does it do it in-setu while writing the sketch? I am not sure, but does Arduino need NodeMCU firmware to be present to work? Or does Arduino compiles to the sketch to native executable for ESP (in which case probably no need to install separate development tools since using Aurido we can compile C files also stand alone or part of sketch, right?)</p>
<p>Go ahead ,there is no need of any flashing of esp. When you upload the code on esp with arduino.You actually flash it with the sketch that you write in arduino ide. Remember one thing, pull the flash pin of esp to gnd for ex: for esp 8266-01 Gpio0 to GND.</p>
<p>Nice instructable.</p><p>I am trying to reflash my ESP-07 (as I can not communicate with it any way) using the simple Flash Downloader, but it fails to finish flashing every time. Sometimes at 14% sometimes else.</p><p>Do you have any ideas what could cause this?</p><p>Thanks in advance.</p>
<p>NO.it happens to me also but after resetting the module , it works fine.try to reset the module and then try uploading the file again.</p>
<p>Thanks! I couldn't find the firmware before</p>

About This Instructable




Bio: I am a Electronics and telecom graduate engineer and an enthusiastic embedded student with experience in latest technology and also an video and project documentation ... More »
More by RaviP6:Diy Bench power supply(single channel) Persistence Of Vision Esp8266 firmware update 
Add instructable to: