Re: Bgscan/roaming suggestions for wpa_supplicant

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2018-10-02 at 13:29 -0400, bepvte@xxxxxxxxx wrote:
> I've noticed on both Android and on my NetworkManager controlled
> laptop
> that roaming between APs is not working very well. I have had to
> manually scan and switch an annoying amount of times throughout the
> day. On my Android phone it does not switch until it is completely
> disconnected from the internet, but that is probably the Android
> projects fault for leaving bgscan unset. NetworkManager sets more
> aggressive background roaming if the access point is using enterprise
> authentication[1]. The network I'm connecting to uses many different
> routers with the same SSID and no authentication, so this does not
> get
> set for my use case. I was told by a user on the NetworkManager irc
> that this problem would be better handled by wpa_supplicant. Some 

Yep, you talked to Thomas Haller, one of the NM developers.  For all
connections NM sets bgscan="simple:30:-80:86400".  What that means is
that if the signal level of the AP becomes worse than -80dBm
wpa_supplicant will trigger an immediate scan for a better AP and begin
to background scan every 30 seconds after that, until the signal
becomes better than -80dBm.

Perhaps that -80 should be increased to -75 or so, which would cause
scanning and perhaps a roaming attempt earlier when signal is marginal.
 The tradeoff is disrupting Skype connections or getting killed in an
FPS because the card took a couple hundred ms to scan while traffic was
still flowing.

Every time a bgscan completes, the supplicant looks at the results and
tries to find a "better" AP to roam to.  "Better" is a combination of
expected throughput (eg, old 11b/g 54Mb AP with great signal is
probably actually "worse" than an 11ac with good signal), frequency
(5ghz is sometimes preferred due to less interference), and signal
strength.  If the supplicant doesn't think any of the APs found from a
scan are much better, then it does not roam.  There is a cost to
roaming

The suggestions you have are interesting, but any changes would likely
need to be implemented in NetworkManager rather than the supplicant. 
The supplicant already provides all the tweakables required, and NM can
set those values.

What would be helpful is if you could get supplicant debug logs of when
you think roaming has not worked correctly.  If the supplicant is
systemd-managed then you can use these two commands:

$ sudo dbus-send --system --print-reply --dest=fi.w1.wpa_supplicant1
/fi/w1/wpa_supplicant1 org.freedesktop.DBus.Properties.Set
string:fi.w1.wpa_supplicant1 string:DebugTimestamp variant:boolean:true
$ sudo dbus-send --system --print-reply --dest=fi.w1.wpa_supplicant1
/fi/w1/wpa_supplicant1 org.freedesktop.DBus.Properties.Set
string:fi.w1.wpa_supplicant1 string:DebugLevel variant:string:"msgdump"

which will cause the supplicant to start logging a ton of info via the
systemd journal, or wherever its logging is supposed to go.

> ideas
> for improving the situation:
> 
>  * wpa_supplicant detects if there are multiple BSS's using the same
>    SSID on scan (or maybe connection?) and exports some boolean or
>    property based off of that, NetworkManager then sees that the
>    connection is roaming and sets bgscan to its more aggressive
> value.
>  * wpa_supplicant detects if there are multiple BSS's using the same
>    SSID and then changes its roaming/bgscan settings to be more
>    aggressive. This might be difficult because it would clash with
>    whatever is configuring NetworkManagers choice of "bgscan." It
>    probably would make sense to allow this detection to be turned
> off.
> 
> P.S: I'm 16 years old and have never used a mailing list before,
> please
> feel free to tell me if I did something wrong.

Nothing wrong as far as I can see :)  Welcome to the list!

Dan

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux