← Back to team overview

ubuntu-phone team mailing list archive

Re: Carrier Customized APN Database

 

On 04/28/2014 04:35 PM, Chris Wayne wrote:



On Mon, Apr 28, 2014 at 4:30 PM, Tony Espy <espy@xxxxxxxxxxxxx
<mailto:espy@xxxxxxxxxxxxx>> wrote:

    On 04/28/2014 04:24 PM, Chris Wayne wrote:




        On Mon, Apr 28, 2014 at 4:16 PM, Tony Espy <espy@xxxxxxxxxxxxx
        <mailto:espy@xxxxxxxxxxxxx>
        <mailto:espy@xxxxxxxxxxxxx <mailto:espy@xxxxxxxxxxxxx>>> wrote:

             On 04/28/2014 03:30 PM, Chris Wayne wrote:

                 Hi guys,

                 One bit of customization that we have yet to implement
        is allowing
                 carriers to have custom APNs setup on the device.  I
        understand that
                 we're moving towards using the Android DB for this,
        which would
                 allow
                 for OEM customization, but there's no easy way for a
        carrier to add
                 their own APNs this way.


             The provisioning code you're referring to will land in the next
             upload of ofono, probably later this week if all goes well.

             The new provisioning logic actually uses both apns-conf.xml
        ( which
             is included in the device tarball ) and mbpi ( which is
        included as
             part of the Ubuntu filesystem ).


                 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 /var/lib/ofono/<ISMI>/gprs

             NetworkManger and Nutium both examine these contexts via
        ofono's
             ConnectionManager DBus interface.  Eventually, we'll have a
        settings
             UI that will allow direct manipulation of these APNs/gprs
        contexts.

             The only reason I see a carrier replacing our version of
             apns-conf.xml is if they've rolled out new APNs and/or have
        signed
             deals with MVNOs and want to ensure that the MVNO APNs are
             distributed.  Another reason would be to fix incorrect
        settings in
             our db.

        I think the MVNO use case is an important one for us to look out
        for.



                 The one restriction we would have is that any file/db
        would have
                 to live
                 in /custom.  Is this doable?


             Why wouldn't you just update the db in the device tarball?
             apns-conf.xml currently lives in /system/etc.


        The device tarball is supposed to be for device-specific files, not
        carrier customizations.


    Sure although in AOSP this file is considered device-specific...


             Also re: /custom, from what currently documented on the
        wiki, it can
             only install things in /home/<user>.  IMHOP, that's not
        really the
             right place to be installing a system-specific db file.

        The custom tarball installs files directly to /custom.  It *can*
        copy
        stuff to $HOME, but it certainly would not for this example (I would
        expect the db file would be just /custom/apns-conf.xml)


    Is this directory partioned at all ( eg. /custom/etc ), or is
    everything just installed in this top-level dir?


It's broken into different directories under /custom (like
/custom/usr/share/backgrounds/).

OK


More info can be found here:
http://developer.ubuntu.com/resources/oem/usage/

It might be nice to cross-link this page with the Customization page on the wiki:

https://wiki.ubuntu.com/Touch/Customization



    We could certainly change the ofono code to look first in /custom
    before /system/etc if that makes sense.


Is it the case that only one DB file can be supported? Or could ofono
read APNS from both /custom and /system/etc?

It could, it's just a matter of writing more code.  ;)-

As mentioned above, we currently query both apns-conf.xml and mbpi. It's not much of a stretch to add a customization db into the picture. Android does something similar, however its approach involves merging multiple XML files and then populating a runtime database.

Regards,
/tony






References