Espressif Systems ESP8266 AT Скачать руководство пользователя страница 5

4.2.24. AT+CIPAPMAC_CUR—Sets the MAC Address of the ESP8266 SoftAP; Configuration Not 

Saved in the Flash

 

34

.......................................................................................................................................

4.2.25. AT+CIPAPMAC_DEF—Sets the MAC Address of the ESP8266 SoftAP; Configuration Saved in 

Flash

 

34

............................................................................................................................................................

4.2.26. AT+CIPSTA—Sets the IP Address of the ESP8266 Station

 

35

........................................................

4.2.27. AT+CIPSTA_CUR—Sets the IP Address of the ESP8266 Station; Configuration Not Saved in 

the Flash

 

35

......................................................................................................................................................

4.2.28. AT+CIPSTA_DEF—Sets the IP Address of the ESP8266 Station; Configuration Saved in the 

Flash

 

36

............................................................................................................................................................

4.2.29. AT+CIPAP—Sets the IP Address of the ESP8266 SoftAP

 

36

..........................................................

4.2.30. AT+CIPAP_CUR—Sets the IP Address of the ESP8266 SoftAP; Configuration Not Saved in the 

Flash

 

37

............................................................................................................................................................

4.2.31. AT+CIPAP_DEF—Sets the IP Address of the ESP8266 SoftAP; Configuration Saved in the Flash

 

37

....................................................................................................................................................................

4.2.32. AT+CWSTARTSMART—Starts SmartConfig

 

38

...............................................................................

4.2.33. AT+CWSTOPSMART—Stops SmartConfig

 

38

................................................................................

4.2.34. AT+CWSTARTDISCOVER—Enables the Mode that ESP8266 can be Found by WeChat

 

39

..........

4.2.35. AT+CWSTOPDISCOVER—Disables the Mode that ESP8266 can be Found by WeChat

 

39

..........

4.2.36. AT+WPS—Enables the WPS Function

 

39

........................................................................................

4.2.37. AT+MDNS—Configures the MDNS Function

 

40

..............................................................................

4.2.38. AT+CWHOSTNAME—Configures the Name of ESP8266 Station

 

40

..............................................

5. TCP/IP-Related AT Commands 

41 

..........................................................................................................

5.1. Overview

 

41

...................................................................................................................................................

5.2. Commands

 

42

...............................................................................................................................................

5.2.1. AT+CIPSTATUS—Gets the Connection Status

 

42

...........................................................................

5.2.2. AT+CIPDOMAIN—DNS Function

 

42

................................................................................................

5.2.3. AT+CIPSTART—Establishes TCP Connection, UDP Transmission or SSL Connection

 

43

.............

5.2.4. AT+CIPSSLSIZE—Sets the Size of SSL Bu

er

 

45

...........................................................................

5.2.5. AT+CIPSEND—Sends Data

 

45

.........................................................................................................

5.2.6. AT+CIPSENDEX—Sends Data

 

46

....................................................................................................

5.2.7. AT+CIPSENDBUF—Writes Data into the TCP-Send-Bu

er

 

46

........................................................

5.2.8. AT+CIPBUFRESET—Resets the Segment ID Count

 

47

...................................................................

5.2.9. AT+CIPBUFSTATUS—Checks the Status of the TCP-Send-Bu

er

 

48

............................................

5.2.10. AT+CIPCHECKSEQ—Checks If a Specific Segment Was Successfully Sent

 

48

............................

5.2.11. AT+CIPCLOSE—Closes the TCP/UDP/SSL Connection

 

49

............................................................

5.2.12. AT+CIFSR—Gets the Local IP Address

 

49

......................................................................................

Содержание ESP8266 AT

Страница 1: ...Version 2 1 0 Copyright 2017 ESP8266 AT Instruction Set...

Страница 2: ...ds of basic functions Chapter 4 Wi Fi AT Commands Lists Wi Fi related AT commands Chapter 5 TCP IP Related AT Commands Lists TCP IP related AT commands Chapter 6 Appendix Lists the AT commands of whic...

Страница 3: ...8 3 2 5 ATE AT Commands Echoing 9 3 2 6 AT RESTORE Restores the Factory Default Settings 9 3 2 7 AT UART UART Configuration 9 3 2 8 AT UART_CUR Current UART Configuration Not Saved in the Flash 11 3...

Страница 4: ...the ESP8266 SoftAP 27 4 2 11 AT CWSAP_CUR Configures the ESP8266 SoftAP Configuration Not Saved in the Flash 27 4 2 12 AT CWSAP_DEF Configures the ESP8266 SoftAP Configuration Saved in the Flash 28 4...

