ESP8266 update firmware to change the baudrate
So today I figured I could update firmware on my ESP8266 to make it useful for work with the arduino uno. The problem with the original firmware is that the serial port baudrate is fixed at 115200 which is way too fast for the softserial library and even too fast for uno’s normal serial port to be reliable. The new firmware supposedly features adjustable baudrate and also a few bug fixes.
First you need to prepare yourself for the firmware upgrade. Download the firmware update tool and the latest firmware binary. (The links may get updated sometimes so if they don’t work check here >>) Both files can be found on this page. Next you need to connect your wifi module via serial to USB converter to computer (I use CP2102) and provide it with some quality power supply (I use breadboard 3V/5V power regulator with external wall-wart). If the flashing goes wrong your device may be rendered useless so you should be careful 😉 (You may also use arduino as both the power source and USB-serial converter, I have used it in my previous posts as a power source. Actually the flashing process should take less power than connecting to WIFI so you may be safe here; I however have not tested it.)
The connection for the flashing is slightly different than the normal connection. In addition to the normal connections you also have to pull down (connect to GND) the GPIO0 pin.
Connections to be made:
CP2102 TX – ESP8266 RX
CP2102 RX – ESP8266 TX
CP2102 GND – PSU GND
PSU 3V – ESP8266 VCC
PSU 3V – ESP8266 CH_PD
PSU GND – ESP8266 GND
PSU GND – ESP8266 GPIO0 (should be connected for flashing operation)
I suggest you to connect everything before powering up to prevent damage to the module. My power regulator also has a power switch which elegantly lets you power on / power off (reset) the module without removing any wires. You can switch between normal work mode and flash mode by removing/connecting GND-GPIO0 connection and power cycling the module.
Before actually updating the firmware I checked the current firmware version on the module. Connect with a terminal emulator software of your choice to the serial port that connects to ESP8266 (I use RealTerm). Power off the module, disconnect the GPIO0 pin and power it on. You should get some gibberish and then a “ready” word (you may get other strings depending on firmware). If you only get gibberish you may have the baudrate set wrong, the GPIO0 still connected to GND or some wierd firmware.
When you got the “ready” message you can read the current version by sending “AT+GMR” command to the module. The command should be terminated with newline. You can see my older posts on various other AT commands available.
The printed version denominates the currently installed firmware version. If you like what you see you may not even need to update it 🙂
Next I tried what the module sends to the serial port when GPIO0 pin is held to GND. I powered off the module, reconnected GPIO0-GND connection and powered it up again. There was nothing human-readable at any baudrates I tested, just some random characters like this:
So the next step is to close the terminal emulator software (if you don’t close the port the updater software won’t be able to connect to it) and fire up the XTCOM firmware update tool.
(For easier reading this is a multipage post, please choose page below.)