Update AT firmware to ESP8266 (ESP12E) in Linux

During the development of SW support of BigClown Wi-Fi module with ESP8266 in ESP12E module. Martin Grames found issue with using of SNTP or SSL, you have to update AT firmware.

Martin updated AT firmware for ESP12F and then wrote an example code cryptoclock. I tried update my Wi-Fi module with ESP12E and then I found a problem.

This tutorial should help you to update AT firmware in operating system based on Linux (in my case Linux Mint).

At first, download esptool, it is tool for uploading of binary file to ESP8266.
https://github.com/espressif/esptool

Unzip the ZIP package and run the installation in terminal.

Pro instalaci napíšete /cestaKsouboru/ pip install esptool

Create folder BIN in esptool folder and copy binary files from this link. I choose ESP8266 AT Bin V1.6.2 (8 Jun 2018). It is the latest version of AT FW which is working with 1MB FLASH, for 2MB FLASH version there are newer BIN files.

The documentaion is available on this website (ESP8266 Non-OS AT Instruction Set).

Copy these files to BIN folder in esptool. (names of files can be different.

user1.1024.new.2.bin

esp_init_data_default_v08.bin

boot_v1.7.bin

blank.bin

Check the memory layout in ESP8266 – you can find it in README of the downloaded directory.
# BOOT MODE

## download

### Flash size 16Mbit: 512KB+512KB

boot_v1.2+.bin 0x00000

user1.1024.new.2.bin 0x01000

esp_init_data_default.bin 0x1fc000 (optional)

blank.bin 0x7e000 & 0x1fe000

Then connect USB-UART convertor to ESP as following
RX – TX

TX – RX

IO0 – GND

CH_EN – VCC (3.3V)

GND – GND

Note from Martin – you can connect RESET of USB-UART convertor to CH_PD, IO0 is connected to DTR of USB-UART. After uploading the IC is automatically reseted.

And connect power supply VCC of ESP – VCC (3.3V).

IO0 has to be grounded (or connected to DTR) before powering.

Upload files
/esptool-master $ sudo python esptool.py –port /dev/ttyUSB0 write_flash

0x00000 ./bin/boot_v1.7.bin

0x01000 ./bin/user1.1024.new.2.bin

0x1fc000 ./bin/esp_init_data_default_v08.bin

0x7e000 ./bin/blank.bin

0x1fe000 ./bin/blank.bin

From esptool

esptool.py v2.8-dev

Serial port /dev/ttyUSB0

Connecting….

Detecting chip type… ESP8266

Chip is ESP8266EX

Features: WiFi

Crystal is 26MHz

MAC: 5c:cf:7f:e1:0f:e4

Uploading stub…

Running stub…

Stub running…

Configuring flash size…

Auto-detected Flash size: 2MB

Flash params set to 0x0030

Compressed 4080 bytes to 2936…

Wrote 4080 bytes (2936 compressed) at 0x00000000 in 0.3 seconds (effective 123.6 kbit/s)…

Hash of data verified.

Compressed 408388 bytes to 293527…

Wrote 408388 bytes (293527 compressed) at 0x00001000 in 25.9 seconds (effective 125.9 kbit/s)…

Hash of data verified.

Compressed 128 bytes to 75…

Wrote 128 bytes (75 compressed) at 0x001fc000 in 0.0 seconds (effective 85.2 kbit/s)…

Hash of data verified.

Compressed 4096 bytes to 26…

Wrote 4096 bytes (26 compressed) at 0x0007e000 in 0.0 seconds (effective 4679.1 kbit/s)…

Hash of data verified.

Compressed 4096 bytes to 26…

Wrote 4096 bytes (26 compressed) at 0x001fe000 in 0.0 seconds (effective 4675.9 kbit/s)…

Hash of data verified.

Leaving…

Hard resetting via RTS pin…

Disconnect IO0 from GND restart the ESP module (it is not neccesary if you connect IO0 with DTR and CH_PD with RESET).

Test of communication – set baudrate to 119200 and connect USB-UART convertor to ESP module (CH_PD and VCC = VCC of convertor).

AT+GMR

If you will see this, that’s right.

AT version:1.6.2.0(Apr 13 2018 11:10:59)

SDK version:2.2.1(6ab97e9)

compile time:Jun 7 2018 19:34:26

Bin version(Wroom 02):1.6.2

OK


Share the article:
Show your
Maker soul!
Buy a T-Shirt
Coffee for Chiptron
Give a boost to the next article

Related Articles

After my experiences with ESP12E (NodeMCU, ESP8266) and SHT75 temperature/humidity sensor I decided to make second version of board used for weather station. The first version is available on https://time4ee.com/articles.php?article_id=33. The changes of previous board are not so important. Do…

Wi-Fi module is used for Wi-Fi connection with your server and sending/receiving data with BigClown IoT platform. Wi-Fi connectivity is missing in the offer of BigClown. If you use Wi-Fi module and Wi-Fi connectivity is enough for your project, you…

Originaly, this board – Meteo v2, was designed like replacement of general analog thermometer which costs ~1 USD. But, thanks to comments of makers, the board was redesigned to versatile board which you can use for everthing you need. Meteo…

The weather station is the first DIY project which makers do after sometime of playing with electronics. It is project which is helpful and makers using this long time. This article introduce my weather station which is based on board…

If you follow me on social networks (facebook, twitter and google plus) maybe you saw a few posts which I shared. My the latest project is watering system with popular WiFi chip called ESP8266, ESP12E module, NodeMCU development board. This…