-->
Page 1 of 2

Check if ESP8266 is connected in ST mode

PostPosted: Wed Jan 04, 2017 10:10 am
by Joaquim Boavida
Hi, is there a simple way to check if the module is connected to the internet and not in AP mode?
Sometimes the module loses connection to the router and stays that way or enters in AP mode.
I want to check periodically if I have access to the internet or not... and If not reboot the module...

TIA
JB

Re: Check if ESP8266 is connected in ST mode

PostPosted: Wed Jan 04, 2017 12:28 pm
by AcmeUK
How about pinging your router?
The sketch here may provide a starting point :- http://www.esp8266.com/viewtopic.php?f=29&t=8026&start=4

Re: Check if ESP8266 is connected in ST mode

PostPosted: Wed Jan 04, 2017 2:13 pm
by Joaquim Boavida
Tks for your answer.

I the mean time I had found this (auto reconnect):

viewtopic.php?f=40&t=12258

:)

JB

Re: Check if ESP8266 is connected in ST mode

PostPosted: Thu Jan 05, 2017 1:51 am
by ardhuru
How exactly is wifi.ssid() to be used? I suspect the solution to this thread lies in this command, but somehow I could never get it to work.

Is this supposed to return the name of the AP the ESP is actually connected to, or just the AP listed in the settings page, regardless of the connection status?

I could not get this command to work for either possibilities.