Hi Jerônimo, On 04/06/2014 02:37 PM, Jerônimo Lopes wrote: > Hi, > > I'm trying to understand ofono build-in provisioning mechanism. > > As far as understand these are the steps: > > 1: get MCC and MNC > 2: check settings file for this network, if exists goto step 6 > 3: try to read provisioning info from the sim card, if ok, goto step 5 > 4: try to read provisioning from MBPI xml file > 5: write info to the settings file > 6: if it has a valid provisioning info, "export" (I don't know if this > is the right term, so I'll use it) it to connman. > > So my first question, is that correct? Nope, not really. The process is roughly like this: - Load settings file. Settings are stored according to IMSI of the SIM - If no settings file is found, wait until MCC, MNC and SPN are known - Run provisioning plugins (e.g. MBPI) - If provisioning fails, make up a 'sentinel' context telling external parties that no valid settings exist. > > The other question is why provisioning plugin can't get 2 or more apn > settings for the same network and export more than one service to connman? > > I've tried to change line 53 of plugins/provision.c, setting > 'allow_duplicates' parameter to 'TRUE': > apns = mbpi_lookup_apn(mcc, mnc, TRUE, &error); > > Everything seams to work, but only the first context is exported to > connman. I've try to debug the code, but I could't realize where this is > done. > Is there a particular reason why this can't be done? oFono can. Connman only expects to manage a single Internet context, so having multiple will not work there. Regards, -Denis