An APN, or an Access Point Name, allows mobile devices to connect with a cell network. Most of the time, Android only allows one active APN at a time.
Requirements for APN Configuration through Esper
- Android 9+
- APN configuration requires a reboot after the Knox agreement for SM-T547U and AT&T M2X IoT data services.
In this article:
Before Configuring an APN
You’ll need to contact your carrier for the correct values before configuring the APN. Learn more about APN settings and Telephony Carriers.
APN Keys and Values
Protocol
The protocol used to connect to this APN. One of the PDP_type values in TS 27.007 section 10.1.1.
IP, IPV6, IPV4V6, or PPP
ROAMING_PROTOCOL
The protocol to use to connect to this APN when roaming. The syntax is the same as the protocol.
IP, IPV6, IPV4V6, or PPP
MVNO Type*
- GID = 2
- ICCID = 3
- IMSI = 1
- SPN = 0
Authentication Types
- CHAP = 2
- NONE = 0
- PAP = 1
- PAP or CHAP = 3
Types*
- BIP = 8192
- CBS = 128
- Default = 17
- DUN = 8
- Emergency = 512
- Enterprise = 16384
- FOTA = 32
- HIPRI = 16
- IA = 256
- IMS = 64
- MCX = 1024
- MMS = 2
- OEM_PAID = 65536 (Added in Baklava)
- OEM_PRIVATE = 131072 (Added in Baklava)
- RCS = 32768
- SUPL = 4
- VSIM = 4096
- XCAP = 2048
*Field can be left blank
APN Params
There are 4 related params used to control APNs on the device:
setAPN
Adds new APN entry.
{
"key": "addNewApnAndSetDefault",
"value": "{\"mnc\": \"869\",\"mcc\": \"405\",\"name\": \"POD\",\"apn\": \"data641003\",\"proxy\": \"\",\"port\": \"\",\"mmsc\": \"\",\"mmsproxy\": \"\",\"mmsport\": \"\",\"user\": \"\",\"password\": \"\",\"authtype\": \"-1\",\"type\": \"\",\"protocol\": \"IPV4V6\",\"roaming_protocol\": \"IPV4V6\",\"carrier_enabled\": \"true\",\"mvno_type\": \"\"}"
}
addNewApnAndSetDefault
Add a new APN entry and set it as the default.
{
"key":"addNewApnAndSetDefault","value":"{\"mnc\":\"999\",\"mcc\":\"999\",\"name\":\"Example\",\"apn\":\"127.0.0.1\",\"proxy\":\"\",\"port\":\"\",\"mmsc\":\"\",\"mmsproxy\":\"\",\"mmsport\":\"\",\"user\":\"\",\"password\":\"\",\"authtype\":\"-1\",\"type\":\"\",\"protocol\":\"IPV4V6\",\"roaming_protocol\":\"IPV4V6\",\"carrier_enabled\":\"1\",\"mvno_type\":\"\"}"
}
setDefaultAPNWithName
Sets default APN by Name (must already exist on the device).
{
"key": "setDefaultAPNWithName",
"value": "Example"
}
removeAPN
Deletes an APN by name.
{
"key": "removeAPN",
"value": "Example"
}
About Multiple APNS
APNs can be used together and even multiple times in the same namespace. In the example below, only the APN with the key “addNewApnAndSetDefault’ will be set as the default. If multiple APNs have this key, only the one processed last will be the default.
{
"dpcParams":[
{
"key":"addNewApn",
"value":"[...]"
},
{
"key":"addNewApn",
"value":"[...]"
},
{
"key":"addNewApnAndSetDefault",
"value":"[...]"
},
{
"key":"addNewApn",
"value":"[...]"
}
]
}
Applying APNs
In Esper, you can set up an APN via the console, API, or Device SDK. Check out the Esper blog to learn more about applying namespaces.