Takes longer to connect to Wifi after Deep Sleep

The Wifi signal is strong. Sometimes it takes up to 10 seconds to go green when I power on. It always goes red, orange, off for 30 seconds after Deep Sleep, then green. Why does it take so much longer to connect after Sleep? How can I fix this?

Sometimes it never connects. Just red, orange, off for about a minute then it stops. What am I doing wrong? This only fails after Deep Sleep, never after power removal.

After sleep or after cold power up should be the same, really - the wifi chip is powered off in both cases. The next release has the latest wifi code from the supplier merged and we hope this addresses some of the strange corner cases.

Could my error be using sleepfor() from root level?

No, that wouldn’t affect it.

I have completed many working projects using deep sleep. The code is different in each. But they have one thing in common. It ALWAYS takes twice as long to connect and go green after sleep, compared to power up. Any ideas why? An issue with my router? Even after 10 mins sleep. You said it should be the same length of time…

As I just said in my other thread - wondering if it’s router-related? This isn’t behavior we see here.

See Conclusion:

Got it working 3 secs with another router.