Data Sheet
!
5. TCP/IP 相关 AT 指令
5.2. Commands
5.2.1. AT+CIPSTATUS—Gets the Connection Status
5.2.2. AT+CIPDOMAIN—DNS Function
Execute Command
AT+CIPSTATUS
Response
STATUS:<stat>
+CIPSTATUS:<linkID>,<type>,<remoteIP>,<remoteport>,<localport>,<tetype>
Parameters
• <stat>: status of the ESP8266 Station interface.
‣ 2: The ESP8266 Station is connected to an AP and its IP is obtained.
‣ 3: The ESP8266 Station has created a TCP or UDP transmission.
‣ 4: The TCP or UDP transmission of ESP8266 Station is disconnected.
‣ 5: The ESP8266 Station does NOT connect to an AP.
• <linkID>: ID of the connection (0~4), used for multiple connections.
• <type>: string parameter, "TCP" or "UDP".
• <remoteIP>: string parameter indicating the remote IP address.
• <remoteport>: the remote port number.
• <localport>: ESP8266 local port number.
• <tetype>:
‣ 0: ESP8266 runs as a client.
‣ 1: ESP8266 runs as a server.
Execute Command
AT+CIPDOMAIN=<domainname>
Response
+CIPDOMAIN:<IPaddress>
Parameter
<domainname>: the domain name, length should be less than 64 bytes.
Example
AT+CWMODE=1//setStationmode
AT+CWJAP="SSID","password"//accesstotheinternet
AT+CIPDOMAIN="iot.espressif.cn"//DNSfunction
Espressif
! /5242
2017.05