!
4.2.9.
AT+CWDHCPS—Sets the IP Address Allocated by ESP32 SoftAP DHCP (The configuration is
saved in Flash.)
Commands
Response
Parameters
Notes
Examples
4.2.10. AT+CWAUTOCONN—Auto-Connects to the AP or Not
Set Command
Response
Parameters
Espressif
Query Command:
AT+CWDHCPS?
+CWDHCPS=<lease time>,<start
IP>,<end IP>
•
<enable>:
‣ 0: Disable the settings and use the default IP range.
‣ 1: Enable setting the IP range, and the parameters below have to be set.
<lease time>: lease time, unit: minute, range [1, 2880].
•
<start IP>: start IP of the IP range that can be obtained from ESP32 SoftAP DHCP server.
•
<end IP>: end IP of the IP range that can be obtained from ESP32 SoftAP DHCP server.
•
The configuration changes will be saved in the NVS area.
•
This AT command is enabled when ESP8266 runs as SoftAP, and when DHCP is enabled. The IP
•
address should be in the same network segment as the IP address of ESP32 SoftAP.
AT+CWDHCPS=1,3,"192.168.4.10","192.168.4.15"
or
AT+CWDHCPS=0 //Disable the settings and use the default IP range.
AT+CWAUTOCONN=<enable>
OK
<enable>:
‣ 0: does NOT auto-connect to AP on power-up.
‣ 1: connects to AP automatically on power-up.
The ESP32 Station connects to the AP automatically on power-up by default.
Note
The configuration changes will be saved in the NVS area.
Example
AT+CWAUTOCONN=1
Set Command:
AT+CWDHCPS=<enable>,<lease time>,<start IP>,<end IP>
Function: sets the IP address range of the ESP32 SoftAP
DHCP server.
OK
17 53
!
/!
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