You are on page 1of 47

ESP8266

Status

Current version V 0.3

Author Yu Fei&Jackie

Completion Date 2014.9.2

Reviewer

Completion Date

[ ] CONFIDENTIAL

[ ] INTERNAL

[ ] PUBLIC

1|P a g e Espressif Systems Sept 2,2014




2014.6.17 0.1
2014.9.2 0.2 Jackie 1.12 1.2 1.3

2014.9.2 0.3 AT

URL

Wi-Fi Wi-Fi

2014

2|P a g e Espressif Systems Sept 2,2014



................................................................................................................ 2

........................................................................................................................ 3

1. ...................................................................................................... 5

1.1. ........................................................................................................... 5

1.1.1. ........................................................................................................... 6

1.1.2. ................................................................................................... 7

1.1.3. ........................................................................................... 8

1.2. ................................................................................................... 9

1.2.1. ................................................................................................... 9

1.2.2. ................................................................................................. 11

1.2.3. ESP8266 .............................................................................. 12

1.2.4. ................................................................................................. 13

1.3. ................................................................................................. 13

1.3.1. UART ............................................................................... 13

1.3.2. ............................................................................. 13

1.3.3. ............................................................................. 14

1.3.4. WIFI ................................................................ 15

2. .................................................................................................... 17

2.1. ................................................................................................. 17

2.1.1. ESP8266 SoftAP ...................................................................... 17

2.1.2. ESP8266 station ..................................................................... 17

2.1.3. ESP8266 SoftAP + station ............................................... 18

2.2. ................................................................................................. 18

2.3. UART ....................................................................................... 19

3|P a g e Espressif Systems Sept 2,2014


2.4. ......................................................................................................... 20

2.5. ................................................................................................. 20

2.6. ................................................................................................. 21

3. .................................................................................................... 22

3.1. Website .................................................................................. 22

3.1.1. ................................................................................................. 23

3.1.2. ................................................................................................. 26

3.2. ......................................................................................... 28

3.2.1. ......................................................................................... 28

3.2.2. ................................................................................................. 28

3.2.3. ................................................................................................. 28

3.3. ................................................................................................. 29

3.3.1. ......................................................................................... 29

3.3.2. ......................................................................................... 29

3.3.3. ................................................................................................. 30

4. AT ............................................................................................... 31

4.1. AT ........................................................................................ 31

4.1.1. AT ............................................................................................ 31

4.1.2. ..................................................................................................... 32

5. ............................................................................................ 46

.......................................................................................... 47

4|P a g e Espressif Systems Sept 2,2014


1.

1.1.

ESP8266 SOC

WiFi

MAC

balun

SDIO

CPU SPI


GPIO

I2C
VCO 1/2

SRAM

1ESP8266

ESP8266 WiFi

slave Host

ESP8266

WiFi

SPI/SDIO

AHB

ESP8266 GPIO

5|P a g e Espressif Systems Sept 2,2014


ESP8266 balun

PCB

ESP8266VoIP/

//DDR/LVDS/LCD

1.1.1.

802.11 b/g/n

WIFI @2.4 GHz WPA/WPA2

11.5mm*11.5mm

10 bit ADC

TCP/IP

TR balunLNA

PLL

802.11b + 19.5dBm

10uA

32 CPU

SDIO 2.0 SPIUART

STBC1x1 MIMO2x1 MIMO

A-MPDU A-MSDU 0.4 s

2ms

1.0mW (DTIM3)

-40 ~ 125

6|P a g e Espressif Systems Sept 2,2014


1.1.2.

CCC/FCC/CE

802.11 b/g/n

2.4G-2.5G(2400M-2483.5M)

802.11 b: 20 dBm

802.11 g: 17 dBm

802.11 n: 14 dBm

802.11 b: (11Mbps) -91db

802.11 g: (54Mbps) -75db

802.11 n: (MCS7) -72db

PCB

IPEX

UART

PWMGPIO

3.3V

80mA

-40~125

