Instructions
" " ! "  
 Espressif Systems
ESP8266 
AT Instruction Set
4.
AT+CWJAP – Connect to AP 
AT+CWJAP – Connect to AP 
[@deprecated]. Please use AT+CWJAP_CUR or AT+CWJAP_DEF instead.
Example
•
AT+CWJAP ="abc", "0123456789" 
•
If SSID is "ab\, c" and password is "0123456789"\" 
 AT+CWJAP ="ab\\\, c", "0123456789\"\\" 
•
If several APs have the same SSID as "abc", target AP can be found by bssid: 
 AT+CWJAP ="abc", "0123456789", "ca:d7:19:d8:a6:44"
Command
AT+CWJAP?
Response
+CWJAP:<ssid>, <bssid>, <channel>, <rssi> 
OK
Parameters
<ssid> string, AP’s SSID
Command
AT+CWJAP=<ssid>, <pwd>[, <bssid>]
Response
OK 
or 
+CWJAP:<error code> 
FAIL
Parameters
<ssid> string, AP’s SSID 
<pwd> string, MAX: 64 bytes ASCII 
[<bssid>] string, AP’s MAC address, for several APs may have the same SSID 
<error code> only for reference, it is not reliable 
1 : connection timeout 
2 : wrong password 
3 : cannot find target AP 
4 : connection failed 
This command requires station mode to be active. 
Escape character syntax is needed if "SSID" or "password" contains any special 
characters ( ’ , ’ or ’ " ’or ’ \ ’) 
Notes
Configuration changes will be stored in flash system parameter area.
Espressif Systems   /   Friday, July 15, 201626 73










