Get Your ESP8266-12 Ready for AT Commands





Introduction: Get Your ESP8266-12 Ready for AT Commands

About: Just an ordinary person who loves #thinking and #tinkering

ESP8266 is a System on Chip (SoC) which is widely used on Internet of Things (IoT) for its "tiny in size and low in price". I purchased two of this chip at for $5.42 each six months ago and until last week I decided to play with it, to twist my mind with codes :D

There are so many tutorials out there to get started with this ESP8266 such as :

I read them all and tried the different wiring methods but I still could not get it run the AT commands through Serial connection. Three days I kept tinkering until it finally works. I am so delighted. Seems like the ESP8266 has so many versions of default setting from manufacturer.

Then I decided to write this instructables so that other people who encounter the same problem with their ESP8266 modules can solve it faster.

Here I use ESP8266-12 complete with the breadboard adapter and 3.3V power regulator. It is said that you can safely connect it to the 5V power supply but surely not recommended. It is also said that this wifi module will draw more current than that your PC/Laptop usb port can provide. But I think it will not draw too much power on AT commands which are mostly used for setting up the module. And yes I plug it in 3.3V on my Arduino UNO which is powered by my laptop usb port :D [do this at your own risk as I did it at mine].

On the second picture, you'll see that GPIO4 and GPIO5 labels are swapped on adapter board. Some site says that the board fix it. I will figure it out on my next project :D

Step 1: Soldering

Firstly I solder the ESP-12 on adapter board. You should take deep breath then hold your breath to solder those tiny pins. Ha ha .. not really, but sure you need a good quiet place and steady breathing to get a good soldering result.

Secondly, I solder the 3.3V power regulator at the bottom of the board.

Then comes the pin headers. On my first ESP-12, I soldered the pin headers normally. Later I found that it is not breadboard friendly because the adapter board takes the whole width of breadboard. No way for jumper wires to connect to ESP-12 pins unless you put some wires from the bottom of the board to the open space.

Second try, I mod the pin headers so that they come out half on top and half on the bottom of the board. I put the headers from the bottom heading top and solder from the top [image #1]. Then use cutter or wire cutter or tweezers to remove the black plastic that holds the pins [image #2]. I saw that the bottom headers are longer then the top headers, while we do need the top headers long enough to connect with the female header jumper wires. So I would say that you should put the headers from top to bottom and then solder the bottom part of the pins [image #3]. Now we can sit the ESP-12 on breadboard and also connect the pins using female header jumper wires.

On image #4 you see that I solder a 104 (0.1 uF) decoupling capacitor across VCC and GND, that's when I was desperate making this module to work (-_-" ) some articles said that we only need it when we have several unwanted auto-resets. Finally I removed the cap and keep it in the box. Who knows I might need it later ...

Step 2: Wiring

Prepare 6 resistor with high value, 10K or above. I put four of them as pull-up resistors (connect to 3.3V) and two of them as pull-down resistors (connect to GND). I do need these resistors to make it works while some people don't.

  • GPIO15 (grey) -> pull-down
  • GPIO2 (blue) -> pull-up
  • GPIO0 (purple) -> pull-up
  • CH_PD (green) -> pull-up
  • REST (orange) -> pull-up
  • TXD (black) -> Arduino TX (pin D1)
  • RXD (white) -> Arduino RX (pin D0)
  • VCC (red) -> breadboard V+ rail
  • GND (brown) -> breadboard GND rail
  • Arduino 3.3V (red) -> breadboard V+ rail
  • Arduino GND (black) -> breadboard GND rail

If you are lucky enough, you should be able to run AT Commands by now. If you are not, don't be sad, you have the chance to explore the fun of flashing firmware later. Just keep reading ;-)

Step 3: Arduino Serial Monitor

  • Plug your Arduino to USB port.
  • Open your Arduino IDE.
  • Open the "Tools" menu.
  • Select your board : Arduino/Genuino Uno.
  • Select your Arduino COM port.
  • Open Serial Monitor.
  • On the bottom right part select "Both NL & CR"
  • Then select your serial baud rate. My esp-12 default is 9600. Some got 115200 for default.

Some people get "Ready" on their serial monitor screen but I don't. To test if it works or not, type "AT" (without double quotes) and press enter. If it works, you will get a reply message "OK". Then you can continue with other AT Commands listed here:

If it doesn't reply "OK" to you, then continue to next step.

Step 4: Putty Terminal Emulator

Three Alternatives to Arduino Serial Monitor by James Lewis.

Here I use Putty Terminal Emulator on Windows 10.

  • Pick "Serial" on the radio button.
  • Type in your Arduino COM port on "Serial line".
  • Type in "76800" baud rate on "Speed". This is default speed for ESP8266 boot message.
  • Press the "Open" button.

By looking at your boot message, you can search what kind of problem that prevent your ESP-12 communicating through AT Commands. In my case I got this message :

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)  

load 0x40100000, len 25020, room 16 
tail 12 
chksum 0xef 
ho 0 tail 12 room 4 
load 0x00000000, len 0, room 12 
tail 0 
chksum 0xef 
load 0x00000000, len 0, room 4 
tail 0 
chksum 0xef 
csum 0xef 
csum err 

Searching on the net, I found the solution the next day saying that we should flash the firmware with SPI mode : DOUT (Dual Read Operation). I was following the instructables by RaviP6 for flashing esp8266 firmware and I flashed successfully, only that AT Commands still not working and I got that error message at boot. Back to the flasher tool, there is no "DOUT" option as mentioned can fix the problem. Keep searching the net and I found another more advance flasher tool with more options.

