WiFi reconnection issue - WiFi module questions

Following on from WiFi reconnection issue - what does this trace mean?, can anyone confirm:

  • Does WiFi.off() actually reset the WiFi module?
  • Is there a soft way to reset the TCP/IP stack?
  • Any known soft magic to get WiFi to reconnect after an outage?

Thanks

I think you are doubling up here on another topic you opened that seems very similar!

AFAIK
WiFi.off() followed by a short wait and WiFi.on() will reset the WiFi Module - repowering!
TCP/IP stack soft reset - not that I know of.
I use SYSTEM_MODE(SEMI_AUTOMATIC) and SYSTEM_THREAD(ENABLED) plus flags to determine whether WiFi out of range OR wrong credentials and also a background re-try process to check WiFi and Internet connection state. I thought @rickkas7 publish a code model as how best to handle the scenarios of disconnection and reconnection. Essentially with system threading it should just reconnect in the background but whilst disconnected you need to be careful not to call blocking functions.

@amor, agree, it is a tad confusing. Am breaking up the topics to answer specific questions that are popping up during my debug.

The issue was solved years ago (thanks to @rickkas7 as you have mentioned) :

But it has re-emerged for me for some yet to be discovered reason.

You said:

WiFi.off() followed by a short wait and WiFi.on() will reset the WiFi Module

I ask:
Do you know how long that wait is? Currently I don’t have any delay.

Refer to WiFi reconnection issue - what does this trace mean? which provides information on the underlying issue.