Re: NetworkManager autoconnect

On 04.06.2015 02:37, Tony Espy wrote:
On 06/03/2015 04:24 PM, Pieter Cardoen wrote:
I've tested it with WiFi but I also need to know the behaviour of the
wwan case. WiFi scanning interval was set to 10 seconds. I'll try it
again tomorrow and verify the scan interval in advance.

The WPA_supplicant application has the possibility to set the autoscan
argument to periodic or to exponential. Could it possibly be that the
exponential setting is enabled which causes to the reconnect period to
rise to a large time?

In case of the wwan connection, you spoke about 'a couple minutes'. Is
it possible to adapt this time or to know wat happens more exactly?

I've actually been working with the code (NM_POLICY) that causes this 
timer to be set for wwan connections, so if you don't mind, I'll add 
what I've learned recently.

I'm currently working with patched version of NM ( see [1] for 
details ) as part of Ubuntu 14.10 base images we run on Ubuntu phones. 
We have a new set of patches that implement ofono support for 
NetworkManager, which to date has only been tested with the rilmodem 
ofono drivers used on Ubuntu phones.

How is the AccessPoint (AP) infrastructure mode implemented on Ubuntu phones?

I'm actually been looking at a bunch of scenarios that cause our devices 
to hit the autoconnect_retry limit of the modem connection.  When the 
retry limit is hit, NM_POLICY sets a 5m timer-based callback to reset 
the connection.  When the timer fires, the associated callback function 
resets the connection's autoconnect_retry_count, and kicks off a new 
activation attempt.

I'm not sure if this is similar to what you're seeing, as I assume 
you're using NM with modem-manager, but it sounds very similar to the 
behavior we see with ofono.

[ Dan, one suggestion I have for this behavior, besides maybe kicking up 
the retries_count, would be to introduce a slight delay ( 2-5s ) between 
retry attempts for a device ( maybe just for wwan devices? ).  We could 
possibly extend NM_SETTING_CONNECTION and make the delay a new property. 
  I'm working on a patch that implements this idea. ]

Note - one scenario that can trigger this behavior for us is enabling 
FlightMode, as ofono will disconnect any GPRS connections it's 
established before signaling that it's gone offline.

 > On Wed, 2015-06-03 at 16:11 +0200, Pieter Cardoen wrote:
 > > Dear
 > > While network testing, I've noticed that NetworkManager
automatically connects to a network if its available. However when it
isn't available, I've noticed that NetworkManager stops trying to
connect. What's the reason of this and how could I make NetworkManager
unconditionally try to connect to the network until the end of time?
 > NM will attempt to reconnect when specific events occur, like new scan
 > results or a carrier change. So the answer to your question depends on
 > what kind of interface you're talking about.


 > However, WWAN autoconnect happens continuously because WWAN doesn't have
 > quick/easy event notifications (scans take minutes and interrupt
 > connectivity, plus some modems only start registration when you ask them
 > to connect). This means that whenever there is a WWAN autoconnect
 > connection, NM will attempt the connection if the modem is not in
 > Airplane mode. If the attempt fails, NM will retry after a couple
 > seconds,

Note, if nothing else is happening device-wise ( ie. WiFi isn't enabled 
), I see NM retry the ofono connection three times within the span of a 
single second, zeroing the connection's autoconnect_retries immediately.



networkmanager-list mailing list
networkmanager-list gnome org

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