Страница 5: ...38 4 2 34 AT CWSTARTDISCOVER Enables the Mode that ESP8266 can be Found by WeChat 39 4 2 35 AT CWSTOPDISCOVER Disables the Mode that ESP8266 can be Found by WeChat 39 4 2 36 AT WPS Enables the WPS Fun...

Страница 6: ...18 AT PING Ping Packets 52 5 2 19 AT CIUPDATE Updates the Software Through Wi Fi 53 5 2 20 AT CIPDINFO Shows the Remote IP and Port with IPD 53 5 2 21 IPD Receives Network Data 53 5 2 22 AT CIPSNTPCFG...

Страница 7: ...used to define four types of a command for details of which please refer to the following table Definition Type Description at_testCmd Test AT Command AT TEST Registered Callback In Example at_testCm...

Страница 8: ...Mbit flash but does not supports FOTA upgrade AT firmware through Wi Fi function 1 2 2 8 Mbit Flash If the flash size is 8 Mbit or larger users can use boot mode which supports AT firmware upgrade fe...

Страница 9: ...000 In bin at 512 512 BIN Address Description blank bin 0x1FB000 Initializes RF_CAL parameter area esp_init_data_default bin 0x1FC000 Stores default RF parameter values has to be downloaded into flash...

Страница 10: ...a is initialized this bin has to be downloaded too blank bin 0x7E000 Initializes Flash user parameter area more details in Appendix blank bin 0x3FE000 Initializes Flash system parameter area more deta...

Страница 11: ...firmware uses priority levels 0 and 1 of system_os_task so only one task of priority 2 is allowed to be set up by the user AT returns messages below to show status of the ESP8266 Station s Wi Fi conn...

Страница 12: ...ser defined parameters in commands and runs these commands Execute Command AT x Runs commands with no user defined parameters Notice Not all AT commands support all four variations mentioned above Squ...

Страница 13: ...guration saved in flash AT SLEEP Configures the sleep modes AT WAKEUPGPIO Configures a GPIO to wake ESP8266 up from Light sleep mode AT RFPOWER Sets the maximum value of the RF TX Power AT RFVDD Sets...

Страница 14: ...mpile time OK Parameters AT version info information about the AT version SDK version info information about the SDK version compile time the duration of time for compiling the BIN Set Command AT GSLP...

Страница 15: ...RROR when a parameter other than 0 or 1 was specified Execute Command AT RESTORE Response OK Note The execution of this command will reset all parameters saved in flash and restore the factory default...

Страница 16: ...trol flow control 0 flow control is not enabled 1 enable RTS 2 enable CTS 3 enable both RTS and CTS Notes 1 The configuration changes will be saved in the user parameter area in the flash and will sti...

Страница 17: ...is set as 115200 the baud rate returned by using command AT UART_CUR could be 115273 Parameters baudrate UART baud rate databits data bits 5 5 bit data 6 6 bit data 7 7 bit data 8 8 bit data stopbits...

Страница 18: ...topbits stop bits 1 1 bit stop bit 2 1 5 bit stop bit 3 2 bit stop bit parity parity bit 0 None 1 Odd 2 Even flow control flow control 0 flow control is not enabled 1 enable RTS 2 enable CTS 3 enable...

Страница 19: ...y GPIO trigger_GPIO Sets the GPIO to wake ESP8266 up range of value 0 15 trigger_level 0 The GPIO wakes up ESP8266 on low level 1 The GPIO wakes up ESP8266 on high level awake_GPIO Optional this param...

Страница 20: ...nge 0 82 unit 0 25 dBm Note This command sets the maximum value of ESP8266 RF TX power it is not precise The actual value could be smaller than the set value Example AT RFPOWER 50 Command Query Comman...

Страница 21: ...equency offset trace 1 enables RF frequency offset trace Notes The RF frequency offset trace function is enabled by default This configuration will be saved in the user parameter area in flash and tak...

Страница 22: ...GPIO12 to work as a GPIO Set Command AT SYSIOGETCFG pin Response SYSIOGETCFG pin mode pull up OK Parameter pin number of an IO pin mode the working mode of the IO pin pull up 0 disable the pull up 1...

Страница 23: ...n GPIO pin number level 0 low level 1 high level Note Please refer to ESP8266 Pin List for uses of AT SYSGPIO related commands Example AT SYSIOSETCFG 12 3 1 Set GPIO12 to work as a GPIO AT SYSGPIODIR...

