Data Sheet
!
4. Wi-Fi AT Commands
4.2.26. AT+CIPSTA—Sets the IP Address of the ESP8266 Station
[@deprecated] This command is deprecated. Please use AT+CIPSTA_CUR or AT+CIPSTA_DEF instead.
4.2.27. AT+CIPSTA_CUR—Sets the IP Address of the ESP8266 Station; Configuration Not Saved in
the Flash
Commands
Query Command:
AT+CIPSTA?
Function: to obtain the IP address of the ESP8266
Station.
Set Command:
AT+CIPSTA=<ip>[,<gateway>,<netmask>]
Function: to set the IP address of the ESP8266
Station.
Response
+CIPSTA:<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="192.168.6.100","192.168.6.1","255.255.255.0"
Commands
Query Command:
AT+CIPSTA_CUR?
Function: to obtain the IP address of the ESP8266
Station.
Set Command:
AT+CIPSTA_CUR=<ip>[,<gateway>,<netmask>]
Function: to set the IP address of the ESP8266
Station.
Response
+CIPSTA_CUR:<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 NOT be saved 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_CUR="192.168.6.100","192.168.6.1","255.255.255.0"
Espressif
! /5235
2017.05