Data Sheet
!
4. Wi-Fi AT Commands
4.2.28. AT+CIPSTA_DEF—Sets the IP Address of the ESP8266 Station; Configuration Saved in the
Flash
4.2.29. AT+CIPAP—Sets the IP Address of the ESP8266 SoftAP
[@deprecated] This command is deprecated. Please use AT+CIPAP_CUR or AT+CIPAP_DEF instead.
Commands
Query Command:
AT+CIPSTA_DEF?
Function: to obtain the IP address of the ESP8266
Station.
Set Command:
AT+CIPSTA_DEF=<ip>[,<gateway>,<netmask>]
Function: to set the IP address of the ESP8266
Station.
Response
+CIPSTA_DEF:<ip>
OK
OK
Parameters
⚠ Notice:
Only when the ESP8266 Station is connected to an
AP can its IP address be queried.
• <ip>: string parameter, the IP address of the
ESP8266 Station.
• [<gateway>]: gateway.
• [<netmask>]: netmask.
Notes
• The configuration changes will be saved in the user parameter area in the flash.
• The Set Command interacts with DHCP-related AT commands (AT+CWDHCP-relatedcommands):
‣
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_DEF="192.168.6.100","192.168.6.1","255.255.255.0"
Commands
Query Command:
AT+CIPAP?
Function: to obtain the IP address of the ESP8266
SoftAP.
Set Command:
AT+CIPAP=<ip>[,<gateway>,<netmask>]
Function: to set the IP address of the ESP8266
SoftAP.
Response
+CIPAP:<ip>,<gateway>,<netmask>
OK
OK
Parameters
• <ip>: string parameter, the IP address of the ESP8266 SoftAP.
• [<gateway>]: gateway.
• [<netmask>]: netmask.
Notes
• The configuration changes will be saved in the user parameter area in the flash.
• Currently, ESP8266 only supports class C IP addresses.
• The Set Command interacts with DHCP-related AT commands (AT+CWDHCP-relatedcommands):
‣ 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+CIPAP="192.168.5.1","192.168.5.1","255.255.255.0"
Espressif
! /5236
2017.05