ofono

Differences between revisions 8 and 9
Revision 8 as of 2014-04-25 17:50:57
Size: 4818
Editor: 209-6-88-107
Comment: added new sections
Revision 9 as of 2014-04-25 18:17:19
Size: 8561
Editor: 209-6-88-107
Comment: added details SIM tests cases
Deletions are marked like this. Additions are marked like this.
Line 57: Line 57:
==== 1. No SIM Present - Modem Online ====

===== Purpose =====
Ensure the lack of a valid SIM doesn’t adversely affect the system.

===== Steps: =====

 * For this test, the preliminary steps listed in Setup can be ignored.
 * list-modems

===== Verification: =====

 * verify top-level modem properties:
{{{
    Features =
    Interfaces ( pre-fixed with “org.ofono.” ): Voice``CallManager
     Serial = ( is present )
}}}
 * verify Voice``Call``Manager Emergency``Numbers is populated.
{{{ Emergency``Numbers = 08 000 999 110 112 911 118 119 }}}

- verify that the ofonod error message is present in /var/log/syslog:
    “ofonod[PID]: Card NOT_PRESENT.

===== Automation Status ( qemu modifications required ) =====
The emulator qemu code is hard-coded to always create a valid SIM card. In order to support this type of test, we’d need to implement a new gsm console sim command which could be used to toggle the internal sim card status to A_SIM_STATUS_ABSENT. This state is currently only used by the PUK code; if the number of PUK_RETRIES are exceeded, then the sim card status is set to ABSENT. An alternative implementation would be to create a new command-line argument.

----

==== 2. SIM present - Modem Offline ====

===== Purpose =====
Verify that basic SIM information is able to be read before the modem is set online.

===== Steps/Verification: =====
- rilmodem/test-modem-offline

----

==== 3. SIM present - Modem Online ====

===== Purpose: =====
Verify that basic SIM information is able to be read before the modem is set online.

===== Steps: =====
- list-modems

===== Verification: =====

- verify top-level modem properties:
{{{
Features = gprs sim sms
Emergency = 0
Powered = 1,
Online = 0,
Lockdown = 0
Model = Fake Modem Model
Manufacturer = Fake Modem Manufacturer
Interfaces:
(all prefixed with “org.ofono”)
- CallForwarding
        - SmartMessaging
        - PushNotification
- MessageManager
- VoiceCallManager
- ConnectionManager
- NetworkTime
- MessageWaiting
- SimManager
- verify VoiceCallManager.EmergencyNumbers
- ( Country-specific )
- United States: 112 911
}}}
- verify Sim``Manager properties:
{{{
- Mobile Country Code matches country where SIM sold ( eg. US = 310 )
- MobileNetworkCode matches SIM ( eg. ATT US = 410 )
- Present = 1
- PinRequired = none
- LockedPins =
- CardIdentifier = ( matches SIM card ID printed on physical card )
- SubscriberIdentity is correct
- ServiceNumber = ( if specified, look like valid numbers; Ex. [Voice Mail] = ‘+180...’ )
}}}
===== Automation Status =====
This test can be implemented by modifying the basic list-modems script to verify the presence and values of the minimal set of required basic modem properties ( Online, Powered, Emergency, Lockdown, Serial, and Revision ).

My first attempt at running this test on the emulator fails, as toggling the emulator modem online/offline isn’t always 100% successful, and a few of the ofono interfaces fail to start, primarily Network``Registration. This will take some investigation. The next step is to apply all of the B2G patches and re-run my initial tests for this and modem-offline.

After applying the B2G patches, things work much better. Still a number of things fail, or are missing:

 * Modem property Revision isn’t present
 * Net``Reg property Strength isn’t present
 * Net``Reg property Technology isn’t present
 * Net``Reg property Mode reports ‘auto’ vs. ‘auto-only’ ( default on maguro/mako )
 * Voice``Call``Manager property Emergency``Numbers set to default ( ie. emulator doesn’t define EFECC )

Test-script: /test/rilmodem/test-sim-online

Dependants/Clients

  • connectivity-api
  • network-manager
  • powerd
  • telepathy-ofono
  • Dialer / Messaging Apps
  • network-indicator

Test Plan

Test target device: Nexus 4 with active SIM card Secondary/backup device: TBD

Initial set up:

  • Install latest image on phone
  • Build package containing the code to be landed, push them to and install them on the device
  • Reboot the phone

Manual Tests

Most of the tests below use one or more scripts from the ofono-scripts packages. They're installed by default in the directory /usr/share/ofono/scripts.

Basic Tests

These tests should be run for every upload, as they cover the basic functionality that ofono provides.

  • Test that the device can make outgoing phone calls, and receive incoming phone calls
  • Test that the device can sent outgoing text messages, and receive incoming text messages
  • Test that incoming phone calls and text messages wake the device when the screen is off
  • Test that mobile data connection works by testing Internet connectivity ( launch the browser )

Dialer / Messaging Autopilot