5x5mm

N/A

station/softAP/SoftAP+station

WPA/WPA2

WEP/TKIP/AES

7|P a g e Espressif Systems Sept 2,2014


SDK

IPv4TCP/UDP/HTTP/FTP

AT+WebSite

Android/iOS

1.1.3.

ID

8|P a g e Espressif Systems Sept 2,2014


1.2.

1.2.1.

2ESP8266

Table 1 ESP8266
Pin Name Function

1 VDDA 3.0 ~3.3V

50

2 LNA

3 VDD3P3 3.0~3.3V

4 VDD3P3 3.0~3.3V

5 VDD_RTC NC(1.1V)

6 TOUT adc

7 CHIP_EN

9|P a g e Espressif Systems Sept 2,2014


8 XPD_DCDC Deep-Sleep WakeupGPIO16

9 MTMS GPIO14; HSPICLK

10 MTDI GPIO12;HSPIQ

11 VDDPST IO(1.8V~3.3V)

12 MTCK GPIO13;HSPID

13 MTDO GPIO15;HSPICS

14 GPIO2 Flash UART TxGPIO2

15 GPIO0 GPIO0;SPICS2

16 GPIO4 GPIO4

17 VDDPST IO(1.8V~3.3V)

18 SDIO_DATA_2 SD_D2 ( 200);SPIHD; HSPIHD

19 SDIO_DATA_3 SD_D3 ( 200); SPIWP; HSPIWP

20 SDIO_CMD SD_CMD( 200); SPICS0

21 SDIO_CLK SD_CLK ( 200); SPICLK

22 SDIO_DATA_0 SD_D0 ( 200); SPIQ

23 SDIO_DATA_1 SD_D1 ( 200); SPID

24 GPIO5 GPIO5

25 U0RXD Flash UART RxGPIO3

26 U0TXD GPIO1; SPICS1

27 XTAL_OUT BT

28 XTAL_IN

29 VDDD 3.0~3.3V

30 VDDA 3.0~3.3V

31 RES12K 12k

32 EXT_RSTB reset ()

GPIO2GPIO0MTDO 3bit SDIO


10 | P a g e Espressif Systems Sept 2,2014
1.2.2.

Table 2 ESP8266

-45 125

IPC/JEDEC 260

J-STD-020

0 3.8 V

I/O 0 3.3 V

TAMB=25 2 KV

TAMB=25 1 KV

Table 3 ESP8266

802.11b, CCK 11Mbps, P OUT=+17dBm 170 mA

802.11g, OFDM 54Mbps, P OUT =+15dBm 140 mA

802.11n, MCS7, P OUT =+13dBm 120 mA

802.11b, 1024 , -80dBm 50 mA

802.11g, 1024 , -70dBm 56 mA

802.11n, 1024 , -65dBm 56 mA

Modem-Sleep 15 mA

Light-Sleep 0.9 mA

Deep-Sleep 10 uA

5 uA

11 | P a g e Espressif Systems Sept 2,2014


Modem-Sleep CPU PWM I2S WiFi

802.11 U-APSD WiFi Modem DTIM3

sleep 300mS 3mS AP Beacon 15mA

Light-Sleep CPU WiFi WiFi

802.11 U-APSD WiFi Modem CPU DTIM3

sleep 300mS 3mS AP Beacon 0.9mA

Deep-Sleep WiFi 100

300S 0.3~1s AP , 1mA

1.2.3. ESP8266

3ESP8266

12 | P a g e Espressif Systems Sept 2,2014


1.2.4.

4ESP8266

1.3.

1.3.1. UART

UARTpin

UART0: (PIN 25) U0RXD+ (PIN 26) U0TXD---

UART1: (PIN 14) GPIO2( TXD)---

uart0 uart1

4ESP8266

1.3.2.

pin
13 | P a g e Espressif Systems Sept 2,2014
(PIN 9) MTMS---I2C_SCL

(PIN 14) GPIO2---I2C_SDA

