I am using ESP 8266 wifi modules in industrial product for floor shop data collection.
There are around 200 devices including ESP8266s in the floor shop.
Sometimes the wifi connection to the Access Points is lost for some devices.
I try to detect the connection loss by periodically calling AT+CIPSTATUS every 30 seconds.
If a connection loss is detected i issue the at command ATCWJAP_CUR="ssid,"password" command to reconnect.
However i see that ESP modules are trying to reconnect automatically without waiting for my AT+CWJAP_CUR command.
Below is an terminal output window showing the above case.Please note that there are two APs with same ssid and same password.
AT version:188.8.131.52(May 5 2017 16:10:59)
compile time:May 5 2017 16:37:48
AT+CWAUTOCONN=0 //AUTOCON is 0
AT+CWJAP_CUR="efatech","efatech1435" //Connected to AP
WIFI GOT IP
WIFI DISCONNECT //AP is switched off from its web interface and ESP is disconnected
WIFI DISCONNECT //AP is switched on from the web interface and ESP automatically connected to it.
WIFI GOT IP
As you see above ESP automatically reconnects as soon as the AP is switched on again even though the ATOCONN is 0.
But i do not want this behaviour.Can someone please comment on the reason for automatic reconnection.How can i diasble it.?
Yes I used AT+CWQAP to disassociate the ESP8266 from the AP and now it acts as expected and does not try to connect to AP automatically.
But for this to happen I need to check WIFI DISCONNECT message and issue the AT+CWQAP as soon as I receive it.
I was checking AT+ CIPSTATUS reply every 30 seconds to detect disconnections and now it is useless.
A more proper way would be to close automatic connection feature during initializing ESP at startup through AT commands.
Thanks for the support and best regards,
Who is online
Users browsing this forum: No registered users and 1 guest
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
We also have a RTOS version and a MESH version too!
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!