At+Cwlif-Ip Of Stations To Which The Esp32 Softap Is Connected; At+Cwdhcp-Enables/Disables Dhcp - Espressif Systems ESP32 Instruction Set

At instruction set and examples
Hide thumbs Also See for ESP32:
Table of Contents

Advertisement

!
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
+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?
+CWDHCP:<enable>
OK
<enable>: 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+CIPAP-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.
18 97
!
/!
4. Wi-Fi AT Commands
Set Command:
AT+CWDHCP=<operate>,<mode>
Function: to enable/disable DHCP.
OK
<operate>:
‣ 0: disable
‣ 1: enable
<mode>:
‣ Bit0: Station DHCP
‣ Bit1: SoftAP DHCP
2019.06

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32 and is the answer not in the manual?

Questions and answers

Table of Contents