The SIM used for data in MTK-based dual-standby modems can change after carrier re-registration or reboot
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Canonical System Image |
Critical
|
Unassigned | ||
| | ofono (Ubuntu) |
High
|
Alfonso Sanchez-Beato | ||
| | ofono (Ubuntu RTM) |
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.
Related branches
- Ricardo Salveti: Approve on 2015-04-07
- Alfonso Sanchez-Beato: Approve on 2015-04-06
- PS Jenkins bot: Approve (continuous-integration) on 2015-04-01
-
Diff: 1314 lines (+686/-110)16 files modifieddebian/changelog (+19/-0)
doc/connman-api.txt (+8/-0)
drivers/mtkmodem/mtkrequest.h (+2/-2)
drivers/mtkmodem/mtkunsol.c (+35/-0)
drivers/mtkmodem/mtkunsol.h (+7/-0)
drivers/rilmodem/gprs-context.c (+9/-3)
gril/grilunsol.c (+75/-17)
include/modem.h (+5/-0)
plugins/bluetooth.c (+10/-0)
plugins/mtk.c (+326/-75)
plugins/ubuntu-apndb.c (+9/-10)
src/common.c (+1/-1)
src/gprs.c (+104/-1)
src/modem.c (+8/-0)
unit/test-common.c (+1/-1)
unit/test-mtkunsol.c (+67/-0)
| description: | updated |
| description: | updated |
| Changed in ofono (Ubuntu): | |
| status: | New → Confirmed |
| importance: | Undecided → High |
| assignee: | nobody → Alfonso Sanchez-Beato (alfonsosanchezbeato) |
| 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) |
| 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 |
| 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 |
| Tony Espy (awe) wrote : | #1 |
| Changed in ofono (Ubuntu): | |
| status: | Confirmed → In Progress |
| Changed in ofono (Ubuntu RTM): | |
| status: | Confirmed → In Progress |
| Changed in ofono (Ubuntu): | |
| status: | In Progress → Fix Committed |
| Changed in ofono (Ubuntu RTM): | |
| status: | In Progress → Fix Committed |
| 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 |
| Tony Espy (awe) wrote : | #2 |
Tested with krillin #20 (ubuntu-
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.
| Launchpad Janitor (janitor) wrote : | #3 |
This bug was fixed in the package ofono - 1.12.bzr6892+
---------------
ofono (1.12.bzr6892+
[ Alfonso Sanchez-Beato ]
* include, plugins/mtk.c, src/modem.c,gprs.c: set data for just one slot (LP: #1413672)
Make sure ConnectionManag
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 |
| Launchpad Janitor (janitor) wrote : | #4 |
This bug was fixed in the package ofono - 1.12.bzr6892+
---------------
ofono (1.12.bzr6892+
[ 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-
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 ConnectionManag
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 |

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.