Add_wifi retrys

Hi all, how many times the add_wifi tries to connect before giving up?

In other words, imagine my ESP32 is reset and the wifi is not available when thing.add_wifi(SSID, SSID_PASSWORD);
is executed but it becames online let say 5 minutes after it, is is going to be connected?

I’m having a problem like this because the ESP32 is inside a metal cage (with slots) and sometimes it doesn’t connects, if I take it outside the box it normally connects, inside the box sometimes connects and (most of the time) doesn’t…

Thanksfor any hints, Regards

Hi

There is no a limit of retry, the device has kind of states,

If it has no wifi connection will be in a state that will try the connection to wifi, if it is connected to wifi and has no connection to the server, will try to connect to server and so on.

The device will try all the connections steps repeatedly until it achieves, will no desist nor rest, its like a mini-terminator that the goal is to connect… not to kill Sarah Connor lol.

A metal cage works like a Gauss cage… It atenuates (or blocks) RF signals, if the device does not connect inside the cage and it does outside the cage (at the very same location right next to the cage), that is why it does not reach the connection, also any metal structure or superficie in between the device and the wifi source may attenuate the signal.

Hope this helps.

@ega thanks for your prompt and complete answer.

After I posted the question the device became online!

God save Sarah Connor!