(PIN 12) MTCK--- ()

(PIN 15) GPIO0---wifi

(PIN 10) MTDI---

(PIN 25) U0RXD---Button

(PIN 13) MTDO---LED

5demo

5 ESP8266

1.3.3.

pin

(PIN 9) MTMS---

PWM

(PIN 10) MTDI---

(PIN 13) MTDO---

(PIN 12) MTCK---

6demo

14 | P a g e Espressif Systems Sept 2,2014


6 ESP8266

1.3.4. WIFI

WIFIpin

(PIN 13) MTDO---

(PIN 15) GPIO0--- wifi

(PIN 12) MTCK---( 5s );

7WIFIdemo

15 | P a g e Espressif Systems Sept 2,2014


7 ESP8266 WIFI

16 | P a g e Espressif Systems Sept 2,2014


2.

2.1.

ESP8266 softAP station softAP + station

ESP8266

SoftAP

Station

2.1.1. ESP8266 SoftAP

ESP8266 softAP ESP8266 station

station ESP8266

ESP8266 ESP8266

User
Device

2.1.2. ESP8266 station

ESP8266 stationAP internet

17 | P a g e Espressif Systems Sept 2,2014


ESP8266 ESP8266


AP

ESP8266

2.1.3. ESP8266 SoftAP + station

ESP8266 softAP+station

station ESP8266 softAP ESP8266 station

AP internet




AP ESP8266

User
Device

2.2.

Host uart ESP8266ESP8266

ESP8266

uart HostESP8266

18 | P a g e Espressif Systems Sept 2,2014


SSID

password

TCP

client

IP

2.3. UART

ESP8266 UART 20ms

2KBESP8266

UART WIFI

20ms 2KB

19 | P a g e Espressif Systems Sept 2,2014


2.4.

ESP8266

WEP (only station)

WPA-PSK/TKIP

WPA-PSK/AES

WPA2-PSK/TKIP

WPA2-PSK/AES

2.5.

ESP8266 IOT

Modem-Sleep Light-Sleep Deep-Sleep

WiFi Modem WiFi Modem RTC

PLL

CPU CPU

10~20mA 0.5mA 10~20uA

CPU CPU

WiFi

PWM I2S WiFi

802.11 100

802.11 U-APSD

20 | P a g e Espressif Systems Sept 2,2014


U-APSD WiFi Modem 300S

WiFi Modem CPU 0.3~1s

DTIM3 AP ,

DTIM3 sleep 300ms

sleep 300ms 3mS AP 1mA

3ms AP Beacon

Beacon 0.9mA

15mA

2.6.

ESP8266

ESP8266

Espressif IoT SDK

21 | P a g e Espressif Systems Sept 2,2014


3.

3.1. Website

1 http://iot.espressif.cn/#/
->API: API

-> :

2
device key

22 | P a g e Espressif Systems Sept 2,2014


3

3.1.1.

3.1.1.1.

-> ->

23 | P a g e Espressif Systems Sept 2,2014


3.1.1.2.

24 | P a g e Espressif Systems Sept 2,2014


3.1.1.3.

Espressif

3.1.1.4.

25 | P a g e Espressif Systems Sept 2,2014


3.1.1.5.

3.1.2.

1 Activated/Total

26 | P a g e Espressif Systems Sept 2,2014


2 Espressif server

27 | P a g e Espressif Systems Sept 2,2014


3.2.

3.2.1.

Espressif ESP8266

FLASH_DOWNLOAD_TOOLS.exe

SecureCRTPortable.exe

NetAssist.exe

3.2.2.

ESP8266 softAP station

softAP

Phone PC station ESP8266 softAP

PC ESP8266 log

station

ESP8266 stationAP PC

ESP8266 log

3.2.3.

SSID ESP_XXXXXX (XXXXXX MAC 6)

WPA/WPA2
28 | P a g e Espressif Systems Sept 2,2014
7488081None

softAPIP 192.168.4.1

3.3.

3.3.1.

