Time to First Byte: Why Your Cellular Modem Isn’t Connecting to a Roaming SIM
We often see customers encounter long search times when a modem is attempting to connect to a network for the first time, when moving devices to a new country, and especially when using a roaming SIM. Some modems may even prematurely end or restart a network search if it takes too long, preventing the modem from ever gaining a connection at all. Keep reading to discover why this happens and learn a few ways to reduce the initial connection time.
Local SIMs vs. Roaming SIMs
In cellular IoT projects, you will be using either a roaming or a local SIM card to access a cellular network. You can get local SIM cards from a local MNO, and they will grant access to just that one network. Roaming SIMs, however, can connect to multiple MNOs for added redundancy and typically do not lock you into any long-term contracts. The differences between these types of SIM cards will change the way the cellular modem behaves.
The process by which a cellular modem connects to a network is complex and made even more so when using a roaming SIM card. Before the cellular modem can authenticate itself and connect to a cellular network, it must first determine what networks it can even connect to.
This process is quite simple for local SIMs: the modem simply checks the network ID that the SIM belongs to (HPLMN or Home PLMN) and begins searching to see if that network is available. When the modem finds a cellular signal matching the HPLMN, it can immediately register to the network and establish a data connection.
For roaming SIMs, the process gets a bit more complicated, as there are now more networks that the modem can connect to.
Soracom manages the HPLMN ID inside a Soracom roaming SIM card rather than any particular MNO. That means that while a modem can still read the HPLMN stored in the Soracom SIM, it won’t match any of the actual network operators providing cellular coverage in the area of the device. Since the modem cannot find a network that matches the HPLMN, it will begin a broader search for all available networks and verify with each if it has permission to connect.
In Search of Service
A broad network search can take a while depending on the modem, configuration, and country. When comparing it to a home SIM, it may seem like something is wrong, but it is entirely standard cellular modem behavior. It is crucial to allow your modem enough time to scan for networks and increase any timeouts preventing the scan from completing.
On the bright side, once the device makes the initial connection, both the SIM and modem will cache information about the current network for faster subsequent connections.
Optimizing Modem Search for Roaming SIMs
In working with Soracom customers, we have learned some tricks that can help to shorten the time to connect to the network:
- Optimize the network scan by reducing the number of Radio Access Technology (2G, 3G, NB-IoT) or frequency bands the modem is attempting to connect to. For example, if they are unavailable in the deployment country or your SIM card won’t support them.
- Bypass the network scan altogether by specifying the network. Use AT+COPS=1,2,”<plmn>” to manually specify which network the modem should connect to by its PLMN. Some modules support AT+COPS=4,2,”<plmn>” which will attempt to connect to the specified PLMN, but it will still fall back to automatic mode if unavailable.
- Allow the SIM to pre-cache network information by placing it into a device known to be more efficient at searching. Once it’s connected, the SIM will cache the network information, and will use that cached information to connect much faster when placed back into the original device.
- Alternatively, it may be better to clear the cached network information in the SIM in some instances. For example, suppose you know devices are moving to a new country/geography. In that case, you can clear the cached network information so that the modem will not waste time trying to connect to a network that is no longer available.
- If all else fails, make sure to increase any timeouts preventing the module from finishing its scanning.
In Conclusion
It is essential to be aware of cellular modems’ increased network search time when using a roaming SIM – especially in instances where cellular modems time out before the network search can be completed. Despite the difference in network search behavior when using a roaming SIM when compared to a home SIM, the benefit is access to many more networks in the area. The Soracom global SIM opens up access to multiple carriers in more than 140 countries worldwide, allowing for expanded global coverage and network redundancy.
………………
Got a question for Soracom? Whether you’re an existing customer, interested in learning more about our product and services, or want to learn about our Partner program – we’d love to hear from you!