Share via


APN configuration

OEMs are required to configure cellular data connection settings. The following example shows a general internet connection and an MMS connection. For a more detailed connectivity configuration sample, see Connectivity configuration.

Important  

For dual SIM phones, connection settings must be unique for each SIM. To ensure unique settings, OEMs can use the $(__MVID) macro as part of all connection names.

<Settings Path="Connections">
    <Setting Name="Cellular/zzzcontoso_internet $(__MVID)/AccessPointName" Value="contoso_internet_apn" />
    <Setting Name="Cellular/zzzcontoso_internet $(__MVID)/UseRequiresMappingsPolicy" Value="0" />
    <Setting Name="Cellular/zzzcontoso_internet $(__MVID)/AlwaysOn" Value="1" />
    <Setting Name="Cellular/zzzcontoso_internet $(__MVID)/ConnectionType" Value="gprs" />
    <Setting Name="Cellular/zzzcontoso_internet $(__MVID)/AuthType" Value="None" />
    <Setting Name="Cellular/zzzcontoso_internet $(__MVID)/IPType" Value="IPv4" />
    <Setting Name="Cellular/zzzcontoso_internet $(__MVID)/ExemptFromDisablePolicy" Value="1" />
    <Setting Name="Cellular/zzzcontoso_internet $(__MVID)/OemConnectionId" Value="12345678-1234-1234-1234-123456789012" />

    <Setting Name="Cellular/zzzcontoso_mms $(__MVID)/AccessPointName" Value="contoso_mms_apn" />
    <Setting Name="Cellular/zzzcontoso_mms $(__MVID)/UseRequiresMappingsPolicy" Value="1" />
    <Setting Name="Cellular/zzzcontoso_mms $(__MVID)/AlwaysOn" Value="0" />
    <Setting Name="Cellular/zzzcontoso_mms $(__MVID)/ExemptFromDisablePolicy" Value="1" />
    <Setting Name="Cellular/zzzcontoso_mms $(__MVID)/ConnectionType" Value="gprs" />
    <Setting Name="Cellular/zzzcontoso_mms $(__MVID)/AuthType" Value="None" />
    <Setting Name="Cellular/zzzcontoso_mms $(__MVID)/OemConnectionId" Value="12345678-1234-1234-1234-123456789012" />
</Settings>

Important  

All APN, proxy, and policy entries referring to the same connection must be defined within the same <Settings> element in the answer file.