Phone station ESP8266 softAPESP8266 UART

ESP8266
WIFI UART
User Device

3.3.2.

ESP8266 stationAP internet

ESP8266


ESP8266
AP

ESP8266

29 | P a g e Espressif Systems Sept 2,2014


3.3.3.

IC Host UART ESP8266 ESP8266

User Device ESP8266


WIFI
UART

30 | P a g e Espressif Systems Sept 2,2014


4. AT

Espressif ESP8266 AT

4.1. AT

AT Wifi AT TCP/IP AT

4.1.1. AT

AT+<x>=?

AT+<x>?

AT+<x>=<>

AT+<x>

1 AT 4

2[ ]

3 115200

AT+CWSAP="ESP_756190","20130826",1,4

31 | P a g e Espressif Systems Sept 2,2014


4.1.2.

AT AT

AT+RST

AT+GMR

wifi

AT+CWMODE WIFI

AT+CWJAP AP

AT+CWLAP AP

AT+CWQAP AP

AT+CWSAP AP

AT+ CWLIF IP

TCP/IP

AT+CIPSTATUS

AT+CIPSTART TCP UDP

AT+CIPSEND

AT+CIPCLOSE TCP UDP

AT+CIFSR IP

AT+CIPMUX

AT+CIPSERVER

AT+CIPMODE

AT+CIPSTO

+IPD

32 | P a g e Espressif Systems Sept 2,2014


4.1.2.1. AT

AT AT

OK

AT None

4.1.2.2. AT+RST

AT+RST

OK

AT+RST None

4.1.2.3. AT+GMR

AT+GMR

<number>

AT+GMR OK

< number >8

4.1.2.4. AT+CWMODE

AT+CWMODE WIFI

+CWMODE:(<mode>)

AT+CWMODE=? OK

33 | P a g e Espressif Systems Sept 2,2014


+CWMODE:<mode>

AT+CWMODE? OK

OK

(AT+RST)

AT+CWMODE=<mode> <mode>

1 - Station

2 - AP

3 AP + Station

4.1.2.5. AT+CWJAP

AT+CWJAP AP

+ CWJAP:<ssid>

AT+ CWJAP? OK

AP

OK ERROR


AT+ CWJAP =<ssid>,<pwd> <ssid>

<pwd> 64

ASCII

34 | P a g e Espressif Systems Sept 2,2014


4.1.2.6. AT+CWLAP

AT+CWLAP AP

AP

+ CWLAP: <ecn>,<ssid>,<rssi>

OK

ERROR

AT+CWLAP

<ecn>0 OPEN

1 WEP

2 WPA_PSK

3 WPA2_PSK

4 WPA_WPA2_PSK

<ssid>

<rssi>

4.1.2.7. AT+CWQAP

AT+CWQAP AP

OK

AT+CWQAP=? None

OK
35 | P a g e Espressif Systems Sept 2,2014
AT+ CWQAP None

4.1.2.8. AT+ CWSAP

AT+CWSAP AP

AP

AT+CWSAP? +CWSAP:<ssid>,<pwd>,<chl>,<ecn>

None

OK ERROR


<ssid>
AT+CWSAP= <pwd> 64
<ssid>,<pwd>,<chl>, ASCII

<ecn> <chl>

<ecn>

0 OPEN

1 WEP

2 WPA_PSK

3 WPA2_PSK

4 WPA_WPA2_PSK

AP

36 | P a g e Espressif Systems Sept 2,2014


4.1.2.9. AT+CWLIF

AT+CWLIF IP

<ip addr>

AT+ CWLIF

OK

<ip addr> : IP

4.1.2.10. AT+ CIPSTATUS

AT+CIPSTATUS

OK

None


STATUS:<stat>

+ CIPSTATUS:<id>,<type>,<addr>,<port>,<tetype>

AT+ CIPSTATUS OK

<id> id 0-4

<type> TCP UDP

<addr>IP

<port>

<tetype>

0 client

1 server