Страница 24: ...Please refer to ESP8266 Pin List for uses of AT SYSGPIO related commands Example AT SYSIOSETCFG 12 3 1 Set GPIO12 to work as a GPIO AT SYSGPIODIR 12 0 Set GPIO12 to work as an input AT SYSGPIOREAD 12...

Страница 25: ...ion of the ESP8266 SoftAP configuration not saved in the flash AT CWSAP_DEF Sets the configuration of the ESP8266 SoftAP configuration saved in the flash AT CWLIF Gets the Station IP to which the ESP8...

Страница 26: ...the IP address of the ESP8266 Station configuration saved in the flash AT CIPAP Sets the IP address of ESP8266 SoftAP deprecated AT CIPAP_CUR Sets the IP address of ESP8266 SoftAP configuration not sa...

Страница 27: ...SoftAP mode 3 SoftAP Station mode Note The configuration changes will be saved in the system parameter area in the flash Example AT CWMODE 3 Commands Test Command AT CWMODE_CUR Query Command AT CWMOD...

Страница 28: ...rameter showing the SSID of the target AP ssid the SSID of the target AP pwd password MAX 64 byte ASCII bssid the target AP s MAC address used when multiple APs have the same SSID error code for refer...

Страница 29: ...nection timeout 2 wrong password 3 cannot find the target AP 4 connection failed This command requires Station mode to be active Escape character syntax is needed if SSID or password contains any spec...

Страница 30: ...s command requires Station mode to be active Escape character syntax is needed if SSID or password contains any special characters such as or or Note The configuration changes will be saved in the sys...

Страница 31: ...CWLAP bit 1 determines whether ssid will be shown in the result of AT CWLAP bit 2 determines whether rssi will be shown in the result of AT CWLAP bit 3 determines whether mac will be shown in the resu...

Страница 32: ...offset freq calibration OK Parameters ecn encryption method 0 OPEN 1 WEP 2 WPA_PSK 3 WPA2_PSK 4 WPA_WPA2_PSK 5 WPA2_Enterprise AT can NOT connect to WPA2_Enterprise AP for now ssid string parameter S...

Страница 33: ...chl channel ID ecn encryption method WEP is not supported 0 OPEN 2 WPA_PSK 3 WPA2_PSK 4 WPA_WPA2_PSK max conn optional maximum number of Stations to which ESP8266 SoftAP can be connected within the ra...

Страница 34: ...nds Query Command AT CWSAP_DEF Function to obtain the configuration parameters of the ESP8266 SoftAP Set Command AT CWSAP_DEF ssid pwd chl ecn max conn ssid hidden Function to list all available APs R...

Страница 35: ...Set Command AT CWDHCP mode en Function to enable disable DHCP Response DHCP disabled or enabled now OK Parameters Bit0 0 Station DHCP is disabled 1 Station DHCP is enabled Bit1 0 SoftAP DHCP is disabl...

Страница 36: ...bled depends on the last configuration Example AT CWDHCP_CUR 0 1 Commands Query Command AT CWDHCP_DEF Set Command AT CWDHCP_DEF mode en Function to enable disable DHCP Response DHCP disabled or enable...

Страница 37: ...6 runs as SoftAP and when DHCP is enabled The IP address should be in the same network segment as the IP address of ESP8266 SoftAP Examples AT CWDHCPS_CUR 1 3 192 168 4 10 192 168 4 15 or AT CWDHCPS_C...

Страница 38: ...er up by default Note The configuration changes will be saved in the system parameter area in the flash Example AT CWAUTOCONN 1 Commands Query Command AT CIPSTAMAC Set Command AT CIPSTAMAC mac Functio...

Страница 39: ...18 fe 35 98 d3 7b Commands Query Command AT CIPSTAMAC_DEF Set Command AT CIPSTAMAC_DEF mac Function to set the MAC address of the ESP8266 Station Response CIPSTAMAC_DEF mac OK OK Parameters mac strin...

Страница 40: ...dress of ESP8266 SoftAP Notes The configuration changes will NOT be saved the flash The MAC address of ESP8266 SoftAP is different from that of the ESP8266 Station Please make sure you do not set the...

Страница 41: ...atic IP is enabled DHCP will be disabled If DHCP is enabled static IP will be disabled Whether it is DHCP or static IP that is enabled depends on the last configuration Example AT CIPSTA 192 168 6 100...

Страница 42: ...mands If static IP is enabled DHCP will be disabled If DHCP is enabled static IP will be disabled Whether it is DHCP or static IP that is enabled depends on the last configuration Example AT CIPSTA_DE...

