Arduino / ESP8266
Tx ------- Rx
Rx ------- Tx
3.3V ------ CH_PD & 3.3V (VCC)
// 시리얼모니터를 열어 Baud Rate를 9600으로 설정하고
// 표시방식을 'Both NL & CR'로 설정한다.
//리셋 명령어 ..
AT+RST
//모드의 변경
//' ---> Station Mode
AT+CWMODE=1
//목록 조회..
AT+CWLAP
//연결 명령어
AT+CWJAP="x700_2g","54126166"
// IP 확인
AT+CIFSR
// 접속 ..
AT+CIPSTART="1","192.168.0.10","7070"
//Start a TCP connection
AT+CIPSTART="UDP","192.168.0.10","7070"
// conn
AT+CIPSEND=100;
GET /iot/send_home.jsp?api_key=
//종료
AT+CIPCLOSE
ESP8266 - AT Command Reference
26 Mar 2015 | by fuho
ESP8266, in it’s default configuration, boots up into the serial modem mode. In this mode you can communicate with it using a set of AT commands. I will present to you a reference of all known AT commands that ESP8266 supports, explain what they do and how to use them.
Historically AT commands are based on the Hayes Command Set and these are no different.
AT Commands
Index of all known AT commands
Line termination
ESP8266 expects <CR><LF>
or CarriageReturn and LineFeed at the end of each command, but just<CR
> seems to work too.
Command variants
Each command can have up to 4 variants changing the function of it. You can chose between them by appending one of four possible values to the end of the root command itself. These four appendices can have the following values ""
,=<parameter|[parameters]>
,"?"
,=?
Type | Example | Description |
---|---|---|
Test | AT+CIPSTART=? | Query the range of values (So far only AT+CWMODE=? uses it) |
Query | AT+CMD? | Returns the current value of the parameter. |
Set | AT+CMD=Parameter | Set the value of user-defined parameters in commands and run. |
Execute | AT+CMD | Runs commands with no user-defined parameters. |
Note:
- Not all AT commands support all 4 variants.
- [] = default value, not required or may not appear.
- String values require double quotation marks, for example:
AT+CWSAP="ESP756190","21030826",1,4
. - Baud rate = 115200
- AT instruction ends with “rn”
Commands
AT
- Test AT startup
Variant | Command | Response | Function |
---|---|---|---|
Execute | AT | OK | Test if AT system works correctly |
AT+RST
- Restart module
Variant | Command | Response | Function |
---|---|---|---|
Execute | AT+RST | OK | Reset the module |
ESP-01 Output after reset:
ets Jan 8 2013,rst cause:4, boot mode:(3,7)
wdt reset
load 0x40100000, len 24444, room 16
tail 12
chksum 0xe0
ho 0 tail 12 room 4
load 0x3ffe8000, len 3168, room 12
tail 4
chksum 0x93
load 0x3ffe8c60, len 4956, room 4
tail 8
chksum 0xbd
csum 0xbd
ready
ESP-12 Output after reset: