Cannot set flight mode if the second slot is 3G and we have just one SIM in that slot

Bug #1430700 reported by Alfonso Sanchez-Beato
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
High
Unassigned
ofono (Ubuntu)
Fix Released
High
Alfonso Sanchez-Beato

Bug Description

Flight mode fails to be set if we have the 3G capabilities set for the second slot and we have just one SIM, which is inserted in the that slot.

To reproduce it:

Precondition: The 3G slot should be the first slot initially

1. Remove SIM from first slot, insert a SIM in the second slot
2. Power on the phone
3. Go to system settings -> cellular
4. Select "2G/3G (faster)" for SIM 2. Spinner does not stop after more than 1 minute.
5. Reboot the phone
6. Set flight mode from the indicator. It will appear as set, but the indicator will still show the SIM as registered.

The failure to set SIM 2 as 3G without rebooting and being unable to set flight more are manifestations of the same ofono issue.

To reproduce using scripts:

cd /usr/share/ofono/scripts
./set-3g-slot /ril_1
* Reboot the phone after a few seconds
cd /usr/share/ofono/scripts
./offline-modem /ril_0
(slot with no SIM)

This happens for:

$ system-image-cli -i
current build number: 141
device name: krillin
channel: ubuntu-touch/vivid-proposed
last update: 2015-03-12 07:28:43
version version: 141
version ubuntu: 20150312
version device: 20150210-95b6a9f
version custom: 20150312

Tags: connectivity

Related branches

Changed in ofono (Ubuntu):
assignee: nobody → Alfonso Sanchez-Beato (alfonsosanchezbeato)
description: updated
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

The reason for the failure is that the radio state reported for the first slot is always SIM_LOCKED_OR_ABSENT: radio OFF state is only reported for the main (=3G) slot.

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :
Tony Espy (awe)
Changed in ofono (Ubuntu):
status: New → Incomplete
Revision history for this message
Tony Espy (awe) wrote :

I tried your scenario and can't reproduce. Some additional comments:

1. Does set-3g-slot produce any kind of useful error message? It hasn't yet failed for me. Does ofono log any errors to syslog?

2. Is the reboot solely because set-3g-slot failed, or is it a required step ( I tried with and without... )?

3. Your bug description is a bit misleading as setting a one or both modems to offline doesn't enable FlightMode, it merely offlines the modems. So I assume you mean the modem associated with the empty slot cannot be offlined?

4. Does offline-modem produce any kind of error message? If not, have you tried to see what error is returned from ofono to the SetProperty call? Any log messges?

If there's a race involved, a test script that uses urfkill's flight-mode script directly might be a good idea.

My testing was done on a Krillin with one T-Mobile SIM in the second slot.

Image-details:

current build number: 255
device name: krillin
channel: ubuntu-touch/ubuntu-rtm/14.09-proposed
last update: 2015-03-11 17:26:34
version version: 255
version ubuntu: 20150311
version device: 20150310-3201c0a
version custom: 20150216-561-29-186

description: updated
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

@Tony, sorry, the description was wrong, the error happens for vivid-proposed, not for RTM (it is a regression introduced by the arale changes). I was using RTM + ofonod compiled with latest main.

I have changed the description with steps to reproduce it from the GUI and changing version to vivid-proposed.

description: updated
description: updated
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

@Tony, answering your questions

1. Setting the second slot as 3G under the conditions commented in the bug description gets stalled. No direct error shown in the log. The error is that we are waiting for a change in radio state that does never happen (second slot reports SIM_LOCKED_OR_ABSENT always).

2. The reboot was required because setting 3G does not finish

3. Yes, the modem without SIM cannot be offlined, for the same reason explained in point (1). /ril_0 is always the first slot to be offlined by urfkill, but the behaviour changes depending on whether it is the 3G slot or not. That is why that second slot is 3G is important. Note also that the commands send to offline one slot depend on whether both slots are on or just one is on.

4. No, no direct error shown

Tony Espy (awe)
Changed in ofono (Ubuntu):
status: Incomplete → Confirmed
importance: Undecided → High
Revision history for this message
Tony Espy (awe) wrote :

Confirmed on krillin, devel-proposed #141.

I reproduced using the scripts.

The set-3g-slot command finishes, but leaves the modem in a bad state:

root@ubuntu-phablet:/usr/share/ofono/scripts# ./list-modems
[ /ril_1 ]
    Interfaces = org.ofono.MtkSettings
    Lockdown = 0
    Emergency = 0
    Powered = 0
    Type = hardware
    Online = 0
    Features =
    [ org.ofono.MtkSettings ]
        Has3G = 1

[ /ril_0 ]
    Interfaces =
    Lockdown = 0
    Emergency = 0
    Powered = 0
    Type = hardware
    Online = 0
    Features =

The reboot fixes this, and then when I try to offline /ril_0, the script throws an exception when the DBus reply timeout expires.

Changed in canonical-devices-system-image:
status: New → In Progress
Changed in ofono (Ubuntu):
status: Confirmed → In Progress
Changed in canonical-devices-system-image:
importance: Undecided → High
milestone: none → ww13-2015
tags: added: connectivity
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ofono - 1.12.bzr6890+15.04.20150317-0ubuntu1

---------------
ofono (1.12.bzr6890+15.04.20150317-0ubuntu1) vivid; urgency=medium

  [ Alfonso Sanchez-Beato ]
  * mtk.c: Fix Set3g FlightMode regression on krillin (LP: #1430700 )
 -- CI Train Bot <email address hidden> Tue, 17 Mar 2015 11:26:04 +0000

Changed in ofono (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Tony Espy (awe) wrote :

Manually updated the status of the Canonical System Image task to FixReleased, as this fix has already landed in vivid.

Changed in canonical-devices-system-image:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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