-->
Page 1 of 1

WiFi.setAutoReconnect(true) --> time interval adjustable

PostPosted: Sat Aug 13, 2022 5:08 am
by peff
is there a "switch" that allows me to set the time interval when the 8266 tries to reconnect after losing wifi connect?
Standard seems to be 1 second.
At least the serial monitor shows ~3 seconds:

Code: Select allscandone
no "WIFINAME" found, reconnect after 1s
reconnet


I would like to extend this interval significantly, but could not find anything in the docs.
If this were possible I could use it as an alternative to my problem here
RECONNECT PROBLEMS WITH WIFI, SOMETIMES LOOSING RAM

ESP8266 with 3.0.2

Thanks
Peff

Re: WiFi.setAutoReconnect(true) --> time interval adjustable

PostPosted: Sun Aug 14, 2022 11:47 pm
by JurajA
it directly use the SDK fubction wifi_station_set_reconnect_policy which is not configurable. it only takes true or fals
Set whether the ESP8266 will attempt to reconnect to an AP if disconnected or
failed to connect.
Prototype bool wifi_station_set_reconnect_policy(bool set)
Parameter bool set: true, enable reconnection; false, disable reconnection.