Data Sheet
!
4. Wi-Fi AT Commands
4.2. Commands
4.2.1. AT+CWMODE—Sets the Wi-Fi Mode (Station/SoftAP/Station+SoftAP)
[@deprecated] This command is deprecated. Please use AT+CWMODE_CUR or AT+CWMODE_DEF instead.
4.2.2. AT+CWMODE_CUR—Sets the Current Wi-Fi mode; Configuration Not Saved in the Flash
4.2.3. AT+CWMODE_DEF—Sets the Default Wi-Fi mode; Configuration Saved in the Flash
Commands
Test Command:
AT+CWMODE=?
Query Command:
AT+CWMODE?
Function: to query the current Wi-Fi
mode of ESP8266.
Set Command:
AT+CWMODE=<mode>
Function: to set the current Wi-Fi
mode of ESP8266.
Response
+CWMODE:<mode>
OK
+CWMODE:<mode>
OK
OK
Parameters
<mode>:
‣
1: Station mode
‣
2: SoftAP mode
‣
3: SoftAP+Station mode
Note
The configuration changes will be saved in the system parameter area in the flash.
Example
AT+CWMODE=3
Commands
Test Command:
AT+CWMODE_CUR=?
Query Command:
AT+CWMODE_CUR?
Function: to query the current Wi-Fi
mode of ESP8266.
Set Command:
AT+CWMODE_CUR=<mode>
Function: to set the current Wi-Fi
mode of ESP8266.
Response
+CWMODE_CUR:<mode>
OK
+CWMODE_CUR:<mode>
OK
OK
Parameters
<mode>:
‣ 1: Station mode
‣ 2: SoftAP mode
‣ 3: SoftAP+Station mode
Note
The configuration changes will NOT be saved in the flash.
Example
AT+CWMODE_CUR=3
Commands
Test Command:
AT+CWMODE_DEF=?
Query Command:
AT+CWMODE_DEF?
Function: to query the current Wi-Fi
mode of ESP8266.
Set Command:
AT+CWMODE_DEF=<mode>
Function: to set the current Wi-Fi
mode of ESP8266.
Response
+CWMODE_DEF:<mode>
OK
+CWMODE_DEF:<mode>
OK
OK
Espressif
! /!21 58
2017.05