probe_sim

Source code: probe_sim.py

Probes SIM card information from ‘modem status’.

Description

The first usage of this test is to insert sim card, record ICCID (IMSI) value, then remove sim card. A ‘modem reset’ is needed after plugging SIM card. It is not needed after removing SIM card. The second usage of this test is to make sure that SIM card is not present. A ‘modem reset’ is needed to avoid the case that SIM card is inserted without a ‘modem reset’. Before running this test, modem carrier should be set to Generic UMTS.

Test Procedure

  1. Insert sim card.

  2. The test records ICCID (IMSI) value automatically.

  3. Remove sim card.

Dependency

  • modem

Examples

An example:

{
  "pytest_name": "probe_sim",
  "label": "Probe SIM",
  "related_components": [
    "test_tags.TestCategory.WWAN"
  ],
  "args": {
    "enable_modem_reset": false
  }
}

Test Arguments

Name

Type

Description

only_check_simcard_not_present

bool

(optional; default: False) Only checks sim card is not present

only_check_simcard_present

bool

(optional; default: False) Only checks sim card is present

poll_modem_status

bool

(optional; default: False) Polls modem status until the status is available

modem_reset_commands

list

(optional; default: [['modem', 'reset']]) A list of commands to reset modem

enable_modem_reset

bool

(optional; default: True) If true, reset modem before check status.