You need to set the Access Point Name (APN) that an IoT device’s cellular modem will use for Internet connectivity. If all of your devices contain Super SIMs, this is straightforward: use the APN
However, if your products contain SIMs from a variety of suppliers, including Twilio, you will first need to check which SIM a given device contains so that you can set the appropriate APN for that SIM. Typically, to detect SIM type you read back the SIM’s IMSI.
One the key advantages of Super SIM is that it includes multiple IMSIs to enable switching between different local networks in the territory in which the host device is operating.
This means that you should never use the current IMSI to determine whether a device contains a Super SIM. The IMSI reported by a Super SIM at any given time can and very likely will change. Instead, use the methods outlined below. The first is the recommended one, but the second may also be used.
For more detailed guidance on setting the APN, particularly for devices with integrated modules, and for setting the APN using the Super SIM API’s SMS Commands functionality, please see our APN configuration page.
Every Super SIM, like all SIMs, incorporates an Integrated Circuit Card Identifier (ICCID). Super SIM ICCIDs all begin with the digits
8988323 so this fact can be used to determine whether a given SIM card or chip is a Super SIM.
Depending on when you need to determine a Super SIM’s ICCID, there are alternative ways of obtaining it.
You can use the Super SIM API to get the Sim resource for a given SIM. Make a
GET request to either of the following endpoints:
Look for the
iccid key in the JSON returned by the API and then match it against the prefix show above.
The Sim resource documentation can provide you with further details about how to make the call and what further information is included in the response.
You can also interrogate your module for the connected SIM’s ICCID. Modules generally use this command:
Its response will be:
However, some modules have alternative commands. For example, the Quectel modules use
AT+QCCID; this yields the repsonse
AT+CRSM command with the following parameters to retrieve the SIM’s Service Provider Name (SPN):
If the device’s SIM is a Super SIM, this command will return:
The third, textual field provides the SPN. Each pair of characters is a hexadecimal character code. To extract the SPN, ignore the first pair of characters (
00) and read up to the first
FF. Now convert each hex pair to an Ascii character:
You can shortcut this process simply by comparing the third field to
005477696C696FFFFFFFFFFFFFFFFFFFFF. If the strings match, your code knows it is using a Super SIM and can issue the APN
If you’d like to learn more about the fields included in the initial
AT+CSRM command and how the response is formatted, check out section 4.2.12 of the ETSI UMTS Specification. For example, the
176 in the command indicates a binary read command; the
28486 indicates that we want to receive the SPN.