The SIM used for data in MTK-based dual-standby modems can change after carrier re-registration or reboot

Bug #1413672 reported by Alfonso Sanchez-Beato
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
Critical
Unassigned
ofono (Ubuntu)
Fix Released
High
Alfonso Sanchez-Beato
ofono (Ubuntu RTM)
Fix Released
High
Alfonso Sanchez-Beato

Bug Description

When there are 2 SIMs inserted in a krillin running Ubuntu, it may happen that the one that gets used for mobile data changes on each reboot. ofono allows both SIMs to be activated for data. For multi-sim standby modems this implies that on each reboot, or even more, when one of the SIMs loses coverage, the SIM used for data can change as only one slot can be attached at a time.

Note, this bug applies to RTM as of version ubuntu-touch/stable #14. It also applies to vivid devel-images.

Tags: connectivity

Related branches

Tony Espy (awe)
description: updated
Tony Espy (awe)
description: updated
Changed in ofono (Ubuntu):
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Alfonso Sanchez-Beato (alfonsosanchezbeato)
Tony Espy (awe)
Changed in ofono (Ubuntu RTM):
status: New → Confirmed
tags: added: connectivity
Changed in ofono (Ubuntu RTM):
importance: Undecided → High
assignee: nobody → Alfonso Sanchez-Beato (alfonsosanchezbeato)
Tony Espy (awe)
summary: - The SIM used for data in dual-standby modems changes across reboots
+ The SIM used for data in dual-standby modems can change after carrier
+ re-registration or reboot
Tony Espy (awe)
summary: - The SIM used for data in dual-standby modems can change after carrier
- re-registration or reboot
+ The SIM used for data in MTK-based dual-standby modems can change after
+ carrier re-registration or reboot
Revision history for this message
Tony Espy (awe) wrote :

A brief explanation is necessary...

By default, ofono sets the 'Powered' property of a modem's ConnectionManager interface to True, this in turn causes the ofono core to trigger GPRS attachment, which if successful, sets the 'Attached' property to True.

NetworkManager will only attempt to activate a connection of both 'Attached' and 'Powered' are set to True.

The MTK plugin and modem code currently have logic which prevents both modems from becoming 'Attached', however this logic is non-deterministic as timing may effect which modem is set attached first.

If an end-user goes and explicitly changes the SIM selection for mobile data, ofono will update the gprs settings for both SIMs, such that the newly selected SIM will be powered, and the other SIM not powered. From this point on, this bug will be prevented from happening.

A fix has been proposed in the following branch:

https://github.com/rilmodem/ofono/pull/157

It ensures that only one Modem's ConnectionManager can be powered at any time. When it detects a change from False to True of a modem's CM 'Powered' property, either from a call to DBus, or via a loaded gprs settings file, it causes the other modem's CM 'Powered' property to be toggled to False. In essence, similar logic of Cellular Settings.

Changed in ofono (Ubuntu):
status: Confirmed → In Progress
Changed in ofono (Ubuntu RTM):
status: Confirmed → In Progress
Tony Espy (awe)
Changed in ofono (Ubuntu):
status: In Progress → Fix Committed
Changed in ofono (Ubuntu RTM):
status: In Progress → Fix Committed
Tony Espy (awe)
Changed in canonical-devices-system-image:
status: New → In Progress
status: In Progress → Fix Committed
Changed in canonical-devices-system-image:
importance: Undecided → Critical
milestone: none → ww13-ota
Revision history for this message
Tony Espy (awe) wrote :

Tested with krillin #20 (ubuntu-touch/ubuntu-rtm/14.09).

While the basic fix works, it can still cause the SIM selection to flip once after upgrade.

Here's the scenario, if two SIMs are in the phone, and the user hasn't yet used the Cellular Settings to pin a SIM for mobile data, then both SIMs will have 'Powered=1' in the associated gprs settings files.

Let's say for instance, that mobile data was using SIM2 when the upgrade occurs. At this point, when the phone boots, say SIM1 takes longer to register thant SIM2. When SIM1 comes online, the gprs settings file is read, and 'Powered=1', so the fix causes the other SIM's 'Powered' to be set to 0. This doesn't happen when SIM1 came online, because since SIM2 wasn't online yet, it didn't have a valid gprs atom, so it's 'Powered' property couldn't yet be set to '0'.

This will only happen the first time after upgrade, and only if the user previously had two SIMs installed *and* they'd never used Cellular Settings to pin mobile data to a specific SIM yet, and the non-selected SIM comes online *after* the SIM that currently is being used for mobile data.

From this point on, the fix works as expected... and the selected SIM will only change in response to the user changing the setting.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ofono - 1.12.bzr6892+15.04.20150401.2~rtm-0ubuntu1

---------------
ofono (1.12.bzr6892+15.04.20150401.2~rtm-0ubuntu1) 14.09; urgency=medium

  [ Alfonso Sanchez-Beato ]
  * include, plugins/mtk.c, src/modem.c,gprs.c: set data for just one slot (LP: #1413672)
    Make sure ConnectionManager.Powered property is set for only one slot in
    case the modem is of type dual SIM stand-by.
 -- CI Train Bot <email address hidden> Wed, 01 Apr 2015 17:33:15 +0000

Changed in ofono (Ubuntu RTM):
status: Fix Committed → Fix Released
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ofono - 1.12.bzr6892+15.04.20150407-0ubuntu1

---------------
ofono (1.12.bzr6892+15.04.20150407-0ubuntu1) vivid; urgency=medium

  [ Alfonso Sanchez-Beato ]
  * ubuntu-apndb.c, src/common.c, test-common.c: provision IA APNs
    LTE modems may require a new IA APN for non-GPRS operation,
    this change allows a new IA APN type to be provisioned along
    with Internet and MMS APNs.
  * gril/grilunsol.c: LTE signal strength fix (LP: #1433867)
  * ubuntu-apndb.c: load APNS w/out explict type (LP: #1437200)
  * mtkodem, plugins/mtk.c, unit/tesk-mtkunsol.c: Dynamic MTK firwmare switching
    This change causes the firmware on specific MTK-based phone to be
    dynamically switched/reset based on SIM type and roaming conditions.
  * include, plugins/mtk.c, src/modem.c, gprs.c: set data for just one slot (LP: #1413672)
    Make sure ConnectionManager.Powered property is set for only one slot in
    case the modem is of type dual SIM stand-by.
  * doc, gprs: add 'Preferred' property to GPRS contexts (LP: #1361864)
 -- CI Train Bot <email address hidden> Tue, 07 Apr 2015 06:50:28 +0000

Changed in ofono (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.