Roaming aggressiveness wpa_supplicant

Jouni Malinen j at
Fri Mar 25 02:31:16 PDT 2016

On Wed, Mar 23, 2016 at 11:10:00AM +0000, Saskia van Emst wrote:
> What I want to achieve is aggressive roaming to the access point with the best signal because my station is moving quite fast. It seems though that when an access point with a stronger signal is found, this does not automatically mean the station will roam to it.

How do you define "the best signal" in this context? wpa_supplicant
tries to maximize the estimated throughput which may not always mean the
highest signal level.. There is not much point in roaming to a more
congested network even if it has a slightly stronger signal strength;
nor is there point in moving to a network that would not allow HT/VHT to
be used if the current one has sufficient signal strength to allow
those, and so on..

> In wpa_cli I see this:
> ...
> <3>CTRL-EVENT-SIGNAL-CHANGE above=0 signal=-64 noise=-95 txrate=180000
> 00:90:7f:b4:47:54       5500    -54     [WPA2-PSK-CCMP][ESS]    LOBECO_SECURE <--------------------------- Accesspoint with better signal

You'd need to look at wpa_supplicant debug log (at least -d on the
command line) to see more details on why there was no roaming in the
specific case. Please note that the signal strength from the signal
change events is not necessarily comparable to the one from scan

> There are two things I notice:
> -	When the station moves away from the accesspoint, I see (watching iw wlan0 link) the signal strength drop below the configured -55 dBm for the bgscan module. The message event-signal-change however comes much later. Is this not monitored continuously but on intervals or is there some other explanation?

CTRL-EVENT-SIGNAL-CHANGE is indicated whenever the driver (or well,
cfg80211/mac80211 in this case) sends an update event to user space.
That monitoring is continuous, but that may not use the same estimate of
the signal strength as iw link.

> -	When a scan is started, and the results contain an access point with a stronger signal, the station does not immediately roam to it. Are other factors involved in making the roaming decision?

As noted above, signal strength is not the only, or even main, criterion
for this. See wpa_supplicant_need_to_roam() for details as Dan noted.

> Also I have tried ap_scan=0, which should let the driver do ap scanning/selection but that did not connect at all.

ap_scan=0 is not supposed to be used with normal Wi-Fi drivers and not
without some additional software components forcing connection, so no
connection at all with ath9k is the expected behavior there unless you
would first implement something else to trigger connection and roaming
in the first place. Anyway, this is not really what I'd recommend using.

Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list