Wifi scan and connect in parallel

neilyoung
Posts: 4
Joined: Sat Jan 07, 2017 7:55 am

Wifi scan and connect in parallel

Postby neilyoung » Sat Jan 07, 2017 8:08 am

Hi,

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?

neilyoung
Posts: 4
Joined: Sat Jan 07, 2017 7:55 am

Re: Wifi scan and connect in parallel

Postby neilyoung » Tue Jan 10, 2017 2:10 am

As an additional information:

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

neilyoung
Posts: 4
Joined: Sat Jan 07, 2017 7:55 am

Re: Wifi scan and connect in parallel

Postby neilyoung » Thu Jan 12, 2017 8:58 pm

Wondering to what this "community" is good for. Thanks for nothing

Who is online

Users browsing this forum: No registered users and 60 guests