Step 5: Flashing a Firmware

  • For flashing a new firmware to ESP-12 we need to put the GPIO0 to pull-down resistor (purple wire).
  • Download ESP Flash Download Tool V1.2 to your local drive and unpack it on a folder.
  • Download ESP8266_AT_V00180902 Command Firmware and unpack it on the same folder with Flasher Tool so that it will be easier to find.
  • Run Flash_Download_Tool_v1.2.exe
  • Pick your downloaded firmware into Download Path Config.
  • Set the ADDR : 0x00000.
  • Set the SPI Mode : DOUT.
  • Set your Arduino COM Port.
  • Set the baud rate 115200 (or 9600).
  • Press the start button.

Hopefully everything goes well or you might get another version of ESP-12 with different problem to solve :D

Now put back the GPIO0 wire (purple) to pull-up resistor and reset your ESP-12.

Go back to Step 3 (Arduino Serial Monitor) to see if the AT Commands is now working or not.

Good luck, Pals. Please share in comment section if you encounter different problem or you have solution to any ESP-12 Getting Started problem ^_^



    • Creative Misuse Contest

      Creative Misuse Contest
    • Oil Contest

      Oil Contest
    • Water Contest

      Water Contest

    46 Discussions

    Hi guys, this post is awesome but I will need your help.

    I'm struggling with Arduino and esp8266e12.

    I bought esp8266e12 a few days ago but still nothing. I did all of the above steps (even flashing new firmware), but every time I make a reset to esp8266e12 I still get the same output in the serial monitor (see attached image), and for any AT command sent from the serial monitor, I get no response.

    Does anyone know what might be wrong with my case?

    Thank you in advance!

    2018-05-06 21_18_39-.png
    7 replies

    Try to decrease the BaudRate step by step down to 9600 and see which one works ;)

    Thanks for the reply!

    I did what you suggested, and every time I reset it I get the following output at 74880 baud.

    However, none of the AT commands work yet.... :/ have you any idea?

    Thank you again!

    2018-05-07 21_23_16-Window.png

    What kind of flashtool are you using? Take a look at Step#5 above :)
    That was a reset trigger by reset pin just like what I had at Step#4. So you should move to Step#5, download a more advanced flash tool. Should be a newer version of that tool by now :)

    I used the flash tool you suggested above. The flashing seems to be ok since I get the response 'ets Jan 8 2013,rst cause:2, boot mode:(1,6)' every time I reset the ESP, but I get no reply for any AT command I send :/ (I have use arduino's 3.3V pin instead of a stepdown converter... I though I would be enought just for AT commands)

    Have you tried Step #2 ? Wiring the ESP-12 with 10K resistors as pull-up or pull-down. I did need those resistors to make it work as far as I can remember.

    Thank you very much for your help! I solved it... I had omit to connect arduino's reset pin to GND... that was the problem. Thank you again!

    allow me just one more remark.
    You ordered at (DX). I am not sure how the various prices were 6 mo ago but currently that module plus adapter plate will cost you 5 usd at the link you provided.
    I think most people know aliexpress, but just want to point out that the module is much, much cheaper there. I saw prices of 1.84 USD. only need to add a 30 ct adapter plate.

    the price of 5USD at volume rate is even higher than the wemos d1 mini at aliexpress that includes an usb plus voltage regulator plus pin headers.

    So if you are new at this, check aliexpress, not just

    2 replies

    That was last year, and yes price will vary, some offer chip only without adapter board. I love shopping at DX because they offers free shipping to my country. Other online stores have cheaper price but the shipping fee will be much more expensive than the item we are going to buy :D

    But thank you for the information for others, and also for me. I will take a look at other module like wemos d1 mini maybe ;)

    I used to shop at DX a lot, love the store, but lately went to aliexpress. They offer free shipping too. Anyway, may be different on where one is located but it pays to shoparound.

    The Wemos mini D1 is a good board, especially for development. Once that is done, just the ESP8266-12 on an adapter plate is a good choice for the final project, especially if you want to go low power

    Hello, i don't have the tension regulator, to work i should take off the resistor on the middle?

    4 replies

    Did you mean voltage regulator? The middle resistor is zero ohm and it will connect to nowhere without the regulator, so I would say just leave it there as is. Without a voltage regulatoryou have to make sure that you feed it with 3V to 3.6V max according to the datasheet. Otherwise it will not work properly or maybe fried over-voltage.

    I think that if you remove it and do not use a regulator your chip will not get a Vcc voltage anymore. Mind you, if you do NOT use a voltage regulator, the Vcc pin is where you put your 3.3 volt and it goes directly to the V+ of the esp chip. When you solder in a regulator and put 5 volt on the Vcc that 5Volt still goes directly to the V+ of the esp chip, so you need to interrupt that connection so the 5V doesnt go immeditely to the espchip but first to the regulator in and from the regulator out to the chip. That interruption of the powerline is made with that 0 ohm resistor.
    Therefore it is not a matter of ' just leave it' but rather 'you must leave it'.

    It does connect to somewhere: it connects the Vcc pin to the V+ of the module.
    On the other hand... if you put in the regulator you MUST remove the 0 ohm resistor, otherwise the in and out of the regulator are connected and you would be putting 5Volt on yr chip

    Thank you. I get what you mean. In short : keep the 0 ohm resistor if you are using 3.3V and remove it if you decide to use 5V.

    correct, sorry if i was longwinded about it :-)

    Thank you for posting this tutorial! It tooks me days to get my ESP8266 12-E working, and with the resistors, it worked!!

    1 reply

    Yes, the pull up and pull down resistors seem like doing nothing but they keep the pins' state stable when not connected ^^
    You are welcome ^^