When making a cellular connection with your IoT device, there are a few things that must happen in order to establish that connection and allow data to flow from your device to your application in the cloud.
First, a modem will look to discover any available networks, before confirming which network operators they belong to. Once a suitable network is detected, the modem will check to see if it has the necessary permissions to register to it, while the network itself will request SIM details from the modem. If networks are present but the SIM is not allowed to connect, the device will continue scanning for an acceptable network, or be unable to establish a connection. Once an appropriate network is discovered, the modem will request a network registration. For 2G/3G connections, the modem will now be allowed to connect, though a data session has not yet been established. It is also important to realize that even if your IoT device can successfully register to a cell tower, it does not mean that a valid path can be made to the internet.
After successfully registering the network, the modem will send a request to the local network operator to create a data session based on the configured APN settings. The local network will use those APN settings to forward the request to your mobile network operator (MNO).
With LTE connections, this all occurs in one combined “attach” to the network. Once the message is received, the MNO or mobile virtual network operator (MVNO) will assign an IP address to the modem and send those details, and those of the DNS server back. At this point, your device is ready to send and receive data across the cellular network.
While connecting to a cellular network may seem pretty simple at first glance, the process is certainly more complicated behind the scenes. Did you know that SIM cards contain their own tiny operating system? Or that they are able to cache various information to help speed up subsequent connections? From a user perspective, when you power on your device to create a connection - as long as there is a signal - it will allow you to connect. What do you find appealing about a cellular connection compared to WiFi or bluetooth?