Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Super SIM: the Multi-IMSI Applet

Believe it or not, SIMs (Subscriber Identity Modules) are able to run small applications, called applets. Every Super SIM contains an applet which can switch the SIM’s IMSI in order to give you access to the widest selection of networks and redundant paths over which your data can be sent. To have the best experience with Super SIM, it’s important to understand how this applet interacts with your device.

What is an IMSI?

An International Mobile Subscriber Identity (IMSI) identifies a single user of the cellular network. When a device connects to a cellular network, that network uses the IMSI to check with the SIM’s home network to query what privileges the network should allow the SIM: whether it can use data, whether it can use SMS — and even whether it’s allowed to attach to that network at all.

Single IMSI SIMs

A SIM generally contains only one IMSI. If that IMSI’s home network doesn’t have a roaming agreement with the network to which one of your devices is trying to attach, then it will not be able to connect to that network. Neither will any of your other devices.

There’s another problem inherent in having just one IMSIs: the operator of your home network is a single point of failure. All of your data has to be transmitted through its infrastructure. If anything goes wrong there, your devices will not be able to connect to your backend even if the local network that your device is attached to is performing perfectly.

Super SIM’s multi-IMSI approach

To bypass these limitations, each Super SIM holds multiple IMSIs. The SIM uses the multi-IMSI applet to switch between these IMSIs in order to give you access to the best selection of networks at the best rates in whetever country your device is currently located. Super SIM might therefore use one IMSI in the United States and a completely different IMSI when the device is moved to Australia because of either better network availability or better pricing.

IMSI switching

There are a number of different situations that will cause a Super SIM to switch its IMSI. When an IMSI switch occurs, the applet will communicate with your device using proactive commands — instructions sent by the SIM to the device — offered by the Card Application Toolkit, a component of the standard GSM system.

When a Super SIM changes its IMSI, the applet sends a REFRESH proactive command to the host device. This instructs it to re-read the data on the SIM, including the new IMSI. Refer to Refresh Proactive Command for more details on how this works.

Scenario 1: the SIM is not using a country’s preferred IMSI

Each Super SIM has a table which indicates what IMSI it should use in a given country. If the applet detects a Location Status event, a Status command, or an update to the LOCI files on your device, it will use the location information and the table to determine if it is using the preferred IMSI for that country. If it is not, the applet will switch to the preferred IMSI.

Scenario 2: all the visible networks are forbidden

Many devices record the networks they have attempted to attach to but were not able to do so. This ensures they don’t waste time attempting to connect to those networks in future. The record is called a forbidden networks (FPLMN) list. When all of the networks currently visble to a Super SIM are listed as forbidden networks, the applet will switch IMSI.

On each IMSI switch, the forbidden networks (FPLMN) list will be cleared just before the REFRESH proactive command is sent.

Scenario 3: the SIM’s onboard timer expires

Super SIMs are able to handle host devices that don’t support either of the IMSI switching mechanisms outlined above. If the Super SIM enters Limited Service mode — it has been unable to attach to any networks — it starts a timer. If the timer expires and the SIM is still in Limited Service, then the device hasn’t triggered an IMSI switch, so the Super SIM does so itself: the applet now switches the IMSI and sends a REFRESH proactive command to the device.

The duration of the timer is approximately 300 seconds (five minutes).

If your device automatically resets after a specified period of time during which it wasn’t able to establish a data connection, make sure that the period is greater than the Super SIM’s IMSI switching timer duration. When your device resets, it may also reset the onboard timer.

The Refresh proactive command

When a Super SIM’s multi-IMSI applet switches the IMSI, a REFRESH proactive command is sent to the host device. This instruction informs the device that the contents or structure of the elementary files (EFs) on the SIM have been changed. The device is therefore expected to reload the files, including the IMSI, from the SIM.

The Super SIM multi-IMSI applet follows the ETSI TS 102 223: Smart Cards; Card Application Toolkit (CAT) (Release 6) specification. The REFRESH proactive command sent by the applet uses command qualifier 00 - NAA Initialization and Full File Change Notification.

Later releases of the ETSI TS 102 223: Smart Cards; Card Application Toolkit (CAT) specification discourage the use of command qualifier 00. However, using the suggested alternative command qualifier, 04 - UICC Reset, can result in the device resetting and prompting the user for the SIM PIN, leaving the device disconnected from the network. To avoid this, the multi-IMSI applet continues to use command qualifier 00.

Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.