Re: Networkmanager doesn't connect to WiFi



On Tue, 2015-09-22 at 10:57 +0200, Pieter Cardoen wrote:
Dear
I am experimenting with dynamic behaviour of NM with multiple networks and how handover occurs between 
WiFi/mobile network. I am moving away from the WiFi access point as far that the NM is unable to connect to 
the WiFi. NM is restarted and gets a connection to the mobile connection (lowest autoconnect priority). 
Afterwards, I am moving very close to the WiFi AP but NM doesn't connect to it.

For a specific interface, NM sticks with the existing connection on a
device type as long as it's viable, and only when that connection is
broken will it cut over to the next best connection.  So if NM is
connected to a 20% WiFi access point of SSID A but there is an available
90% access point with SSID B, NM will not switch over until the
connection to the 20% one is broken.  This is not the same as roaming
between access points of the same SSID, where wpa_supplicant (under
direction of NM) *will* roam between same-SSID access points to achieve
the best signal strength.

Between interfaces, NM will keep *both* WWAN and WiFi connections
active, and switch the default route between the two (and thus the
traffic) depending on the connection's "device route metric".  So if
your policy should be "use WiFi when available", you can set the WiFi
device route metric on each WiFi connection to be lower (eg, higher
priority) than the WWAN connection, and allow NM to autoconnect WWAN and
WiFi.

WiFi scanning is also at play here.  By default, NM scans periodically
starting at 20 seconds and increasing the interval to 2 minutes.  This
behavior is controversial because scanning can interrupt interactive
traffic like SSH or streaming video or gaming.  But scanning more
frequently obviously updates the list of available access points more
frequently too.  Given these two goals (better interactivity vs. better
information), NM gives you the user the choice by letting you call D-Bus
methods on NM to scan more frequently while NM is connected.

In the case of restarting NM giving larger signal strength, WiFi signal
strength is quite variable even at the same exact location.  It depends
on interference from other radios/appliances, what TX/RX antenna the
WiFi access point is using, what TX/RX antenna *your* device is using,
and what driver your wifi interface uses.  I wouldn't be surprised at a
10% difference or more, but to get the raw values to look further, run
"iw dev <name> link" and look at the dBm values.  How much do they
change?

Dan

If I execute "nmcli dev wifi list" after moving a little bit from the APs away, I get:*  SSID               
MODE    CHAN  RATE       SIGNAL  BARS  SECURITY   demo7              Infra   7     54 Mbit/s  22      ▂___  
--   STATION            Infra   1     54 Mbit/s  14      ▂___  WPA2 802.1X   CONTROL            Infra   11  
  54 Mbit/s  17      ▂___  --   forge_wlan_inf4    Infra   64    54 Mbit/s  25      ▂___  --   STATION      
      Infra   6     54 Mbit/s  19      ▂___  WPA2 802.1X   forge_wlan_inf5    Infra   100   54 Mbit/s  27   
   ▂___  --   forge_wlan_inf3    Infra   56    54 Mbit/s  27      ▂___  --   forge_wlan_adhoc3  Ad-Hoc  56  
  54 Mbit/s  27      ▂___  --   forge_wlan_adhoc5  Ad-Hoc  100   54 Mbit/s  24      ▂___  --   
forge_wlan_adhoc5  Ad-Hoc  100   54 Mbit/s  25      ▂___  --   forge_wlan_adhoc5  Ad-Hoc  100   54 Mbit/s  
24      ▂___  --
This shows me that both station APs (SSID=STATION) have signal of 14% and 19%. If I am executing "Service 
network-manager restart" and again ask the WiFi signal level with "nmcli dev wifi list", I get:
*  SSID               MODE    CHAN  RATE       SIGNAL  BARS  SECURITY   forge_wlan_inf4    Infra   64    54 
Mbit/s  29      ▂___  --   forge_wlan_inf5    Infra   100   54 Mbit/s  29      ▂___  --   demo7             
 Infra   7     54 Mbit/s  34      ▂▄__  --   forge_wlan_adhoc5  Ad-Hoc  100   54 Mbit/s  25      ▂___  --   
forge_wlan_adhoc3  Ad-Hoc  56    54 Mbit/s  22      ▂___  --   CONTROL            Infra   11    54 Mbit/s  
27      ▂___  --   forge_wlan_inf3    Infra   56    54 Mbit/s  20      ▂___  --   STATION            Infra  
 1     54 Mbit/s  22      ▂___  WPA2 802.1X*  STATION            Infra   6     54 Mbit/s  35      ▂▄__  
WPA2 802.1X
My robot is not moved but signal level after NM restart is noticeably higher than before. It seems that the 
signal level sticks to the percentages which have been measured at the beginning of my experiment.
Can someone help me with this issue?
Best regardsPieter Cardoen
                                        
_______________________________________________ networkmanager-list mailing list networkmanager-list gnome 
org https://mail.gnome.org/mailman/listinfo/networkmanager-list




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