ESP8266: Flash Module Firmware

Flash / Update ESP8266 Wi-Fi module

Flash ESP8266 module to avail of new features as the factory module will often come with outdated firmware. Some very important features may be missing from older firmware like the ability to set the baud rate. To update the software the module needs to be flashed. This may only be needed once though as the newest firmware adds the cloud updating functionality.


Wire ESP8266 for Flashing

ESP-07 is an SMD package and thus requires GPIO15 pad to be connected to ground. Non-SMD packages such as ESP-01 does not require external connection as it is connected internally. Regardless of package the single difference in wiring for flashing mode is that GPIO0 pin needs to be connected to ground.

Schematic of ESP8266 module in ESP-07 package with flash mode enabled and wired to an FTDI programmer.

Schematic of ESP8266 module in ESP-07 package with flash mode enabled and wired to an FTDI programmer.


Check ESP8266 Firmware Version

Check firmware version.


If ERROR is printed it is likely due to outdated firmware version which does not have this command. If successful the command returns a 10 digit number like 0018000902. The first 5 digits represent the SDK version while the last 5 digits represent the AT version. In this case ESP8266 module is loaded with SDK and AT firmware.


Flash ESP8266 Firmware

Download ESP8266 Update Downloader and run it. Also download v0.9.5.2 AT firmware or a newer version if it exists. Within the Flash Downloader select the firmware file and enter the COM port of the FTDI programmer that is connected to ESP8266 module.


ESP8266 Flash Downloader Tool.

Hit the download button and wait for the flashing process to complete. Failed to leave Flash mode message does not affect the flashing process in any way and can be ignored. If instead you see Failed to connect message you may have selected the wrong port or the port may be used by a different program. To fix this error check that the port is correct and close any programs that may be using it like Arduino IDE or Termite.

ESP8266 Flash Downloader finished flashing

ESP8266 Flash Downloader finished flashing.

After the firmware flashing, module settings may change. Depending on the previous firmware version, the baud rate may now be set to 9600 and new AT commands should be available. Before you test ESP8266 AT commands over FTDI programmer make sure to disconnect GPIO0 pin from GND to stop putting the module into flashing mode. With newer firmware versions it is even possible to update module firmware from the cloud without any additional hardware or wiring.

  • Gergely Dömölki

    Hi, and thank you for your instructions.

    As I’m having trouble to communicate with my ESP-07 found your site.
    Wasn’t able to get my ESP to boot mode until on an other site I’ve found that GPIO 02 has to be pulled HIGH for flashing. Trying that i was able to have the Flash Downloader connect to the board, and the flashing goes nice… until a certain point where it stops. Tried several times without success. Sometimes it stops at 68%, sometimes at 14% etc…
    Do you have any idea what could’ve gone wrong?

    Thank you in advance.

  • How is the programmer and ESP module connected exactly (jumper wires/breadboard…)?

  • Gergely Dömölki

    RST floating
    Common ground
    (GPIO02-HIGH, LOW or floating doesn’t make any difference)

    3.3V FTDI, external PSU for the ESP…

  • Gergely Dömölki

    Using breadboard, solid wires soldered directly to the ESP, jumper wires from breadboard to FTDI.

    -and a 100uF cap at voltage source.

  • Gergely Dömölki

    I have one ESP-07 mounted on a board like this:

    Now, it doesn’t even connect to the flasher.

    It pulls GPIO15 directly, and GPIO02 through an internal resistor to ground.

  • Gergely Dömölki

    Flasher log file:

    Exception in thread Thread-64:
    Traceback (most recent call last):
    File “threading.pyo”, line 810, in __bootstrap_inner
    File “”, line 19, in run
    File “downloader.pyo”, line 54, in __init__
    File “serialserialwin32.pyo”, line 38, in __init__
    File “serialserialutil.pyo”, line 282, in __init__
    File “serialserialwin32.pyo”, line 66, in open
    SerialException: could not open port ‘COM3’: WindowsError(5, ‘A hozzxe1fxe9rxe9s megtagadva.’)

    (last line -after WindowsError- means: access denied)

  • The breadboard is likely the problem. Try connecting FTDI programmed directly with jumper wires or solder header connectors on a prototype board. I believe I had a similar issue with the exact same breakout as well but I think it was the fact that I was using a breadboard at all was what caused the issue.

    Also using 3.3V from the FTDI programmer should work just fine.

  • Gergely Dömölki

    RX and TX are connected directly via jumper wires… anyway, thanks for your effort.

  • Gergely Dömölki

    For the record:
    I’ve managed to upload sketches and to reflash firmware.
    You were right I guess, because I’ve changed only three things:
    -ESP fed directly from the FTDI programmer
    -breadboard is only used to place a capacitor, other wires connecting directly the FTDI and the ESP
    -and the capacitor itself which is 470uF

    Thank you for your help again.

    • Glad you got it working, I had plenty of trouble with this too 🙂

  • Wahab Bk

    it work fine thank you