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. Add APNs in a blueprint through the Enable JSON setting.
Requirements for APN Configuration through Esper
- APN configuration requires a reboot after the Knox agreement for SM-T547U and AT&T M2X IoT data services.
- A supervisor plugin or Knox activation.
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 and MVNO Value (Deprecated from Android 9)
- GID = 2
- ICCID = 3
- IMSI = 1
- SPN = 0
Authentication Types
- CHAP = 2
- NONE = 0
- PAP = 1
- PAP or CHAP = 3
- Undefined = -1
MCC, MNC, and Numeric
- MCC = This is carrier-specific (to be obtained from carrier)
- MNC = This is carrier-specific (to be obtained from carrier)
- Numeric = MCC+MNC. For example, if the MCC is 999 and the MNC is 00, numeric will be 99900.
Name and APN fields
- Must be unique when compared with other APNs.
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. You can add an APN via Esper Settings > Advanced Android Settings > Enable JSON.
The APNs in these examples are sample JSON. Your carrier may have other specifications.
addNewApn
Adds new APN entry. You can add multiple APNs to a device. However, you will need to add each APN one at a time. For example, you can add the first APN via a blueprint. Then converge the device. After that, add the second APN to the JSON and converge the device, etc.
{
{
"dpcParams": [
{
"key": "addNewApn",
"value": "{\"name\":\"name\",\"apn\":\"super\",\"proxy\":\"\",\"port\":\"\",\"mmsproxy\":\"\",\"mmsport\":\"\",\"user\":\"\",\"server\":\"\",\"password\":\"\",\"mmsc\":\"\",\"authtype\":\"-1\",\"protocol\":\"IPV4V6\",\"roaming_protocol\":\"IPV4V6\",\"type\":\"default\",\"mcc\":\"carrier-specific\",\"mnc\":\"carrier-specific\",\"numeric\":\"mcc+mnc\",\"current\":\"1\",\"bearer\":\"0\",\"carrier_enabled\":\"1\"}"
}
]
}
addNewApnAndSetDefault
Add a new APN entry and set it as the default. Only one APN may be set as default at a time.
{
"dpcParams": [
{
"key": "addNewApnAndSetDefault",
"value": "{\"name\":\"name\",\"apn\":\"super\",\"proxy\":\"\",\"port\":\"\",\"mmsproxy\":\"\",\"mmsport\":\"\",\"user\":\"\",\"server\":\"\",\"password\":\"\",\"mmsc\":\"\",\"authtype\":\"-1\",\"protocol\":\"IPV4V6\",\"roaming_protocol\":\"IPV4V6\",\"type\":\"default\",\"mcc\":\"carrier-specific\",\"mnc\":\"carrier-specific\",\"numeric\":\"mcc+mnc\",\"current\":\"1\",\"bearer\":\"0\",\"carrier_enabled\":\"1\"}"
}
]
}
setDefaultAPNWithName
Sets default APN by Name (must already exist on the device).
{
"dpcParams": [
{
"key": "setDefaultAPNWithName",
"value": "Example"
}
]
}
removeAPN
Deletes an APN by name. Removing an APN on a supervisor device is not supported.
{
"dpcParams": [
{
"key": "removeAPN",
"value": "Example"
}
]
}
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.