-->
Page 1 of 2

How often is needed to check Wi-fi status ?

PostPosted: Wed Sep 13, 2017 2:41 am
by andre_teprom
Hey there,


I recently finished a project for a client consisting of up to 10 equipment performing local monitoring through ESP8266, each one operating its lightweight web server.

So far after the first week of field installation I had no reports of any module that stopped working Wifi connection.

However, considering that this project was based on a simple Arduino demo example of webserver, I realized that connection status check is made only once, at setup() routine:

Code: Select allwhile (WiFi.status() != WL_CONNECTED) {


I was thinking about to add it at Loop() aswell, however I don't know the overhead CPU processing of this, I'm not aware of its estructure in library, I mean, whether it just do a bare check of a flag, or if it really do something else such as inline executing a method within its structure, therefore I believe the interval of checks should lie in the range of minutes, but I'm not sure.

Does anybody have any insight on that ?


Thanks in advance,
Andre.

Re: How often is needed to check Wi-fi status ?

PostPosted: Wed Sep 13, 2017 5:46 pm
by tele_player
I don't know the answer, but it would only take a minute to write code to test the time spent in WiFi.status() .

Re: How often is needed to check Wi-fi status ?

PostPosted: Thu Sep 14, 2017 3:04 pm
by eduperez
Well, what happens to your application if it tries to send / receive some data, and the wifi is off?

Re: How often is needed to check Wi-fi status ?

PostPosted: Sun Sep 17, 2017 4:03 am
by andre_teprom
tele_player wrote:I don't know the answer, but it would only take a minute to write code to test the time spent in WiFi.status() .


I appreciate your kind help, but the suggested method based on pure experimentation instead of using a resource aware of its implications does not answer the raised question. I am not willing to deal with a situation that could work properly on an equipment (still at the limit of operability) and later the system does not work, and have to guess that I could have been overlooked this aspect; but again thanks for taking part in this debate.