This small module allows microcontrollers to connect to a Wi-Fi network and make simple TCP/IP connections using Hayes-style (AT) commands.

ESP01 pins
ESP01 programmer

GPIO0 pin must be pulled to GND, and the GPIO2 pin must be pulled HIGH, to +3.3V, to enable bootloader mode. RST pin pulled GND to restart module.

We use USB to TTL module to connect ESP-01 and computer


I made a simple case for the board:

Programming board inside the case

Arduino notes

Arduino boards manager url:
GPIO0 is LED 0
GPIO2 is LED 2
TX is LED 1 (Blue LED on board)
Arduino IDE settings

Updating ESP8266 firmware on linux

1. First we need a tool that can flash the firmware to the ESP8266: esptool. It can flash any firmware on the ESP8266, not only the official Espressif Systems one.

Esptool repository on github:

git clone
Git clone example

Let’s try whether it works:

cd esptool
python -h
pyserial not installed

As it says, we need to install PySerial library.

sudo apt install python-serial
Install PySerial library

Now esptool works:

2. We need to find with serial port is connected to ESP8266. It is usually on linux something like /dev/ttyUSB0 or /dev/ttyUSB1 .The number can be different.

ls -l /dev/tty* | grep USB
Our serial port is /dev/ttyUSB0

With out ‘| grep USB’ is shows all available serial ports:

ls /dev/tty*
ls /dev/tty* example

Another way to find serial port

ll -R /dev |grep "188, *0"

3. Download ESP8266 AT Bin V1.6.2 from:

Unzip it and move “ESP8266_AT_Bin_V1.6.2” to home directory or change the comant to ponit to your file locations.

Files and addresses
python -p /dev/ttyUSB1 -b 115200 write_flash 0x0000 ../ESP8266_AT_Bin_V1.6.2/bin/boot_v1.7.bin 0x01000 ../ESP8266_AT_Bin_V1.6.2/bin/at/512+512/ 0xfc000 ../ESP8266_AT_Bin_V1.6.2/bin/esp_init_data_default_v08.bin 0x7e000 ../ESP8266_AT_Bin_V1.6.2/bin/blank.bin 0xfe000 ../ESP8266_AT_Bin_V1.6.2/bin/blank.bin
ESP8266 firmware update

Restart ESP8266 and open Arduino IDE serial monitor and set baud rate 74880 (or 115200) and line ending should be “Both NL & CR“. Send command AT+GMR

Some AT commands

ATTest AT startup
AT+GMRView version info
AT+RSTRestart module

Wifi Functions

AT+CWMODE=3Change the working mode to 3.
1 – Station mode, wifi client.
2 – AP (Access Point) mode, wifi server.
3 – AP +Station mode
AT+CWMODE?Retorns current wifi mode
AT+CWJAP=”you ssid”,”password”Join wifi router spot
AT+CWLAPList allavailable Access Points.
ECN: 0 – open,
1 – wep,
2 – wpa_psk,
3 – wpa2_psk,
4 – wpa_wpa2_psk,
RSSI: signal strength
AT+CWQAPDisconnect from Access Point
AT+CWSAP=”ssid”,”pwd”,chl,ecnSet configurarion of softAP mode
ECN: 0 – open
1 – wep
2 – wpa_psk
3 – wpa2_psk
4 – wpa_wpa2_psk
PWD: max 64 bytes
AT+XWLIFGet ip of stations wich are connected to esp8266 softAP.
AT+CWDHCP=mode,enEnable/Disable DHCP
1 – station mode
2 – AP mode
3 – AP + station mode
0 – enable DHCP, 1 – disable
AT+CIPSTAMAC=”mac”Set mac address of esp8266 station
AT+CIPAPMAC=”mac”Set mac address of esp8266 softAP
AT+CIPSTA=”ip”Set ip sddress of ESP8266 station
AT+CIPAP=”ip”Set ip sddress of ESP8266 softAP


AT+CIPSTATUSGet information about connection
stat: 2 – got ip
3 – connected
4 – disconnected
type: tcp or udp
tetype: 0 – esp8266 as a client, 1 – as a server


1 Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.