Data Sheet
!
4. Wi-Fi AT Commands
4.2.12. AT+CWSAP_DEF—Configures the ESP8266 SoftAP; Configuration Saved in the Flash
Parameters
• <ssid>: string parameter, SSID of AP.
• <pwd>: string parameter, length of password: 8 ~ 64
bytes ASCII.
• <chl>: channel ID.
• <ecn>: encryption method; WEP is not supported.
‣ 0: OPEN
‣ 2: WPA_PSK
‣ 3: WPA2_PSK
‣ 4: WPA_WPA2_PSK
• [<maxconn>](optional): maximum number of
Stations to which ESP8266 SoftAP can be
connected; within the range of [1, 10].
• [<ssidhidden>](optional):
‣ 0: SSID is broadcasted. (the default setting)
‣ 1: SSID is not broadcasted.
⚠ Notice:
This command is only available when SoftAP
is active.
Note
The configuration changes will NOT be saved in the flash.
Example
AT+CWSAP_CUR="ESP8266","1234567890",5,3
Commands
Query Command:
AT+CWSAP_DEF?
Function: to obtain the configuration parameters of the
ESP8266 SoftAP.
Set Command:
AT+CWSAP_DEF=<ssid>,<pwd>,<chl>,<ecn>[,
<maxconn>][,<ssidhidden>]
Function: to list all available APs.
Response
+CWSAP_DEF:<ssid>,<pwd>,<chl>,<ecn>,<max
conn>,<ssidhidden>
OK
or
ERROR
Parameters
•
<ssid>: string parameter, SSID of AP.
•
<pwd>: string parameter, length of password: 8 ~ 64
bytes ASCII.
•
<chl>: channel ID.
•
<ecn>: encryption method; WEP is not supported.
‣ 0: OPEN
‣ 2: WPA_PSK
‣ 3: WPA2_PSK
‣ 4: WPA_WPA2_PSK
•
[<maxconn>](optional): maximum number of
Stations to which ESP8266 SoftAP can be
connected; within the range of [1, 4].
•
[<ssidhidden>](optional):
‣ 0: SSID is broadcasted. (the default setting)
‣ 1: SSID is not broadcasted.
The same as above.
⚠ Notice:
This command is only available when SoftAP
is active.
Note
The configuration changes will NOT be saved in the flash.
Example
AT+CWSAP_DEF="ESP8266","1234567890",5,3
Espressif
! /5228
2017.05