How to set up smartphones and PCs. Informational portal
  • home
  • In contact with
  • Wifi module based on ESP8266 chip. Updating the ESP8266 Wi-Fi module firmware

Wifi module based on ESP8266 chip. Updating the ESP8266 Wi-Fi module firmware

... In general, this material is not limited to just one Arduino topic.

The topic of ESP8266 is quite a difficult one. But, if you work with these Wi-Fi modules in the Arduino IDE development environment, the entry threshold drops to a level acceptable for the average Arduino user. And not only the Arduino guy, but any person who has a desire to whip up something on the topic, and without spending a lot of time reading the documentation for the chip and studying the API for these modules.

This video completely duplicates the material presented in the article below.

Well, we already know how to connect the ESP8266 and put it into programming mode, now let's move on to something more useful.

I’ll say right away that once we program the module in the Arduino development environment, we destroy the native firmware, and we will no longer be able to work with the module using AT commands. Personally, this doesn’t make me cold/hot, but if someone needs it, towards the end of the article I’ll show you how to flash the native firmware back into the module, or some kind of bootloader like NodeMcu.

To begin with, download the latest version of Arduino IDE on the official website, currently it is 1.6.7. Older versions like 1.0.5. won’t fit because they simply don’t have the necessary functionality, and dancing with a tambourine doesn’t interest us, right?

We launch the development environment and immediately go to File/Settings:

Http://arduino.esp8266.com/stable/package_esp8266com_index.json

Then go to Tools/Board:/Board Manager...:

A board manager window will appear in front of us, scroll through it to the very bottom, and if everything is done correctly we will see something like this:

Click the cursor on the inscription " esp8266 by ESP8266 Community"after that, we have an “Install” button, select the desired version, I take the latest one, today it is 2.1.0 and install it. The development environment will download the files it needs (about 150 megabytes) and opposite the inscription " esp8266 by ESP8266 Community""INSTALLED" will appear, that is, installed:

We scroll down the list of boards and see that we have many different ESPs in the list, take “Generic ESP8266 Module”:

Go to “Tools” and select the desired COM port (for me it’s COM32), then set Upload Speed: “115200”:

We set the speed to 74880 and “NL & CR” and again turn off and apply power and it will respond with some debugging information:

Note that 74880 is not the main speed of the ESP8266, it just sends debugging information at it. If the module does not send anything to the console, then something may be connected incorrectly.

By default, the speed should be 115200, but in some cases it can be 9600 and others... So try to find it.

After selecting the required speed, we send the “AT” module and it should respond that everything is “OK”. The "AT+GMR" command displays information about the firmware.

Before you start flashing the ESP8266 in the Arduino IDE, I advise you to read the article to the end.

Now let's try to flash the ESP8266 via Arduino IDE. We put the module into programming mode (I wrote how to do this in).

Let's add a standard LED to the flasher:

// By Mr. PodelkinTs youtube.com/RazniePodelki // special to site/post/271754/ #define TXD 1 // GPIO1/TXD01 void setup() ( pinMode(TXD, OUTPUT); ) void loop() ( digitalWrite(TXD, HIGH); delay(1000); digitalWrite(TXD, LOW); delay(1000); )

Flashed? So everything was done correctly. Where did I get that the LED is connected to the first pin? In the previous article there is a picture with pinouts of different modules, and there is a marking of the ports when using the Arduino bootloader (pins are marked in pink).

Blinking an LED is of course good, but we need to install some kind of web server or start controlling the LED at least using buttons in the browser, right? But I’ll tell you about this some other time.

And now how to flash back native firmware, and how to even flash a module with third-party bootloaders. For ESP8266 there is such a program as NodeMCU Flasher, which is originally intended for flashing the NodeMCU boot loader. But as it turned out, it perfectly flashes other firmware.

I will attach an archive with this program and firmware to the article for convenience, but you can always download a new version of NodeMCU Flasher.

