I have two questions about error code of "AT+CWJAP_CUR".
As the specification describes, there are 4 error code are defined as the response of "AT+CWJAP_CUR".
I'm trying reproducing all error codes, however only one error code "4:connection failed" cannot be reproduced.
So my questions are are below.
1. How can I reproduce "+CWJAP:4".
2. What should we do if the error code "4" is responded?
Just retry "AT+CWJAP_CUR" or reset the module?
Thanks in advance!
Yamazaki
How can I reproduce "+CWJAP:4"?
Re: How can I reproduce "+CWJAP:4"?
Postby pratik » Wed Apr 26, 2017 1:31 pm
The reason 4 is rather broad - it is difficult to tell what caused it. So the best strategy is to tell the user the connection failed, after trying 3-4 times. The cause may not usually be on the ESP end. If there is MAC authentication enabled on the router, and your ESP is not allowed to connect, this may happen. Or if the AP disappears or crashes when ESP is connecting... code 4 may happen. Also when the AP is not able to connect because it cannot handle more device, code 4 may be returned.
Better to just give up on the AP rather than restarting the ESP.
Better to just give up on the AP rather than restarting the ESP.
Who is online
Users browsing this forum: No registered users and 2 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.