← Back to team overview

desktop-packages team mailing list archive

[Bug 1418077] Re: After radio technology is changed, mobile-data takes ~5m to re-connect

 

So what seems to be happening, is that the radio technology switch
causes the modem to unregister from the current carrier, and attempt to
re-register using the new tech preference ( eg. umts, lte, gsm, ... ).
This will cause the ofono ConnectionManager 'Attached' property to
return FALSE until the phone re-registers and re-attaches to GPRS.

NM detects the device change state from 'Activated' to 'Failed' ( more
on this later ) and in turn schedules an auto-activation attempt of the
connection ( context1 ).  As the modem's not attached, the activation
fails and the retry_count gets decremented, and it tries again
repeatedly ( with no delay ), until the retry_count ( initialized to
four ) drops to zero.

At this point, NM disables the connection and adds a timeout of 300s in
the future which will call  a policy function that resets the
connection's retry_count, and triggers a new autoconnect sequence.  300s
/ 60s/m == 5m, our mysterious delay.

What we need is some mechanism for autoconnect to be blocked when the
modem is not registered.  It looks like nm-device-modem.c implements
something like this in it's device_state_changed().  It checks a bunch
of reason codes, but NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER ( which is
the error returned by stage1 if the modem isn't registered ) isn't
checked.

The code also would need a mechanism which would re-enable the
autoconnect when the device becomes enabled again ( ie. when 'Attached'
becomes TRUE again ).

Also with regards to the device 'Activated' to 'Failed' transition,
it's a bit odd that 'Disconnected' isn't used, as 'Failed' causes a
retry attempt to be wasted ( see nm-policy.c )  because
device_state_changed() treats a new state of FAILED as a connect failure
and decrements the retry_count.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to network-manager in Ubuntu.
https://bugs.launchpad.net/bugs/1418077

Title:
  After radio technology is changed, mobile-data takes ~5m to re-connect

Status in the base for Ubuntu mobile products:
  In Progress
Status in network-manager package in Ubuntu:
  In Progress

Bug description:
  Steps to reproduce:
  1. Confirm cellular data (disable wifi)
  2. Change TechnologyPreference on online SIM
  3. Confirm no cellular data
  4. Wait ~10 minutes
  5. Confirm cellular data 

  What happens:
  Changing something on the modem causes cellular data to disappear for 10 minutes

  What should happen:
  It should behave as before, i.e. cellular data should come back immediately

  current build number: 97
  device name: krillin
  channel: ubuntu-touch/devel-proposed
  alias: ubuntu-touch/vivid-proposed
  last update: 2015-02-02 12:48:25
  version version: 97
  version ubuntu: 20150202
  version device: 20150128-5379bdb
  version custom: 20150202

To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-devices-system-image/+bug/1418077/+subscriptions


References