37 | P a g e Espressif Systems Sept 2,2014


4.1.2.11. AT+CIPSTART

AT+CIPSTART TCP UDP

1) AT+CIPMUX=0

+CIPSTART:(<type>),(<IP

AT+CIPSTART=? address>),(<port>)

+CIPSTART:(<type>),(<domain

name>),(<port>)

OK

2) AT+CIPMUX=1

+CIPSTART:(id),(<type>),(<IP

address>),(<port>)

+CIPSTART: (id), (<type>

),(<domain name>),(<port>

None

OK -

ERROR

1)

(+CIPMUX=0) ALREAY CONNECT -

AT+CIPSTART=

<type>,<addr>,<port>

<id> 0-4 id

2) <type>

38 | P a g e Espressif Systems Sept 2,2014


(+CIPMUX=1) TCP tcp udp

AT+CIPSTART= UDP

<id><type>,<addr>, <addr>

<port> IP

<port>

4.1.2.12. AT+CIPSEND

AT+CIPSEND

OK

AT+CIPSEND=?

None

1) >

(+CIPMUX=0) length

AT+CIPSEND=<length>

2)

(+CIPMUX=1) ERROR

AT+CIPSEND= SEND OK

<id>,<length>

<id> id

<length>
39 | P a g e Espressif Systems Sept 2,2014
2048

>

AT+CIPSEND

20ms 2048

+++

4.1.2.13. AT+CIPCLOSE

AT+CIPCLOSE TCP UDP

OK

AT+CIPCLOSE=? None

OK

Link is not

AT+CIPCLOSE=<id>

<id> id

id 5

server id 5

40 | P a g e Espressif Systems Sept 2,2014


OK

AT+CIPCLOSE ERROR

None

unlink

4.1.2.14. AT+CIFSR

AT+CIFSR IP

OK

AT+CIFSR=? None

+CIFSR:<IP address>

OK

AT+ CIFSR ERROR

AP

<IP address> - IP (station)

4.1.2.15. AT+ CIPMUX

AT+CIPMUX

+CIPMUX:<mode>

41 | P a g e Espressif Systems Sept 2,2014


AT+CIPMUX? OK

None

OK

Link is builded


AT+CIPMUX=<mode> server

<mode>

42 | P a g e Espressif Systems Sept 2,2014


4.1.2.16. AT+ CIPSERVER

AT+CIPSERVER

server server

OK

AT+CIPSERVER= server

<mode>[,<port>]

<mode>

0 server

1 server

<port> 333

server server

client

AT+ CIPMUX=1

43 | P a g e Espressif Systems Sept 2,2014


4.1.2.17. AT+ CIPMODE

AT+CIPMODE

+CIPMODE:<mode>

AT+ CIPMODE? OK

OK

AT+ CIPMODE =<mode> Link is builded

<mode>

4.1.2.18. AT+ CIPSTO

AT+CIPSTO

+CIPSTO:<time>

AT+ CIPSTO? OK

OK

< time>
AT+ CIPMODE =<mode> 0~28800 s

44 | P a g e Espressif Systems Sept 2,2014


4.1.2.19. +IPD

+IPD

1)

(+CIPMUX=0) +IPD

+IPD,<len>:<data>

<id> id

1) <len>

(+CIPMUX=1) <data>

+IPD,<id>,<len>:<data>

45 | P a g e Espressif Systems Sept 2,2014


5.

ESP8266

Espressif IoT SDK

ESP8266

Espressif IoT Demo

ESP8266 IOT Demo

Espressif IoT SDK

ESP8266 IOT SDK

Espressif Cloud Introduction

Espressif

Espressif Flash Operation

ESP8266 Flash

Espressif

ESP8266

ESP8266 WIFI

46 | P a g e Espressif Systems Sept 2,2014


456 A201 201203

86021-61062079

http://www.espressif.com/

sales@espressif.com

http://www.espressif.com/

<>

47 | P a g e Espressif Systems Sept 2,2014

You might also like