Menu

Expand
Rate this page:

Super SIM’s 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 IMSI used 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 the device 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 with Super SIM

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 the device to re-read the data on the SIM, including the new IMSI. Take a look at The Refresh Proactive Command, below, for more details on how this works.

Scenario 1: the device is in a new location

Each Super SIM has a table that indicates which 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 (LOCation Information) files on your device, it will use the location data 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: the device is unable to connect to all visible networks

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 visible to the device are listed as forbidden networks, the applet on the SIM will switch IMSI to try to attach again with a different IMSI.

On each IMSI switch, the 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 — because the device has not been unable to attach to any networks — it starts a timer. If the timer expires and the SIM is still in Limited Service, the applet now switches the IMSI and sends a REFRESH proactive command to the device.

The duration of the timer is approximately 180 seconds (three minutes).

If your device automatically restarts 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, or the applet’s timer will not fire and the IMSI will not change accordingly. This is because your device may reset the onboard timer when it restarts.

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. This command instructs the device to refresh the information it holds about the SIM and is therefore expected to reload the EFs and other data, 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 by visiting Twilio's Community Forums or browsing the Twilio tag on Stack Overflow.

Thank you for your feedback!

We are always striving to improve our documentation quality, and your feedback is valuable to us. Please select the reason(s) for your feedback or provide additional information about how we can improve:

Sending your feedback...
🎉 Thank you for your feedback!
Something went wrong. Please try again.

Thanks for your feedback!

Refer us and get $10 in 3 simple steps!

Step 1

Get link

Get a free personal referral link here

Step 2

Give $10

Your user signs up and upgrade using link

Step 3

Get $10

1,250 free SMSes
OR 1,000 free voice mins
OR 12,000 chats
OR more