← Back to team overview

ubuntu-phone team mailing list archive

Re: Carrier Customized APN Database

 

On Tue, Apr 29, 2014 at 2:48 AM, Sergio Schvezov <
sergio.schvezov@xxxxxxxxxxxxx> wrote:

> On Mon, Apr 28, 2014 at 5:40 PM, Alex Chiang <achiang@xxxxxxxxxxxxx>wrote:
>
>> On Mon, Apr 28, 2014 at 1:16 PM, Tony Espy <espy@xxxxxxxxxxxxx> wrote:
>> > On 04/28/2014 03:30 PM, Chris Wayne wrote:
>> >> The use case for a carrier wanting their own APN database could be
>> >> having a special app that they want to allow zero-tariff data usage for
>> >> (e.g. their usage app, or maybe they have a deal with some site/app
>> that
>> >> all data used is free for their customers).
>> >
>> > I'm not sure I understand your example.  We automatically provision GPRS
>> > contexts for network connnectivity and MMS support.  This provisioning
>> is
>> > SIM-specific, and the result is a number of gprs contexts created
>> ofono's
>> > gprs settings file:
>>
>> In this example, imagine a carrier in China where they do not have
>> unlimited data plans, but rather you pay by the MB.
>>
>> This carrier partners with the super popular Chinese Instagram clone
>> so that all data traffic on "Chinagram" is free. The carrier then
>> makes an awesome advertisement about how "Chinagram" is free on their
>> network and they sign up 300M new users.
>>
>> All traffic going to/from "Chinagram" gets routed to
>> chinagram-zero-tariff.carrier.cn, whilst all other traffic goes to
>> apn.carrier.cn.
>>
>> This is a fairly common use case. A more mundane example would be to
>> send all OTA updates from a zero-tariff APN and normal traffic over
>> the $ / MB APN.
>>
>> (btw, the Chinagram example is 100% invented... ;)
>>
>
> Chinagram is bringing in more issues :-)
>
> Who will activate the context? The app itself or will it be always on?
>
> For MMS when using two contexts, the MMS context has a MessageProxy
> defined and network manager adds a host route to be able to download or
> upload an MMS; how will this be defined for the app?
>
> Will this context be editable by the user through the future UI to be?
>
> I'm not contradicting, just expanding ;-)
>
>
Following on this, ofono exposes a limited set of APN types: internet, MMS,
and not much more. As a reminder, the purpose of the APN DB is to provide a
set of commonly used APNs for common uses, for a given operator, so the
*user* does not need to configure manually the APN. The APNs are searched
using data received from the active network and from the SIM.
 NetworkManager uses this data to set-up a connection.

But APN data can be also entered in ofono using its DBus interface. If we
are talking about some specific application that uses a special APN and
sets up specific routes, it makes more sense to let that app create its own
APN and routes. Besides the "Chinagram" example, I can think of a company
which has its own private APN contracted with a carrier and uses it for
company confidential data. So the solution should be more general, and not
just for operators.

IMO, the SDK should provide hooks to create APNs and connect to them, and
also to set-up routes. As this is a potential security hazard, this should
be possible only for "trusted" applications (I do not know if we have such
a concept in Touch). Android, for instance, defines WRITE_APN_SETTINGS [1]
permission, which is applicable only for signed/system applications.

Br,
Alfonso

[1] https://code.google.com/p/android/issues/detail?id=24227

References