ESP8266 Developer Zone The Official ESP8266 Forum 2017-01-12T20:58:13+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=3239 2017-01-12T20:58:13+08:00 2017-01-12T20:58:13+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3239&p=11101#p11101 <![CDATA[Re: Wifi scan and connect in parallel]]> Statistics: Posted by neilyoung — Thu Jan 12, 2017 8:58 pm


]]>
2017-01-10T02:10:08+08:00 2017-01-10T02:10:08+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3239&p=11074#p11074 <![CDATA[Re: Wifi scan and connect in parallel]]>
If the scan is started, once the callbacks report "CONNECTED" state (usually then an internal scan should be finished), the status callback immediately reports "DISCONNECTED" and connect fails.

Bad design, IMHO

Statistics: Posted by neilyoung — Tue Jan 10, 2017 2:10 am


]]>
2017-01-07T08:08:25+08:00 2017-01-07T08:08:25+08:00 https://bbs.espressif.com:443/viewtopic.php?t=3239&p=11051#p11051 <![CDATA[Wifi scan and connect in parallel]]>
I've found that it is not possible to make an asynchronous wifi scan _and_ a connect attempt in parallel. The reason is that the connect does a scan internally. So depending on the order of the call (scan before connect -> scan fails. connect before scan -> connect fails) one of both calls fails.

I need to do that asynchronously, because after a wakeup a scan usually takes 2.5 secs, a connect can take up to 10 secs. I wanted to save time by letting them run in parallel.

If the connect does a scan, is it possible to participate?

Statistics: Posted by neilyoung — Sat Jan 07, 2017 8:08 am


]]>