Страница 43: ...disabled If DHCP is enabled static IP will be disabled Whether it is DHCP or static IP that is enabled depends on the last configuration Example AT CIPAP_CUR 192 168 5 1 192 168 5 1 255 255 255 0 Comm...

Страница 44: ...successfully acquired the AP information ESP8266 will try to connect to the target AP Message Smartconfig connected Wi Fi is printed if the connection is successful Use command AT CWSTOPSMART to stop...

Страница 45: ...it only makes response to queries from WeChat Otherwise the time interval for ESP8266 to send packets regularly in order to be detected by WeChat on the same LAN Note For details on detection function...

Страница 46: ...me ESP8266 SoftAP mode does not support the MDNS function for now Example AT MDNS 1 espressif iot 8080 Commands Query Command AT CWHOSTNAME Function Checks the host name of ESP8266 Station Set Command...

Страница 47: ...egment is sent or not AT CIPCLOSE Closes TCP UDP SSL connection AT CIFSR Gets the local IP address AT CIPMUX Configures the multiple connections mode AT CIPSERVER Deletes Creates a TCP server AT CIPMO...

Страница 48: ...is disconnected 5 The ESP8266 Station does NOT connect to an AP link ID ID of the connection 0 4 used for multiple connections type string parameter TCP or UDP remote IP string parameter indicating t...

Страница 49: ...SSL remote IP string parameter indicating the remote IP address remote port the remote port number TCP keep alive detection time interval when TCP is kept alive this function is disabled by default 0...

Страница 50: ...SSL Connection Set Command AT CIPSTART link ID type remote IP remote port TCP keep alive Response OK or ERROR If the TCP connection is already established the response is ALREADY CONNECT Parameters li...

Страница 51: ...smission of data starts If the connection cannot be established or gets disrupted during data transmission the system returns ERROR If data is transmitted successfully the system returns SEND OK Wrap...

Страница 52: ...of data length determined by length is met or when 0 appears in the data the transmission starts If connection cannot be established or gets disconnected during transmission the system returns ERROR I...

Страница 53: ...uint32 the ID assigned to each data packet starting from 1 the ID number increases by 1 every time a data packet is written into the buffer length data length MAX 2048 bytes Notes This command only w...

Страница 54: ...mber available TCP queue number it s not reliable and should be used as a reference only Notes This command can not be used for SSL connection Example For example in single connection the command AT C...

Страница 55: ...in multiple connections AT CIPCLOSE link ID Function closes the TCP UDP Connection Execute Command used in multiple connections AT CIPCLOSE Response OK Parameters link ID ID of the connection to be cl...

Страница 56: ...TCP server is created When a client is connected to the server it will take up one connection and be assigned an ID Example AT CIPMUX 1 AT CIPSERVER 1 1001 Commands Query Command AT CIPMODE Function t...

Страница 57: ...time interval unit second s Notes This command will save the UART Wi Fi passthrough mode and its link in the flash ESP8266 will enter the UART Wi Fi passthrough mode on any subsequent power cycles As...

Страница 58: ...to check the TCP server timeout Set Command AT CIPSTO time Function to set the TCP server timeout Response CIPSTO time OK OK Parameter time TCP server timeout within the range of 0 7200s Notes ESP8266...

Страница 59: ...ed to make their own AT CIUPDATE upgrade Espressif provides a demo as a reference for local upgrade ESP8266_NONOS_SDK example at It is suggested that users call AT RESTORE to restore the factory defau...

Страница 60: ...SNTP server1 optional parameter indicating the second SNTP server SNTP server2 optional parameter indicating the third SNTP server Example AT CIPSNTPCFG 1 8 cn ntp org cn ntp sjtu edu cn us pool ntp o...

Страница 61: ...by default Commands Query Command AT CIPDNS_DEF Function Get the user defined DNS servers which saved in flash Set Command AT CIPDNS_DEF enable DNS server0 DNS server1 Function Set user defined DNS s...

Страница 62: ...1 208 67 220 220 AT RFAUTOTRACE AT RFAUTOTRACE 0 Configuration Saved in the System Parameter Area in the Flash AT CWMODE_DEF AT CWMODE_DEF 3 AT CWJAP_DEF AT CWJAP_DEF abc 0123456789 AT CWSAP_DEF AT CW...

Страница 63: ...current AT command version Hardware Module information for example ESP WROOM 02 Screenshot of the test steps for example If possible please provide the printed log information such as ets Jan 8 2013 r...

Страница 64: ...ty for infringement of any proprietary rights relating to the use of information in this document is disclaimed No licenses express or implied by estoppel or otherwise to any intellectual property rig...

Отзывы: