ESP8266 update firmware to change the baudrate

Choose Config Device under Tools menu to choose the correct port and baudrate for flashing. The port should be the same number as you used in your terminal software. The baudrate I used was also the same (115200).

2014-11-03 21_00_27-XTCOM_UTILITY

 

2014-10-30 21_55_30-Config Device

After setting the COM port number andย  baudrate click Open.

If everything went ok you should shortly get the message:

2014-10-30 21_55_48-XTCOM_UTIL_opendevice succeded

After clicking OK the software will try to connect to the module bootloader. On my computer it usually completes in 2-3 tries and gives the following message:

2014-10-30 21_56_15-XTCOM_UTIL

If for some reason it goes on trying (and you don’t get connect with target message), check the connections (especially GPIO0, which should be connected to GND) and if the module is powered on.

Click OK and close the Config Device dialog. Next you can check if the software is communicating with the module by using Read Registers function in API TEST menu.

api_test

2014-10-30 21_57_09-Read Registers

For example 0x3ff20000 address will read as 0x10000000.

And now to the flashing part. Choose Flash Image Download in API TEST menu.

2014-10-30 21_57_43-XTCOM_UTILITY_flash_download

2014-10-30 21_58_51-Flash Image DownLoad

Flash Image DownLoad dialog will pop up. Click Browse and choose the firmware file that you want to flash. The Program Address Offset should be left as it is. When ready click DownLoad button. The download process will take some seconds.

After the download completes you may test the module with updated firmware. Close the XTCOM_UTILITY software. Power off the module and disconnect the GPIO0 pin from ground. Open the serial port that the module is connected to with a terminal emulation software and power the module on. You should be expecting the “ready” message, but the actual message depends on the new firmware flashed. Note also that depending on firmware version the baudrate you need to set may change.

I used the firmware binary from the link in the beggining of this post, which has the baudrate set to 9600 baud by default. Also the “ready” message is changed.

ESP8266_new_firmware

When you check the version with AT+GMR command you will get the following number:

ESP8266_new_firmware_version

The advantage of this firmware is that the baudrate of the module can be programmaticaly changed and that it is 9600 by default. This enables us to use it with relatively slow serial port of Arduino. I will write an article on using the module with the new firmware with Arduino shortly.

11 Comments on “ESP8266 update firmware to change the baudrate

  1. Updated using the latest on electrodragon (9.2.2) and if connected at 9600, but AT commands didn’t work initially- it needs cr/lf, previous version didn’t. Was using Putty, which can’t do cr/lf, so switched to another one. All OK now- was able to connect to an android hotspot and send some text between a socket test app (called SP).

    • Great you got it working ๐Ÿ™‚

      Putty can do cr/lf, but you need to press two keys, first Enter (Ctrl + M = Return = CR) and then Ctrl + J (LF). You also have to change some settings to receive CR+LF as a single newline. Overall putty is a great tool for ANSI emulation (say like connecting via SSH or serial to server), but it falls short for direct serial communication with low level devices where there is an occasional need to send some special characters or where you want to predefine some strings to send. You may want to try out RealTerm or Bray Terminal ๐Ÿ™‚

  2. Just another thing. When flashing new firmwares over the old ones you may have to reset/powercycle the module several times before it starts working. For some firmwares it is also better to first load an empty bin file blank.bin to a specifed address before the module will boot up correctly. This is because also settings are saved in flash and if the settings format don’t match the installed firmware the module won’t be happy about it.

  3. hi i want to simply change the baudrate of ESP8266 wifi module i have downloaded the files XTCOm and bin files,

    but how do i proceed?

    what are the files i should flash into the ESP 8266 module?

    • Hi, have you checked the whole procedure (this post is multipage)? You should unpack the zip archive and there is a bin file inside it that should be flashed to the module. I also noticed that the direct link does not work anymore – i fixed it but it may become borken in future – if so you have to go to the electrodragon site to get the file.

  4. Just curious, why you don’t connect ESP8266 directly into CP2102’s RX/TX/GND/+3V? (in other words: remove the power from breadbaord)

    • CP2102 doesnt have enough power/output current capability to supply the ESP8266 module. If connecting directly you can expect random errors while operating or ESP8266 and/or CP2102 reseting. This will probably be true for most USB2TTL converters as the internal regulator is usually meant to regulate the power for the chip itself, not power-hungry external components ๐Ÿ˜› Even if supplying power from Arduino which has a purpose-chip power supply you have to add additional capacitors for stable operation.

  5. Very happy with this post. I finally got my esp8266 working with my Arduino. Templogger was working the next dat and many more stuff van follow now.

    • You should be more specific in your error description. Are you using the same tools as in my post or are you using another flashing tool? Do you get error in the flash tool or when trying to boot the flashed board? My understanding is that to make it work you need to flash each of the bin files to their corresponding location (I haven’t tried it). Nodemcu flasher seems even a bit user friendlier to flash the firmwares ๐Ÿ™‚ Note that incorrect flash size on the board or faulty flash may also cause problems. Same with bad power supplies…

Leave a Reply

Your email address will not be published. Required fields are marked *

*