In the “nodemcu-flasher-master” folder there are 2 folders Win64 and Win32 and depending on the bit depth of your OS, select the one you need. Next, in the Release folder, run “ESP8266Flasher.exe” and see the program interface:

Select the desired COM port and go to the “Config” tab, remove the cross next to “INTERNAL://NODEMCU” and put it one point lower, as in the screenshot:

(If you want to flash the NodeMCU bootloader, remove the cross where it was not, and put it where it was, that is, near “INTERNAL://NODEMCU”).

Then we click on the gear and select where our firmware is located, the firmware is usually in *.bin format (in the attached archive it is “v0.9.5.2 AT Firmware.bin” which is in the main folder), and also select “0x00000” as and higher.

We return again to the “Operation” tab, put the module into programming mode and click “Flash”:

That’s it, the module has started to be flashed, after flashing, don’t forget to reboot the module and voila, it’s flashed with the firmware we need.

We check with the AT command “AT+GMR” whether we did everything correctly:

As you can see, everything went smoothly.

JavaScript must be turned on in order to use this page

Firmware and launch of the ESP8266 module (updated: 23 Jun 2018, 22:01:16)

This is general documentation for the ESP8266 chip. Please note that this chip is considered obsolete, although very popular - it was replaced by the ESP32 chip.

First you need to determine how much memory is installed on the ESP8266 module. There are module options with installed memory of 512 kbytes (4 megabits), as well as 4 MB (32 megabits). Rarely, but come across with flash memory 1 MB (8 megabits). Almost all varieties of ESP-12 and new ESP-07 have 4 megabytes on board. The amount of memory can be determined by the marking of the flash chip, viewed in the Flash Download Tool or on the /debug tab. The marking looks like 25QXX, where XX is the volume in megabits, for example 25Q32 has 32 megabits = 4 megabytes on board.

Determining the memory size using the ip_adr/debug tab:

The debug tab contains various useful information, including the real size of the flash memory chip in the Flash real size line, as well as the memory size set in the flash set size program, which is important for proper OTA support.

If you are not registered in the designer, then you can download the assembled firmware on the main page, where 2 lightweight firmware options are available:

Option with OTA support with chip memory capacity of 1 MB and higher. It is necessary to select a memory size of 1 MB in the flashing program!! Modules with a flash memory size of 512KB are not supported by OTA mode!!

Option without OTA support. If the size of the received file (one file) is more than 496kb, then flash memory support of at least 1 megabyte is required!! Compared to OTA mode, this option has significantly fewer enabled options.

The ability to further update the firmware via OTA is available only to those who have activated keys!

If you have problems starting the firmware, then be sure to look at the paragraph below about solving problems with the firmware!

Building firmware in the constructor

The designer allows you to assemble the firmware to suit your requirements, including in the firmware only those functions and sensors that are needed.

It makes no sense to enable all the options in the firmware - in this case, the firmware may not be assembled because it will not fit into the module. It's better to rebuild the firmware again if you want to try other options.

Some options have additional settings, which are located in the gear icon. There you can select the available number of, for example, thermostats or other options. If the quantity changes due to dynamic settings, other module options may disappear after a subsequent update. During initial setup, it is advisable to immediately select the required number of options so that such problems do not arise.

When initially assembling the firmware, it is recommended to use the OTA option so that the next update is possible via the Internet without using a programmer connection. With the OTA option, more options can be enabled, but the memory on the module is required to be at least 1 megabyte!!

When building the firmware, you can choose different SDKs. Recommended SDK version 1.3.0. In new versions, a problem has been noticed with the access point mode (Safe Mode)(???), but there are no problems with the reliability of communication with the router. SDK is a set of libraries and functions from the chip manufacturer for the operation of the device.

After clicking the “compile” button, after a while the firmware designer will provide download links:

In non-OTA mode, you can flash the firmware files in one file - then all module settings, if they have been reset. If you are updating the firmware and do not want the settings to be deleted, then you need to update the firmware with two files at the addresses indicated in the file name.

In OTA mode, it is enough to upload the firmware with one file. But 0x81000.bin may be required if you want to update the firmware via cable after using OTA when the user2.bin file is loaded - in this case, updating the firmware with one file will not update the active firmware.

Connecting the module for firmware

To flash the ESP8266 firmware, you need a USB-UART adapter or Arduino. ESP8266 needs to provide a supply voltage of 3.3V and a current of 200..300mA. It is not recommended to connect 3.3V power from ARDUINO or USB-UART - the module may not operate stably due to lack of current. It is recommended to use stabilizer type 1117.

Connecting ESP8266 to USB-UART: It is necessary to connect the common GND (minus) pins. RX from USB-UART to TX ESP, TX from USB-UART to RX ESP. We also connect the 3.3V power supply.

Connecting ESP8266 to Arduino: It is necessary to connect the common pins GND (minus). RX for Arduino to RX ESP, TX for Arduino to TX ESP. We also connect the 3.3V power supply. RESET on Arduina must be connected to GND.

On the ESP8266 module, the CH_EN pin must be connected to +3.3V in order to turn on the chip.

GPIO 0 during programming, must be connected to GND (ground) before turning on the power. After successful firmware, GPIO 0 must be disconnected from GND. If GPIO 15 is output on the module, then it must be connected to GND via a 10 kOhm resistor on a permanent basis!!

If your esp8266 module already has a USB-UART on board (for example Wemos, NodeMCU), then the above steps are not required.

Module firmware

First you need to install drivers for your USB-UART adapter or Arduino.

Firmware via Nodemcu Flasher: Set the Flash size parameter on the Advanced tab in accordance with the selected flash memory size (in bytes). Set the flash operating mode to QIO (when using GPIO 9/10 - DIO). We do not touch the remaining parameters. On the Config tab, specify the path to the firmware file with address 0x0000. On the Operation tab, select the COM port and press the FLASH button.

Firmware via Flash download tool: The steps are the same.

Firmware via Flasher for website. The program has a Russian-language interface and is supported by both Windows and Linux systems. At the moment, the firmware goes only to the 0x0000 file address "Download in one file (0x00000)". With the API key installed, automatic downloading is possible pre-assembled firmware directly from the designer (only with OTA mode). To clear the memory, instead of using the form, you can use the “erase chip before flashing” option.

For ESP8285 modules and modules with PN25F08B memoryDOUT memory mode required!!

Firmware via esptool. Example command esptool.py --port /dev/ttyUSB0 write_flash -fs 8m 0x00000 esp8266.bin . where the -fs 8m parameter is needed only to indicate the size for one-megabyte firmware.

Flashing the ESP INIT DATA file

It is recommended to flash the esp_init_data_default.bin file into the module with default calibrations; these settings affect the operation of wifi and adc. In most cases, modules work correctly without this file. The latest SDKs may not launch at all without this file.

The file firmware address depends on the installed flash memory size:

0x7c000 for 512 kB.

0xfc000 for 1 MB.

0x3fc000 for 4 MB.

0xffc000 for 16 MB.

You can also download these settings using the GET command. http:///configinit?def=1, the latest SDKs themselves register these settings.

Launching the module

When turned on for the first time, the module switches to mode safe mode automatically because it does not contain the access point name. In mode safe mode V a dot with the name will appear on the air WiFi-IoT(in firmware up to 10/12/16 homessmart), which you can connect to using a smartphone or laptop.

You can also get into safe mode by short-circuiting RX and TX and restarting the module, or by pressing the RESET button on the ESP8266 3 times (with a press interval of about a second).

1. Using Captive Portal, the mobile device will display a connection notification, which, when clicked, automatically opens the main web page of the module. You can also enter the module by entering the address in the browser iot.local(or any other, for example iot.ru). Captive Portal is not supported if the firmware is built on SDK 0.9.5!

2. After a successful connection, go manually to the address http://192.168.4.1 using a web browser.

Next, we configure the connection to our router on the main tab of the web interface.You need to enter the data of your access point into the WiFi options fields. To connect to the router, select the “Station mode” mode. After pressing the set button, the IP address will appear below, which you can access within your wireless network.

You can also set your login and password on the web interface settings pages. The length of the login and password is no more than 8 characters. A password will be required for all settings tabs. And with the "Full Security" option installed, all GET control requests are also applied. In safe mode, no password is requested!

On this tab you can set a name for the module, which will be displayed on the main page and in the flymon system, as well as in the topic on the MQTT server.

The above steps are not required if the firmware was compiled with the option Default settings, where the router parameters and IP address were pre-registered. After successful firmware installation and reboot, you can immediately access the specified IP address of the module within your Wi-Fi network.

Solving firmware problems

Sometimes, after third-party firmware or garbage, the module may not start and additional steps must be taken. It is necessary to erase flash memory at address 0x00000. Next, we flash the firmware itself again.

For some users, even after clearing with a blank, the module does not start or starts only when the 512 kb or 4 mb mode is set, perhaps this is due to the low quality of flash memory or its partial incompatibility with the ESP8266 chip. According to some information from users, replacing the memory chip helps.

If the message “Error flash size! (code 0x1)” is displayed on the main page of the module, then this means that 1 megabyte firmware was flashed in 512 kb mode. In this case, Safe Mode is activated and the module may malfunction due to such incorrect settings. Make sure that the required memory size is set on the module - this can be seen on the IP_ADDRESS/debug web tab in the Flash real size line. The memory capacity mode is indicated in the firmware program.

If the message “Error flash size! (code 0x2)” is displayed on the main page of the module, then this module has only 512kb of flash memory and this means that you need to use the firmware without the 1 megabyte mode enabled or not use OTA. You can also resolder the flash memory chip to a more capacious one.

IMPORTANT!! If the module cannot obtain an IP address. The connect status is constantly hanging, so it is recommended to enter the IP address manually below. To do this, you need to select the Static IP mode and enter the IP of the module and the IP of the gateway (IP of the router). After this, you can access the module already within the network using the IP address that you specified in the settings.

Sometimes the status is connect may hang if the encryption type on the router is enabled, which is not supported by the ESP8266 chip.

Saving settings to a file

Module settings can be saved to a file, excluding WI-FI settings, GPIO states, and a list of DS18B20 sensors. The file must be downloaded from IP_ADDRESS/configsave.bin. It is written back to the module via the programmer at address 0x3C000 for 512kb firmware, 0x7C000 for 1mb. The settings can also be downloaded via esptool.py using the example below by substituting the desired address.

You can download WI-FI settings at IP_ADDRESS/configsave.bin?pg=66 for 512kb, IP_ADDRESS/configsave.bin?pg=130 for 1 meg. You can download it via esptool.py with the command esptool.py read_flash 0x7E000 4096 mywifi_settings.bin for 512 kb (For 1024 kb the address will be 0xfe000).

Useful links:

Video instruction according to setup from Umka.

Many users have already turned their attention to the ESP8266-12 chip, released by Espressif. Its cost is significantly cheaper compared to a standard Bluetooth adapter board, and despite its smaller dimensions, it has significantly greater capabilities. Now all home enthusiasts have the opportunity to work on a Wi-Fi network in two modes at once, that is, connect their computer to any access points or turn it on as such a point.

On the other hand, you need to correctly understand that such boards are not just shields intended only for Wi-Fi communication. The ESP8266 itself is a microcontroller that has its own UART, GPIO and SPI interfaces, that is, it can be used as completely autonomous equipment. After the release of this chip, many called it a real revolution, and over time, such devices will begin to be built into even the simplest types of equipment, but for now the device is relatively new and there is no stable firmware for it. Many specialists around the world are trying to invent their own firmware, because uploading them to the board is actually not difficult, but despite various difficulties, the device can already be called quite usable.

At the moment, only two options for using this module are being considered:

  • Using the board in combination with an additional microcontroller or a computer that will control the module via UART.
  • Independent writing of firmware for the chip, which allows you to later use it as a self-sufficient device.

It is quite natural that we will not consider independent firmware in this case.

Looking at ease of use and good performance, many people prefer the ESP8266 model among the many microcontrollers. Connecting and updating the firmware of this device is extremely simple and affordable, and is performed on the same hardware on which the equipment is connected to the computer. That is, also via a USB-TTL converter or, if someone prefers other connection options, it can be done via RPi and Arduino.

How to check?

In order to check the functionality of a newly purchased device, you will need to use a special stabilized voltage source rated at 3.3 volts. It’s worth noting right away that the real supply voltage range of this module is from 3 to 3.6 volts, and supplying an increased voltage will immediately lead to the fact that you will simply damage your ESP8266. After such a situation, firmware and other software may begin to work incorrectly, and you will need to repair the device or somehow fix it.

To determine the functionality of this microcontroller model, you just need to connect three pins:

  • CH_PD and VCC are connected to the 3.3 volt supply.
  • GND connects to ground.

If you are not using ESP-01, but some other module, and it already initially has an output GPIO15, then in this case you will need to additionally connect it to ground.

If the factory firmware started up normally, then in this case you can see and then the blue light will blink a couple of times. However, it is worth noting that not all ESP8266 series devices have a red power indicator. The firmware on some devices does not provide for the red indicator to light up if the module does not have one (in particular, this applies to the ESP-12 model).

Once connected, a new access point will be activated on your wireless network, which will be called ESP_XXXX, and it will be discoverable from any device that has access to Wi-Fi. In this case, the name of the access point directly depends on the manufacturer of the firmware you are using, and therefore may be something different.

If the point does appear, you can continue experimenting, otherwise you will need to re-check the power supply, as well as the correctness of the GND and CH_PD connections, and if everything is connected correctly, then most likely you are still trying to use a broken module or on It simply has firmware installed with non-standard settings.

How to quickly connect it?

The standard kit required to connect this module includes the following:

  • the module itself;
  • solderless breadboard;
  • a full set of female-male wires intended for a breadboard, or a special DUPONT M-F cable;
  • USB-TTL converter based on PL2303, FTDI or some similar chip. The best option is if RTS and DTR are also output to the USB-TTL adapter, since due to this you can achieve fairly fast loading of the firmware from some UDK, Arduino IDE or Sming, without even having to manually switch GPIO0 to ground.

If you are using a 5-volt converter, then in this case you will need to purchase an additional power stabilizer based on the 1117 chip or some similar one, as well as a power source (for a standard 1117, even an ordinary 5-volt smartphone charger is quite suitable). It is recommended not to use the Arduino IDE or USB-TTL as a power source for the ESP8266, but to use a separate one, as this can ultimately get rid of a lot of problems.

An expanded set to ensure comfortable and constant operation of the module requires the use of additional resistors, LEDs and DIP switches. In addition, you can also use an inexpensive USB monitor, which will allow you to constantly monitor the amount of current consumed, and also provide a little protection for the USB bus from

What do we have to do?

First of all, it is worth noting the fact that in the ESP8266 the controls may be slightly different depending on which specific model you are using. There are quite a lot of such modules available today, and the first thing you will need is to identify the model you are using and decide on its pinout. In this instruction we will talk about working with the ESP8266 ESP-01 V090 module, and if you are using some other model with a GPIO15 pin (HSPICS, MTDO), you will need to pull it to the ground both for the standard start of the module and to use the firmware mode.

After this, double check that the supply voltage for the connected module is 3.3 volts. As mentioned above, the permissible range is from 3 to 3.6 volts, and if it increases, the device fails, but the supply voltage may even be significantly lower than the 3 volts stated in the documents.

If you are using a 3.3 volt USB-TTL converter, then connect the module exactly as on the left side of the picture below. If you use exclusively five-volt USB-TTL, then pay attention to the right side of the figure. It may seem to many that the right circuit is more efficient due to the fact that it uses a separate power source, but in fact, in the case of using a 5-volt USB-TTL converter, it is highly desirable to also make an additional resistor divider to ensure matching of three-volt and five-volt logic levels, or simply use the level conversion module.

Connection features

The right figure shows the connection of UTXD (TX), as well as URXD (RX) of this module to five-volt TTL logic, and such procedures are carried out only at your own peril and risk. For the ESP8266, the description says that the module only works effectively with 3.3-volt logic. In the vast majority of cases, even when working with five-volt logic, the equipment does not fail, but such situations occasionally occur, so such a connection is not recommended.

If you do not have the opportunity to use a specialized 3.3-volt USB-TTL converter, you can use a resistor divider. It is also worth noting that in the right picture, the 1117 power stabilizer is connected without additional wiring, and this is a really working technology, but it is still best to use the 1117 connection diagram with capacitor wiring - you need to check it with the ESP8266 datasheet for your stabilizer or use a completely ready one module based on the 1117 base.

To start the module, you need to open the GPIO0-TND circuit, after which you can apply power. It is worth noting that everything needs to be done in exactly this order, that is, first make sure that GPIO0 is “hanging in the air”, and only then apply power to CH_PD and VCC.

How to connect correctly?

If you can spare more than one evening to properly connect the ESP8266 module, you can use a more stable option. In the diagram above you see a connection option with automatic firmware download.

It is worth noting that the image above does not show the use of free GPIOs or ADCs, and their connection will directly depend on what exactly you want to implement, but if you want to ensure stability, remember to pull all GPIOs to power and ADCs to ground using pull-up resistors.

If necessary, 10k resistors can be replaced with any others in the range from 4.7k to 50k, excluding GPIO15, since its value should be no more than 10k. The value of the capacitor that smoothes out high-frequency pulsations may be slightly different.

Connecting RESET and GPIO16 through the use of a 470 Ohm deep sleep resistor may become necessary when using the appropriate mode, since in order to exit deep sleep mode, the module performs a full reboot by applying a low level to GPIO16. Without this connection, deep sleep mode for your module will last forever.

At first glance, it may seem that GPIO0, GPIO1 (TX), GPIO2, GPIO3 (RX) and GPIO15 are busy, so you won’t be able to use them for your purposes, but in fact this is far from the case. A sufficiently high level on GPIO0 and GPIO2, as well as a low level on GPIO15, may be required only for the initial startup of the module, and in the future you can use them at your discretion. The only thing worth noting is to remember to ensure the required levels before performing a full reset of your equipment.

You can also use TX, RX as an alternative to GPIO1 and GPIO3, but do not forget that after the module starts, each firmware begins to “pull” TX, while simultaneously sending debugging information to UART0 at a speed of 74480, but after the download will be successful, they can be used not only as UART0 in order to exchange data with another device, but also as standard GPIOs.

For modules that have a small number of wired pins (for example, ESP-01), there is no need to connect undone pins, that is, only GND, CH_PD, VCC, GPIO0, GPIO2 and RESET are wired on the ESP-01, and these are the ones you need will need to be tightened. There is no need to solder directly to the ESP8266EX chip and then pull the bare pins unless you really need it.

Such wiring diagrams were used after a large number of experiments carried out by qualified specialists and collected from a lot of different information. It is worth noting that even such schemes cannot be considered ideal, since a number of other, no less effective options can be used.

Connection via Arduino

If for some reason you do not have a 3.3 volt USB-TTL converter, then the ESP8266 WiFi module can be connected via Arduino with a built-in converter. Here you will need to first turn your attention to three main elements:

  • When used with the ESP8266, Arduino Reset is initially connected to GND to prevent the microcontroller from starting up, and in this form it was used as a transparent USB-TTL converter.
  • RX and TX were not connected “at the crossroads”, but directly - RX-RX (green), TX-TX (yellow).
  • Everything else is connected exactly as described above.

What to consider

This circuit also requires matching the TTL levels of 5 volts on the Arduino, as well as 3.3 volts on the ESP8266, but it can function quite well either way.

When connected to an ESP8266, the Arduino may be equipped with a power regulator that cannot handle the current required by the ESP8266, so you will need to check the datasheet for the one you are using before activating it. Do not try to connect any other power-consuming components with the ESP8266, as this may cause the power regulator built into the Arduino to simply fail.

There is also another ESP8266 and Arduino connection scheme that uses SoftSerial. Since for the SoftSerial library the port speed of 115200 is too high and cannot guarantee stable operation, this connection method is not recommended, although there are some cases in which everything works quite stably.

Connection via RaspberryPi

If you do not have any USB-TTL converters at all, then you can use RaspberryPi. In this case, for the ESP8266, programming and connection are carried out almost identically, but everything here is not so convenient, and in addition you will also need to use a 3.3-volt power stabilizer.

To begin with, we connect RX, TX and GND of our device to the ESP8266, and take GND and VCC from the one designed for 3.3 volts. Here, special attention should be paid to the fact that you need to connect all GND devices, that is, the RaspberryPi stabilizer and ESP8266. If the stabilizer built into your device model can withstand up to 300 milliamps of additional load, then in this case connecting the ESP8266 is quite normal, but this is all done only at your own peril and risk.

Setting up parameters

Once you have figured out how to connect the ESP8266, you need to make sure that the drivers for your devices are installed correctly, as a result of which a new virtual serial port has been added to the system. Here you will need to use a program - a serial port terminal. In principle, you can choose any utility to suit your taste, but you must correctly understand that any command that you send to the serial port must have the trailing characters CR+LF at the end.

The CoolTerm and ESPlorer utilities are quite widespread, and the latter allows you not to enter the ESP8266 yourself, and at the same time makes it easier to work with lua scripts under NodeMCU, so it can be used as a standard terminal.

To connect normally, you will have to do a lot of work, since the firmware for the ESP8266 is mostly varied and activation can be carried out at different speeds. To decide on the best option, you will need to go through three main options: 9600, 57600 and 115200.

How to sort?

To begin, connect to the virtual serial port in the terminal program, setting the parameters to 9600 8N1, then perform a complete reboot of the module, disconnecting CH_PD (chip enable) from the power supply, and then reactivate it again by jerking CH_PD. You can also perform a short RESET to ground to reset the module and observe the data in the terminal.

First of all, the device's LEDs should appear exactly as shown in the test procedure. You should also observe a set of different characters in the terminal, which will end with the line ready, and if it is not there, a reconnection to the terminal is carried out at a different speed, followed by a reboot of the module.

When you see this line in one of the speed options, you can consider the module ready for work.

How to update the firmware?

Once you install the ESP8266, it will only take a few seconds to connect the device, and then you can start updating the firmware. To install new software you need to do the following.

To get started, download the new firmware version from the official website, and also download a special utility for firmware. Here, special attention should be paid to what operating system is installed on the machine with which the ESP8266 works. It is best to connect the device to systems older than Windows 7.

For standard Windows operating systems, it would be optimal to use a program called XTCOM UTIL, which is especially convenient to use if the firmware consists of only one file. The best multi-platform option is the esptool utility, which, however, requires python, as well as the need to specify parameters via the command line. In addition, the ESP8266 allows you to conveniently connect the main functions with the Flash Download Tool, which has a fairly large number of settings, as well as a convenient technology for installing firmware from several files.

Next, disconnect your terminal program from the serial port, and also completely disconnect CH_PD from the power supply, connect GPIO0 of the module to GND, and after that CH_PD can be returned back. Ultimately, just run the modular firmware program and load it into the ESP8266 relay.

In the vast majority of cases, the firmware is loaded into the module at a speed of around 115200, but a special mode provides automatic speed distribution, as a result of which the firmware can be carried out at a speed of more than 9600, updating the available functions of the ESP8266. Arduino was used for connection or USB-TTL - it does not play a special role here, and here the maximum speed already depends on the length of the wires, the converter used and a number of other factors.

Best articles on the topic