Cellular based devices need a working SIM card and a working APN to connect to the network.
Typically when using 4G technologies such as Cat-M1 and NB-IoT the network automatically sets the correct APN and no user input is required. However, this is not the case for all networks and APNs. An autoAPN list is used by the device for the networks that need specific APNs, however this list isn't exhaustive and occasionally you may be required to set the APN manually.
On 2G and 3G networks it was possible to send an SMS to set the APN,
However n Cat-M1 and Nb-IoT networks, the device must be already connected to the network (i.e. the correct APN needs to be set already) to receive an SMS.
Alternate methods are required for the 4G devices.
4G CAT M1 and NB-IoT devices may need an APN setup before they can get on air.
- To set an APN on a 4G device:
- A "Config Sim" can be created by storing a special SMS on the SIM.
- The special SMS format is shown below
- Then the config Sim can be inserted into devices that need configuring.
- Using an Alternate SIM (that will connect automatically) to set the APN, then swapping to the desired SIM
Method 1. Creating a Config Sim
There are multiple methods for storing the SMS onto a SIM card, including:
- Using a mobile phone that is capable of saving SMS's to its SIM card.
- Using a dedicated SIM programmer
- Sending the 4GINIT SMS to a device that is online (perhaps via a different carrier) and has firmware that supports the 4GINIT SMS. This saves the SMS to the SIM card which can then be used to set the APN on other devices.
- Requesting a SIM with your required APN from your Digital Matter representative.
APN SMS Format
The format for the SMS is: (hash Asterisk comma 4GINIT comma APN comma RAT)
#*,4GINIT,<apn name>,<RAT number>
Where RAT stands for Radio Access Technology. The RAT is set using the following key:
0 - Automatic (use Cat-M1 and NB-IoT). This is the default setting, but doesn't work in some cases.
1 - Cat-M1 only (recommended)
2 - NB-IoT only
If the APN details are omitted then the default APN and RAT will be saved to the SIM card. The default APN is a blank APN. And the default RAT is 0 (M1 and NB1)
In the Device Logs it will show the command has been received, understood and saved. You can also check your SIM portal to see if it has been saved.
Using a Config Sim to set the APN on a device
The method for setting the APN using the Config Sim card is as follows:
- Send the SMS 4GINIT command to the SIM card in the connecting device
- The LED on the device will flash at its normal rate
- Within 10 seconds the device will begin a long, slow flash signifying the APN has been read and saved. You can also check the device logs to confirm (see above)
- Power can now be removed from the device, and the SIM card transferred to the destination/non-connecting device.
- Once the Device powers on, it will read the APN and use it to connect into OEM Server/Third party server specified.
- You can check if the device has read the new APN parameters once it connects in by opening the 'Admin Parameters' of the device. The SMS used resulting in the below parameters was #*,4GINIT,telstra.internet,1
Warning! The devices will delete all SMSes stored on the SIM that are not in the APN SMS format.
Method 2: Using an Alternate SIM card
If you have a SIM card that will allow the device to connect into OEM Server already without custom APN settings you can insert this SIM into the new device, connect and then set the desired Admin parameters via OEM.
- Insert functioning SIM Card
- Navigate to Admin Parameters and set APN (Fixed APN tab) & RAT (4G Technology tab)
- Wait for next upload of device. Device will connect in and read the new parameters and then apply them and not connect in again.
- Insert new SIM card and device will connect if APN details were correct.
Warning! This method can easily end up with the device being unable to connect if you set the incorrect parameters.