Data Sheet
!
4. Wi-Fi AT Commands
4.2.13. AT+CWLIF—IP of Stations to Which the ESP8266 SoftAP is Connected
4.2.14. AT+CWDHCP—Enables/Disables DHCP
[@deprecated] This command is deprecated. Please use AT+CWDHCP_CUR or AT+CWDHCP_DEF instead.
4.2.15. AT+CWDHCP_CUR—Enables/Disables DHCP; Configuration Not Saved in the Flash
Execute
Command
AT+CWLIF
Response
<ipaddr>,<mac>
OK
Parameters
• <ipaddr>: IP address of Stations to which ESP8266 SoftAP is connected.
• <mac>: MAC address of Stations to which ESP8266 SoftAP is connected.
Note
This command cannot get a static IP. It only works when both DHCPs of the ESP8266 SoftAP, and
of the Station to which ESP8266 is connected, are enabled.
Commands
Query Command:
AT+CWDHCP?
Set Command:
AT+CWDHCP=<<mode>,<en>
Function: to enable/disable DHCP.
Response
DHCPdisabledorenablednow?
OK
Parameters
• Bit0:
‣ 0: Station DHCP is disabled.
‣ 1: Station DHCP is enabled.
• Bit1:
‣ 0: SoftAP DHCP is disabled.
‣ 1: SoftAP DHCP is enabled.
• <mode>:
‣ 0: Sets ESP8266 SoftAP
‣ 1: Sets ESP8266 Station
‣ 2: Sets both SoftAP and Station
• <en>:
‣ 0: Disables DHCP
‣ 1: Enables DHCP
Notes
• The configuration changes will be stored in the user parameter area in the flash.
• This Set Command interacts with static-IP-related AT commands (AT+CIPSTA-relatedand
AT+CIPA-related commands):
‣
If DHCP is enabled, static IP will be disabled;
‣
If static IP is enabled, DHCP will be disabled;
‣
Whether it is DHCP or static IP that is enabled depends on the last configuration.
Commands
Query Command:
AT+CWDHCP_CUR?
Set Command:
AT+CWDHCP_CUR=<<mode>,<en>
Function: to enable/disable DHCP.
Response
DHCPdisabledorenablednow?
OK
Espressif
! /5229
2017.05