SIM

Revision 6 as of 2014-05-05 22:10:04

Clear message


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.” ): VoiceCallManager
    Serial = ( is present )
  • verify VoiceCallManager EmergencyNumbers is populated.

    EmergencyNumbers = 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 pre-fixed with ''org.ofono'') ConnectionManager, CallBarring, 
        RadioSettings, CallSettings, SupplementaryServices, NetworkRegistration, CallVolume, 
        CallForwarding, SmartMessaging, PushNotification, MessageManager, NetworkTime, 
        MessageWaiting, VoiceCallManager, SimManager
  • verify VoiceCallManager EmergencyNumbers is populated (US #s used here for example):

        EmergencyNumbers = 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 =
    Retries =
    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

1. SIM PIN Locked

Purpose:

Verify that a PIN-locked SIM can be unlocked for use.

Steps:

  • list-modems
  • enter-pin pin <PIN>

  • list-modems

Verification:

  • prior to enter-pin, verify top-level modem properties:

    Features = sim
    Interfaces ( prefixed with “org.ofono.” ) = VoiceCallManager SimManager
  • verify VoiceCallManager properties ( US #s used for example ):

        EmergencyNumbers = 112 911 
  • verify SimManager properties:

    LockedPins = pin
    PinRequired = pin
    Retries =
    Present = 1
    CardIdentifier = ( matches SIM card ID printed on physical card )
  • after enter-pin same verification as test case 3. SIM Present - Modem Online.

Automation Status

PIN/PUK automated tests are hold as the emulator doesn’t support setting or clearing facility locks, so although the default SIM card in the emulator has both PIN ( 0000 ) and PUK ( 12345678 ) defined, the PIN lock isn’t active by default. So, in order to make this work we either need to add support for facility locks in both the reference-ril and qemu/telephony, or possibly add a console command for lock management that could be used when the modem is offline.

2. SIM PIN Retries

Purpose:

To verify the PIN Retries is updated after an incorrect enter-PIN attempt.

Steps:

  • enter an incorrect SIM PIN
  • list-modems
  • Optionally repeat

Verification:

  • prior to enter-pin, verify top-level modem properties:

    Features = sim
    Interfaces ( prefixed with “org.ofono.” ) = VoiceCallManager SimManager
  • verify VoiceCallManager properties ( US #s used for example ):

        EmergencyNumbers = 112 911 
  • verify SimManager properties:

    LockedPins = pin
    PinRequired = puk
    Retries =
    Present = 1
    CardIdentifier = ( matches SIM card ID printed on physical card )
  • after incorrect PIN entry, verify the Sim``Manager Retries show remaining attempts ( eg. 2 after first incorrect PIN, then 1, ... ). Other properties should otherwise stay the same.

Automation Status

See the previous test case.

3. SIM PUK Locked

Purpose:

To verify the a PUK-locked SIM can be unlocked and used.

Steps:

  • enter an incorrect SIM PIN three times in a row to force the SIM into PUK-locked state.
  • list-modems
  • reset-pin /ril_0 puk <PUK> <new PIN> ( Ex. reset_pin /ril_0 puk 12345678 1234 )

  • list-modems

Verification:

  • prior to reset-pin, verify top-level modem properties:

    Features = sim
    Interfaces ( prefixed with “org.ofono.” ) = VoiceCallManager SimManager
  • verify VoiceCallManager properties ( US #s used for example ):

        EmergencyNumbers = 112 911 
  • verify SimManager properties:

    LockedPins = pin
    PinRequired = puk
    Retries =
    Present = 1
    CardIdentifier = ( matches SIM card ID printed on physical card )
  • after reset-pin same verification as test case 3. SIM Present - Modem Online.

Automation Status

See the previous test case.

Phonebook Import Tests