org.ofono.VoiceCallManager/EmergencyNumbers mismatch with ril.ecclist

Bug #1208657 reported by Sergio Schvezov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
touch-preview-images
Fix Released
High
Tony Espy
ofono (Ubuntu)
Fix Released
High
Tony Espy

Bug Description

Touch Build: Ubuntu Saucy Salamander (development branch) - armhf (20130805)
ofono package from: https://code.launchpad.net/~awe/phablet-extras/ofono-lp1204683/+merge/178137/comments/402806

Summary
=======
The numbers reported by ofono as Emergency numbers don't seem to add up with what should really be available, in at least Argentina 08 and 000 are definitively not Emergency Numbers.

$ adb shell getprop|grep ril.ecclist
[ril.ecclist]: [112,911]

$ adb shell /usr/share/ofono/scripts/list-modems |grep EmergencyNumbers
        EmergencyNumbers = 08 000 999 110 112 911 118 119

Tags: ofono

Related branches

Changed in touch-preview-images:
status: New → Confirmed
Revision history for this message
Tony Espy (awe) wrote :

The list of emergency numbers being exported in this case is the default list of numbers that are available if no SIM card is present.

In your case, ofono treats your phone in a similar manner due to bug #1208643, which essentially causes ofono to quit trying to read any more files ( of which emergency number is one such ) from the SIM.

So, this really isn't a bug.

Changed in touch-preview-images:
status: Confirmed → Invalid
Tony Espy (awe)
Changed in touch-preview-images:
status: Invalid → Incomplete
Revision history for this message
Tony Espy (awe) wrote :

@Sergio

Can you please either attach your syslog, or scrub it for ofonod messages? If there's a failure reading the emergency numbers from the SIM, it will be logged.

Also, perhaps we can just use the output you get from the test package I attached to bug #1208643?

Changed in touch-preview-images:
assignee: Tony Espy (awe) → Sergio Schvezov (sergiusens)
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Here's the output from running ofonod -n -d -p ril,rilmodem,provision,mbpi,nettime > log 2>&1 with the debug packages provided on chinstrap(I can rerun if you want me to use the ones in the bug): http://paste.ubuntu.com/5985054/

Changed in touch-preview-images:
assignee: Sergio Schvezov (sergiusens) → Tony Espy (awe)
Tony Espy (awe)
Changed in touch-preview-images:
status: Incomplete → In Progress
importance: Medium → High
Revision history for this message
Tony Espy (awe) wrote :

Looks like there's an issue with modem initialization sequencing.

The voicecall module registers a SIM watch which is supposed to read the emergency numbers when the SIM state changes to INSERTED, however from the log output posted in comment #3, the sim_watch() function is only being called with state==3 ( READY ), so the emergency number SIM read operation is never executed.

This will require some active debug on my part to determine what's happening.

Revision history for this message
Tony Espy (awe) wrote :

Confirmed running this morning's build on maguro that I get the same list:

EmergencyNumbers = 08 000 999 110 112 911 118 119

Note, yesterday while doing some SIM PIN testing, I noticed that the emergency numbers were correct, so I think this bug is related to the way the SIM processing in the 'ril' device plugin is handled.

Revision history for this message
Tony Espy (awe) wrote :

So the root cause is the fact that the ril plugin calls ofono_sim_inserted_notify() before the rilmodem's sim_driver has called ofono_sim_register().

Note, the rilmodem sim driver code delays calling ofono_sim_register() until it's received a reply to a GET_SIM_STATUS request. Note, the ril plugin also calls GET_SIM_STATUS to determine if the SIM is present ( ie. this triggers the call to ofono_sim_inserted_notify() ).

So, I need to re-examine the sim driver logic and see if it makes sense to de-couple the call to ofono_sim_register() and the reply to the second GET_SIM_STATUS call.

Tony Espy (awe)
Changed in ofono (Ubuntu):
status: New → Confirmed
Tony Espy (awe)
Changed in ofono (Ubuntu):
assignee: nobody → Tony Espy (awe)
Changed in touch-preview-images:
status: In Progress → Confirmed
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

Fixed in branch

https://github.com/alfonsosanchezbeato/ofono/tree/sim-refactor

A delay in a callback was responsible for the problem.

Revision history for this message
Tony Espy (awe) wrote :

Just confirmed that the fix works using build #100 and test package based upon the branch mentioned in comment #7.

Revision history for this message
Tony Espy (awe) wrote :

Note, the above test case was run on mako.

When I run the same code on maguro ( build #101 ) with a PIN-locked SIM, after entering the PIN, the EmergencyNumbers isn't updated, so the full superset of numbers is still listed:

08 000 999 110 112 911 118 119

instead of

112 911

Note, both test scenarios were run in the US.

Revision history for this message
Tony Espy (awe) wrote :

It seems this is a new problem that's more generic than the proper population of emergency numbers.

See bug #1245860 for more details on this mako-specific issue.

Revision history for this message
Tony Espy (awe) wrote :

This bug is related to a race in the modem power-up/start-up logic in the ril plugin.

A fix is in the progress for this race condition, and can be found in the following branch:

https://github.com/tonyespy/ofono/tree/ril-power-fix

Changed in ofono (Ubuntu):
importance: Undecided → High
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ofono - 1.12+bzr6853-0ubuntu1

---------------
ofono (1.12+bzr6853-0ubuntu1) trusty; urgency=low

  [ Tony Espy ]
  * unit: fix fail-to-build on powerpc
    The previously released version enabled -Wall,
    which triggered build failures due to unused
    functions on powerpc. This is due to the fact
    that the unit tests only run on LITTLE_ENDIAN
    systems via an ifdef, which leaves unused functions
    and data. This change exends the ifdef to cover
    the unused functions and test data.
 -- Ricardo Salveti de Araujo <email address hidden> Tue, 21 Jan 2014 19:43:10 -0200

Changed in ofono (Ubuntu):
status: In Progress → Fix Released
Tony Espy (awe)
Changed in touch-preview-images:
status: Confirmed → 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.