Any device equipped with a SIM card requires an APN to establish a data session. APN stands for Access Point Name, and provides your device with the information required to connect to the network. As long as your devices are equipped with an EMnify SIM card, the APN must be either"em" or "emnify". No username or password is required.
The procedure to set the APN is different on each device, but you can find some guidelines in this article.
- Configuring the APN on a GSM module via AT commands
- Configuring the APN on a GPS tracker TK104 family
- Configuring the APN on an Android operated device
Configuring the APN on a GSM module via AT commands
Please check the manual from your module vendor for the exact AT command to use.
Most modules allow to set the APN with "AT+CGDCONT" command like:
You can get the list of currently defined PDP Contexts with "AT+CDGCONT?":
Configuring the APN on a GPS tracker TK104 family
To configure the APN on a GPS Tracker TK104 family, so that the device can establish a data connection, you will need to do it over SMS.
To send the SMS you can also use the SMS console on the EMnify User Interface (EUI):
- Log in to your EUI account
- Go to the "Endpoints" Tab and there you select the endpoint representing your tracker
- The SMS console can be found in the “SMS” Tab
- As source address please enter 1234 or you can use any mobile phone number (e.g. in case your tracker is already paired with a phone number).
- Turn on GPRS mode (default is SMS mode)
Just send the command "gprs" followed by your password (*no* space between the command and the password), the following sample command assumes that your password is "123456":
- Configure the APN
The APN name is configured by sending the command "apn" followed by the tracker password (*no* space between the command and the password) and then followed by a space and the APN name. For an EMnify SIM the command would look like:
- Configure the Service and IP of your Tracker Server
You can configure the IP and port with which your tracker should connect to by sending the command "adminip", followed by the password (*no* space between the command and the password) and then followed by a space and the IP and finally followed by a space and the port. The command looks like this:
adminip123456 126.96.36.199 22000
The connectivity status of the tracker should now change to online on the EMnify Portal.
Checking the status of the Tracker
By sending the command "check" followed by your password (*no* space between the command and the password) you can request the tracker to respond by SMS. The command will look like this:
The tracker will respond back with SMS that you can see in the SMS console history on the EUI.
Configuring the APN on an Android operated device
While the EMnify network is purpose build to transport data traffic for the IoT/M2M use cases, it is also possible to use the EMnify SIMs in a consumer device like an Android mobile phone, (i.e. to quickly verify if connectivity is available). Keep in mind that the are also Android operated IoT devices, such as POS devices.
Before starting please make sure you have an unlocked mobile phone, i.e. not locked/limited to a specific operator.
- Insert the SIM in the phone’s SIM slot
- Go to the Main Settings
- Go to "Connections" and then “Mobile networks” (you may need to go through the “More networks” option first)
- Make sure the tick boxes for "Mobile data" and "Data roaming" are activated
- Then go to "Access Point Names"
- Press menu, and then either “New APN” or “+”
- Enter "EMnify" as name and "em" as APN, any other fields you can leave as "Not set" (blank) and then save the settings
- If you see multiple APNs listed, please tick the new APN (named EMnify/you just created) to be the active one
- Restart your phone
- You should have signal bars, showing that a connection has been established
- You can monitor the connectivity on the EMnify User Interface (EUI). If your APN settings configuration was successful, you should see the status of the endpoint as "Online"
- Open the browser on the phone and enter http://emnify.com to check if you can access the internet
What should I do if I have set the APN correctly on my Android device, but the configuration disappeared?
EMnify SIM cards have up to 6 IMSI on them. Depending on the country the SIMs are used in, a different IMSI can be selected. Android devices match an APN to a specific IMSI. In order to make sure the right APN is always configured, you can match the APN to the Mobile Country Code (MCC) and Mobile Network Code (MNC) of the 6 available IMSI an EMnify SIM can select.
Screenshot of Android configuration: