User Tools

Site Tools


ESP8266 - Upgrading the Firmware

Before using the ESP8266 module, the firmware needs to be updated to provide wider router support. The instructions shown below are based on my experiences whilst upgrading my ESP8266 modules to firmware version


Connect your ESP8266 module as follows:

  • Vcc = 3.3V (needs around 300-400mA peak)
  • Gnd = -ve ground
  • CH_PD = Chip enable so always +ve
  • RST = Leave floating or ground to reset
  • GPIO0 = Normally floating but this needs to be grounded when you start the update.
  • UTXD = Tx data connect to Txd on FTDI/Serial interface
  • URXD = Rx data connect to Rx of FTDI/Serial interface

You also need to download the new firmware and update tool from ElectroDragon: The firmware tool is called XTCOM

Before you start the update, make sure your ESP8266 is working normally as follows:

  1. Connect-up as above but leave GPIO0 floating.
  2. Access the serial interface with a terminal program such as PuTTY or Termite.
  3. Set the terminal s/w baud rate to either 57600 or 115200 (depends on whether you have an early or later model). The CoolComponents models are 115200.
  4. Power-up the ESP8266 and you should see some readable text indicating that it's ready. If you get nonsense try changing the baud rate.
  5. If all is well, try some AT commands.
  6. Try AT+RST which should re-start the module.
  7. Try AT+GMR which should give the firmware version.
  8. NB: When entering AT commands there are no spaces and you cannot use backspace to correct errors as each character is sent as it is typed!

If all is well, you can move on to the firmware update.

Firmware Update


Here are the steps required to update the firmware:

  1. Put the ESP8266 into firmware update mode by grounding GPIO0 and re-cycling the power.
  2. Launch XTCOM_UTIL.
  3. In the Tools menu choose Config Device and set the Com port and set the baud rate to the value you used during testing (57600 or 115200). Click Open then Connect but don't close this panel.
  4. From the API TEST(A) menu choose Flash Image Download and browse to the downloaded firmware .bin file
  5. Click DownLoad to start the update - the progress bar will confirm it's under way.
  6. That's it!

Linux or OS X

  1. Ensure that you have python and the pyserial module installed
  2. Put the ESP8266 into firmware update mode by grounding GPIO0 and re-cycling the power.
  3. Get the esptool from github
  4. In change the device from ttyUSB0 to what ever your usb-serial is
  5. Run ./ write_flash 0x000000 New_Firmware.bin (changing New_Firmware.bin to the downloaded firmware file)
  6. The script will write the firmware to the device.


On completion of the update, disconnect GPIO0 from ground and re-cycle the power. You can now use the serial connection to try a few AT commands.

NB: Following the update, the default serial baud rate changes to 9600 and AT commands require a CR+LF combination to signal completion. Some terminal programs (PuTTY) refuse to send the CR+LF combination so you need to press Enter followed by CTRL-j. An alternative terminal that does handle CR+LF is Termite:

NB: When entering AT commands with PuTTY you cannot use backspace to make corrections as each character is sent as it is typed.

To connect to your local WiFi network use the following commands:

  • To set the correct mode: AT+CWMODE=1
  • To connect to your network: AT+CWJAP=“ssid”,“password”
  • To get the IP address: AT+CIFSR
  • To get the ssid of the connected router: AT+CWJAP?

Setup an ESP8266 Based Gateway

Chris Stubbs has done the pioneering work and produced software to control the ESP8266 from an Arduino based board. The details can be found here and all you need to do to get on the air is to create updated wifiConfig and NodeConfig files with your WiFi and node details.

NB: When connecting the Moteino or other Arduino board to the ESP8266 the Tx and Rx lines need to be reversed, i.e.Tx on Arduino goes to Rx on Moteino and vice-versa.

Next Steps

It should be possible to use the SoC processor in the ESP8266 to control the RFM69 directly thereby eliminating the need for the Arduino but that code hasn't been written yet.

esp8266_firmware_update.txt · Last modified: 2020/06/27 23:02 (external edit)