Hi Jonah,
On Tue, Oct 3, 2017 at 2:07 AM, Jonah Petri <jonah(a)sense.com> wrote:
> On Sep 25, 2017, at 2:58 PM, Jose Blanquicet
<blanquicet(a)gmail.com> wrote:
I applied the patch, and ran it for some days on a fleet of testing devices. As a part
of the testing, I rebooted the devices regularly, under various wifi conditions, and noted
that some of them did not re-associate with the wifi network successfully upon reboot.
That's bad! Let's see if that happens again with the second patch I
will send. Just for confirmation, could you please perform the same
tests without the patch and check you successfully re-associate with
the WiFi network at each reboot? We need to be sure whether the patch
is who introduces this issue or not. Thanks!
> Follow an active scan with only one passive scan in case
> BackgroundScanning='false' is indeed the best solution. I thought I
> would be able to find time to work on that solution but it haven't
> yet, it has not been an ease time. This is the idea I have in mind:
>
> Current behaviour with BackgroundScanning='True' is:
> D-Bus scan request or at start-up of system
> Launch an active scan
> 3 seconds -> Launch passive scan
> 9 seconds -> Launch passive scan
> 27 seconds -> Launch passive scan
> 81 seconds -> Launch passive scan
> 243 seconds -> Launch passive scan
> 300 seconds -> Launch passive scan
> 300 seconds -> Launch passive scan
> ...
> Continue each 300 seconds unless you perform a new D-Bus scan call
> which will cause the procedure to restart from 3 seconds.
>
> With BackgroundScanning='False' the idea would be:
> D-Bus scan request or at start-up of system
> Launch an active scan
> 3 seconds -> Launch passive scan
> Stop. No more scanning: 3 seconds would be enough for ConnMan to
> reconnect to a known service in case there is one of them in range.
> New D-Bus scan request from user
> Launch an active scan
> 3 seconds -> Launch passive scan
> Stop.
Ah, maybe I have misinterpreted the meaning of BackgroundScanning!
I thought it meant that connman would not issue scans when it was already connected to a
WiFi network. I had assumed that it would continue to scan for the requested WiFi network
when not connected. From your description above, it seems I was wrong! If that’s the
case, I think I really do want BackgroundScanning, as networks can be down from time to
time, and I would want my devices to recover by detecting the configured network when it
becomes available again, and reconnecting to it.
Yes, I thing you misinterpreted the meaning but don't worry, it is
indeed complex.
Well, if you want ConnMan performs auto-scanning following the
procedure I described above when you are not connected but does not
perform background scanning when you are connected, then keep
BackgroundScanning = true in ConnMan and comment
#CONFIG_BGSCAN_SIMPLE=y in .config of wpa_supplicant SHOULD be enough.
However, take into account that remove CONFIG_BGSCAN_SIMPLE from
wpa_supplicant configuration you are also disabling the WiFi roaming
within a ESS.
Best regards,
Jose Blanquicet