Configuring Your Device's APN
Mason OS supports provisioning APNs through project configurations. This guide will show you how to use this feature to configure a specific APN in your project.
|Available since||FEB-2018 release. See the [Changelog](/releases/).|
|Applicability||All Mason OS devices|
Mason devices come preconfigured for a variety of APNs (Access Point Name) for combinations of cellular carriers (MNCs) and countries of service (MCCs). At times however, you may have a need to explicitly configure your device to use a specific APN that overrides the defaults on the device. One example is Twilio, whose programmable SIMs require a specific APN setting. If you have such a need, you may manually modify the APNs on your device via the Settings app, or you can use the
apn project configuration feature described in this document.
There are two ways to configure the APNs on a Mason device. You may use the version that suits your needs. Let’s use the example of configuring Twilio’s APN when using a Twilio-branded SIM.
APN settings vary by carrier and country. Please make sure you have the correct information for the combination you need. Consult your carrier for details, or contact Mason Support if you have any questions.
Configure an APN via Settings
To use a Twilio SIM, you can configure a new APN entry in your device. For this, visit
Settings > More (under Wireless and Networks) > Cellular Networks > Access Point Names on each device that needs the configuration, and make a new entry for the APN.
For instance, here are instructions from T-Mobile USA to set the APN correctly to use their service.
Configure an APN via Project Configuration
You can also configure the APN settings for an entire group of Mason devices by using the APN project configuration feature. To use a specific APN in your project, you can edit your project configuration to include a separate
apns section. Let’s look at an example that shows how to do this for Twilio.
In your project configuration, include an additional section at the bottom as show below:
os: name: monitoringassistant # This must match the project identifier of the project we created earlier version: 1 configurations: mason-management: direct_boot_package: com.iheartlives.monitoringapp disable_keyguard: true # Turns off the keyguard/lock screen disable_status_bar: false # Keep status bar so we can get to settings apps: - name: com.iheartlives.monitoringapp # Just use the package name package_name: com.iheartlives.monitoringapp version_code: 1 media: bootanimation: name: iheartlives-anim version: 1 ## APN Configuration ## This example uses Twilio MVNO on T-Mobile USA apns: - carrier: Twilio mcc: 310 mnc: 260 apn: wireless.twilio.com
apns section is a YAML array of objects, each one describing an APN completely. In the above example, we have a single APN object, repeated here for convenience with a description:
- carrier: Carrier name, friendly string displayed in Settings mcc: NNN # country code mnc: MMM # network/carrier code apn: APN-NAME
While the most common case should only require the above 4 values, the following is the exhaustive list of supported properties for an APN object:
ppp_number, user, server, password, proxy, port, mmsproxy, mmsport, mmsc, type, protocol, roaming_protocol, authtype, bearer, profile_id, max_conns, wait_time, max_conns_time, mtu, carrier_enabled, modem_cognitive, user_visible, read_only, bearer_bitmask, mvno_type, mvno_match_data
These have the same meaning as the similarly named properties in the Android OEM cellular configuration, a sample of which is shown here.