!
4.2.7.
AT+CWLIF—IP of Stations to Which the ESP32 SoftAP is Connected
Execute
Command
Response
Parameters
Note
4.2.8.
AT+CWDHCP—Enables/Disables DHCP
Commands
Response
Parameters
Notes
Examples
Espressif
AT+CWLIF
<ip addr>,<mac>
OK
<ip addr>: IP address of Stations to which ESP32 SoftAP is connected.
•
<mac>: MAC address of Stations to which ESP32 SoftAP is connected.
•
This command cannot get a static IP. It only works when both DHCPs of the ESP32 SoftAP, and of
the Station to which ESP32 is connected, are enabled.
Query Command:
AT+CWDHCP?
DHCP disabled or enabled now?
•
Bit0:
‣ 0: Station DHCP is disabled.
‣ 1: Station DHCP is enabled.
•
Bit1:
‣ 0: SoftAP DHCP is disabled.
‣ 1: SoftAP DHCP is enabled.
The configuration changes will be stored in the NVS area.
•
This set command interacts with static-IP-related AT commands (AT+CIPSTA-related and 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.
AT+CWDHCP=1,1
Enable Station DHCP. If the last DHCP mode is 2, then the current DHCP mode will be 3.
AT+CWDHCP=0,2
Disable SoftAP DHCP. If the last DHCP mode is 3, then the current DHCP mode will be 1.
16 53
!
Set Command:
AT+CWDHCP=<operate>,<mode>
Function: to enable/disable DHCP.
OK
•
<operate>:
‣ 0: disable
‣ 1: enable
•
<mode>:
‣ Bit0: Station DHCP
‣ Bit1: SoftAP DHCP
/!
4. Wi-Fi AT Commands
2017.02
Need help?
Do you have a question about the ESP32 and is the answer not in the manual?
Questions and answers