This is the documentation for the latest (master) development branch of Zephyr. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

ESP-8266 Modules

Overview

ESP-8266 radio is a cost-effective Wi-Fi SOC module which allows any microcontrollers to easily access to WiFi network. This module supports the standard IEEE802.11 b/g/n protocol, built-in complete TCP/IP protocol stack. Users can use this series of modules to add networking capabilities to existing devices.

The simplest module that uses ESP-8266 is ESP-01. This is a generic shield configuration that allows any ESP-8266 module variation including ESP-12E/F.

ESP-01

Pins Assignment of the ESP-01 Module

Connector Pin

Function

GND

POWER GND

GPIO1

U0_TXD

GPIO2

CHIP_EN

ENABLE (VDD = RUN, GND = LOW POWER)

GPIO0

EXT_RST

GPIO3

U0_RXD

VDD

POWER +3.3V

Requirements

This shield requires a board which provides a configuration that allows an UART interface. (see Shields for more details).

The ESP-8266 should be loaded with the ESP8266 AT Bin 1 software which is available at Espressif Systems web site. The ESP-01 module have up to 1MB of flash and the last available stack that fits on this device is ESP8266 AT Bin V1.6.2. This version is command compatible with ESP8266 AT Bin 1.7.x which is the minimal version supported by the ESP WIFI driver.

The ESP-8266 Modules that have 2MB or more is highly recommended upgrade to version 1.7.x for better future compatibility.

This tutorial won’t explain how firmware must be upgraded. However, it will present some tips to easily success. The ESP WIFI was tested with an ESP-01 with 1MB flash using Boot Mode and with Flash size 8Mbit: 512KB + 512KB. The ESP8266 AT Bin 1.7.x available requires the following partition configuration to works:

ESP8266 AT Bin V1.7.3
  • Tips

    • Don’t forget to erase Flash before upgrade

    • Upgrade all binaries at same time.

    • ESP-8266 bootloader won’t send garbage. Try connect at 74880 bps if you module have 26MHz crystal to detect boot fails.

Programming

Set -DSHIELD=esp_8266 when you invoke west build. For example:

# From the root of the zephyr repository
west build -b sam4e_xpro samples/net/wifi -- -DSHIELD=esp_8266