Settings

  • connection name
    Defines the name of the connection. In the above example, the connection names are “zzzcontoso_internet $(__MVID)” and “zzzcontoso_mms $(__MVID)”.

    Connection policy configuration uses the value of connection name to identify the connection that is associated with a policy, and Proxy configuration uses the value of connection name to identify the connection that is associated with a proxy.

    Important  

    The desired order of priority for cellular data and MMS connection settings is the following:

    1. User-configured settings

    2. Pushed provisioning through OMA Client Provisioning

    3. Connectivity settings configured through runtime configuration

    However, Connection Manager tries connections in alphabetical order based on connection name. Due to this logic, connections configured through runtime configuration should be prepended with “zzz” to ensure that these connections are used as a lowest priority. The logic of alphabetical ordering of connections is subject to change in the future.

  • AlwaysOn
    Type: Int. Specifies if the Connection Manager will automatically attempt to connect to the APN when a connection is available.

    A value of "0" specifies that AlwaysOn is not supported, and the Connection Manager will only attempt to connect to the APN when an application requests the connection. This setting is recommended for applications that use a connection occasionally, for example, an APN that only controls MMS.

    A value of "1" specifies that AlwaysOn is supported, and the Connection Manager will automatically attempt to connect to the APN when it is available. This setting is recommended for general purpose Internet APNs.

    There must be at least one AlwaysOn Internet connection provisioned for the mobile operator.

  • AuthType
    Optional. Type: String. Specifies the method of authentication used for a connection.

    A value of "CHAP" specifies the Challenge Handshake Application Protocol. A value of "PAP" specifies the Password Authentication Protocol. A value of "None" specifies that the UserName and Password parameters are ignored. The default value is "None".

  • ConnectionType
    Optional. Type: String. Specifies the type of connection used for the APN. The following connection types are available:

    gprs

    Default. Used for GPRS type connections (GPRS / EDGE / UMTS).

    cdma

    Used for CDMA type connections (1XRTT / EVDO).

    lte

    Used for LTE type connections when the device is registered HOME.

    legacy

    Used for LTE type connections when the device is registered ROAMING.

     

  • Enabled
    Specifies if the connection is enabled.

    A value of "0" specifies that the connection is disabled. A value of "1" specifies that the connection is enabled.

  • IpHeaderCompression
    Optional. Specifies if IP header compression is enabled.

    A value of "0" specifies that IP header compression for the connection is disabled. A value of "1" specifies that IP header compression for the connection is enabled.

  • Password
    Required if AuthType is set to a value other than "None". Specifies the password used to connect to the APN.

  • SwCompression
    Optional. Specifies if software compression is enabled.

    A value of "0" specifies that software compression for the connection is disabled. A value of "1" specifies that software compression for the connection is enabled.

  • UserName
    Required if AuthType is set to a value other than "None". Specifies the user name used to connect to the APN.

  • UseRequiresMappingsPolicy
    Optional. Specifies if the connection requires a corresponding mappings policy.

    A value of "0" specifies that the connection can be used for any general Internet communications. A value of "1" specifies that the connection is only used if a mapping policy is present.

    For example, if the multimedia messaging service (MMS) APN should not have any other traffic except MMS, you can configure a mapping policy that sends MMS traffic to this connection. Then, you set the value of UseRequiresMappingsPolicy to be equal to "1" and Connection Manager will only use the connection for MMS traffic. Without this, Connection Manager will try to use the connection for any general purpose Internet traffic.

    For more information, see "Data and MMS connections set by the user" in Configuration service provider reference.

  • Version
    Type: Int. Specifies the XML version number and is used to verify that the XML is supported by Connection Manager's configuration service provider.

    This value must be "1" if included.

  • AccessPointName
    Specifies the logical name to select the GPRS gateway. For more information about allowable values, see GSM specification 07.07 "10.1.1 Define PDP Context +CGDCONT".

  • Roaming
    Optional. Type: Int. This parameter specifies if the connection should be activated when roaming. A value of "0" specifies that roaming is not allowed. A value of "1" specifies that roaming is allowed. A value of "2" specifies that domestic roaming is allowed. If a value is not specified, the default value is 1 (roaming allowed).

  • OEMConnectionID
    Optional. Type: GUID. Specifies a GUID to use to identify a specific connection in the modem. If a value is not specified, the default value is 00000000-0000-0000-0000-000000000000. This parameter is only used on LTE phones.

  • ApnId
    Optional. Type: Int. Specifies the purpose of the APN. If a value is not specified, the default value is "0" (none). This parameter is only used on LTE phones.

  • IPType
    Optional. Type: String. Specifies the network protocol of the connection. Available values are "IPv4", "IPv6", "IPv4v6" and "IPv4v6xlat". If a value is not specified, the default value is "IPv4".

    Warning  

    Do not use IPv6 or IPv4v6xlat on a device or network that does not support IPv6. Data functionality will not work. In addition, the device will not be able to connect to a roaming network that does not support IPv6 unless you configure roaming connections with an IPType of IPv4v6. Use the Roaming key as described in Runtime configuration to create connections specific to roaming conditions.

  • ExemptFromDisablePolicy
    Optional. Type: Int. If a general purpose connection is not exempted from the disable policy, a user-configured connection will be prioritized over the general purpose connection, and the general purpose connection will be disabled. A value of "0" specifies that the connection is not exempt. A value of "1" specifies that the connection is exempt. If a value is not specified, the default value is "0" (not exempt).

    To allow MMS when data is set to OFF, set both ExemptFromDisablePolicy and UseRequiresMappingsPolicy to "1". This indicates that the connection is a dedicated MMS connection and that it should not be disabled when all other connections are disabled. As a result, MMS can be sent and received when data is set to OFF. Note that sending MMS while roaming is still not allowed.

    On dual SIM phones, ExemptFromDisablePolicy is overwritten by the user-configured Allow MMS if data is off setting in Messaging - SIM settings.  By default, the Allow MMS if data is off setting is set based on the partner-configured ExemptFromDisablePolicy value. If the Allow MMS if data is off setting is turned off by the user, ExemptFromDisablePolicy is set to “0”. If the Allow MMS if data is off setting is turned on by the user, ExemptFromDisablePolicy is set to “1”.

    Important  

    Do not set ExemptFromDisablePolicy to "1" or UseRequiresMappingsPolicy to "1" for general purpose connections.

  • TetheringNAI
    Optional. Type: Int. CDMA only. Specifies if the connection is a tethering connection. A value of "0" specifies that the connection is not a tethering connection. A value of "1" specifies that the connection is a tethering connection. If a value is not specified, the default value is "0".

  • IdleDisconnectTimeout
    Optional. Type: Int. Specifies how long an on-demand connection can be unused before Connection Manager tears the connection down. This value is specified in seconds. Valid value range is 5 to 60 seconds. If not specified, the default is 30 seconds.

    Note  

    If tear-down/activation requests occur too frequently, this value should be set to greater than 5 seconds.

  • SimIccId
    For single SIM phones, this parm is optional. However, it is highly recommended to include this value when creating future updates. For dual SIM phones, this parm is required. Type: String. Specifies the SIM ICCID that services the connection.

Connectivity configuration

Proxy configuration

Connection policy configuration

 

 

Send comments about this topic to Microsoft