The Dialer and Message Apps are dependent on ofono, although they use the phonesim driver vs. the usual rilmodem driver used on actual Touch devices. If a change is being made to the ofono core, plugins, or the upstart job ( packaged as ofono.override in lxc-android-config, then these autopilot tests should be run on the device. This can be done by running the following steps:

  • make the device writable
  • apt-get install dialer-app-autopilot messaging-app-autopilot
  • reboot the device
  • On the desktop run the following command to run the tests:
    • phablet-test-run dialer_app
    • phablet-test-run messaging_app

When finished, run apt-get purge ofono-phonesim-autostart.

SIM Tests

SIM Presence Tests

1. No SIM Present - Modem Online

Purpose

Ensure the lack of a valid SIM doesn’t adversely affect the system.

Steps:
  • For this test, the preliminary steps listed in Setup can be ignored.
  • list-modems

Verification:
  • verify top-level modem properties:

    Features =
    Interfaces ( pre-fixed with “org.ofono.” ): Voice``CallManager
     Serial = ( is present )
  • verify VoiceCallManager EmergencyNumbers is populated.

    Emergency``Numbers = 08 000 999 110 112 911 118 119 

- verify that the ofonod error message is present in /var/log/syslog:

  • “ofonod[PID]: Card NOT_PRESENT.

Automation Status ( qemu modifications required )

The emulator qemu code is hard-coded to always create a valid SIM card. In order to support this type of test, we’d need to implement a new gsm console sim command which could be used to toggle the internal sim card status to A_SIM_STATUS_ABSENT. This state is currently only used by the PUK code; if the number of PUK_RETRIES are exceeded, then the sim card status is set to ABSENT. An alternative implementation would be to create a new command-line argument.


2. SIM present - Modem Offline

Purpose

Verify that basic SIM information is able to be read before the modem is set online.

Steps/Verification:

- rilmodem/test-modem-offline


3. SIM present - Modem Online

Purpose:

Verify that basic SIM information is able to be read before the modem is set online.

Steps:

- list-modems

Verification:

- verify top-level modem properties:

Features = gprs sim sms
Emergency = 0
Powered = 1, 
Online = 0, 
Lockdown = 0
Model = Fake Modem Model
Manufacturer = Fake Modem Manufacturer
Interfaces:
(all prefixed with “org.ofono”)
- CallForwarding
        - SmartMessaging
        - PushNotification
- MessageManager
- VoiceCallManager
- ConnectionManager
- NetworkTime
- MessageWaiting
- SimManager
- verify VoiceCallManager.EmergencyNumbers
- ( Country-specific )
- United States: 112 911

- verify SimManager properties:

- Mobile Country Code matches country where SIM sold ( eg. US = 310 )
- MobileNetworkCode matches SIM ( eg. ATT US = 410 )
- Present = 1
- PinRequired = none
- LockedPins =
- CardIdentifier = ( matches SIM card ID printed on physical card )
- SubscriberIdentity is correct
- ServiceNumber = ( if specified, look like valid numbers; Ex. [Voice Mail] = ‘+180...’ )

Automation Status

This test can be implemented by modifying the basic list-modems script to verify the presence and values of the minimal set of required basic modem properties ( Online, Powered, Emergency, Lockdown, Serial, and Revision ).

My first attempt at running this test on the emulator fails, as toggling the emulator modem online/offline isn’t always 100% successful, and a few of the ofono interfaces fail to start, primarily NetworkRegistration. This will take some investigation. The next step is to apply all of the B2G patches and re-run my initial tests for this and modem-offline.

After applying the B2G patches, things work much better. Still a number of things fail, or are missing:

  • Modem property Revision isn’t present
  • NetReg property Strength isn’t present

  • NetReg property Technology isn’t present

  • NetReg property Mode reports ‘auto’ vs. ‘auto-only’ ( default on maguro/mako )

  • VoiceCallManager property EmergencyNumbers set to default ( ie. emulator doesn’t define EFECC )

Test-script: /test/rilmodem/test-sim-online

SIM PIN/PUK Tests

Import Phonebook Tests

Voicecall Tests

Basic Call Tests

Emergency Call Tests

Supplementary Services Tests

Call Hold / Swap Tests

Multi-Party Tests

GPRS/MMS Provisioning Tests

As some of these tests may require a modified apns-conf.xml file, the environment variable OFONO_APNDB_PATH may be used to provide a custom apns-conf.xml file for some of these tests. This is due to the fact that apns-conf.xml lives on the /system partition, and thus is hard to modify without rebuilding the system image.

Basic Internet Provisioning

  • verify that Wi-Fi is disabled
  • stop ofono
  • delete the contexts from the file /var/lib/ofono/<IMSI>/gprs

  • start ofono
  • verify that the data connection is activated, and the Internet accessible
  • validate the contexts provisioned via the ofono script 'list-contexts.

Note - as the more contexts may be provisioning using apns-conf.xml than mbpi, it may take slightly longer for the data connection to become active for the first time. After the initial provisioning, Network Manager should remember the correct context, and connectivty should be much quicker.

Combined Internet/MMS Provisioning

Dotted IPv4 Proxy Address

Hostname Proxy Address

MMS Provisioning

Dotted IPv4 Proxy Address

MVNO ( type=imsi )

MVNO ( type=imsi with wildcards )

MVNO ( type=spn )

This requires a SIM card with a valid SPN set. You can tell this by checking out the info message logged by ofono in /var/log/syslog:

Apr 4 19:13:49 ubuntu-phablet ofonod[3199]: plugins/android-provision.c:provision_get_settings() Provisioning for MCC 310, MNC 410, SPN (null) imsi 310410315414121

APN from MBPI

The android-provision plugin also queries the mobile-broadband-provider-info database, as there are APNs defined therein, that may not be included in apns-conf.xml. ofono will prevent any duplicate APNs from being provisioned. If needed, use the OFONO_APNDB_PATH environment variable, and hand edit a copy of apns-conf.xml to ensure that APNs from mbpi will be added ( ie. delete APNs from apns-conf.xml so that the APNs from mbpi are used instead )

  • follow the steps from the test case Basic Internet Provisioning

  • verify that mbpi has non-duplicate APNs for the MCC/MNC associated with the SIM card

GPRS Tests

SMS Tests

Radio Settings Tests

Call Barring Tests

Call Forwarding Tests

USSD Tests

Process/Merges/TestPlans/ofono (last edited 2016-06-30 14:24:21 by alfonsosanchezbeato)