RE: APN list: adding mcc & mnc
- From: Dan Williams <dcbw redhat com>
- To: "Martijn Cox (LiveContacts)" <m cox livecontacts com>
- Cc: "wader-devel lists warp es" <wader-devel lists warp es>, "stuart ward bcs org" <stuart ward bcs org>, "networkmanager-list gnome org" <networkmanager-list gnome org>
- Subject: RE: APN list: adding mcc & mnc
- Date: Wed, 15 Apr 2009 12:45:44 -0400
On Wed, 2009-04-15 at 18:24 +0200, Martijn Cox (LiveContacts) wrote:
> Most Mobile Phone API's provide a way to extract the MCC and/or MNC from the SIM with highlevel calls. For instance, the blackberry platform I've used allows for the following method calls:
>
> import net.rim.device.api.system.RadioInfo;
>
> int networkIndex = RadioInfo.getCurrentNetworkIndex();
> _mnc = RadioInfo.getMNC(networkIndex);
> _mcc = RadioInfo.getMCC(networkIndex);
>
> _mnc = FWCellInfo.fromDecimalToHex(_mnc);
> _mcc = FWCellInfo.fromDecimalToHex(_mcc);
>
> (the fromDecimalToHex method is a simple method to convert the decimal number the api delivers to me into the hexadecimal network code and country code. Other platforms, such as Symbian/Android/Windows Mobile provide the hexadecimal value out of the box.)
>
> These values can then be matched against the XML file, with Holland as an example snippet from the converted xml-file (see xml-attachment). I've also included the java code to (SAX-)parse through the XML based on country code and mobile provider code, and if that fails, gather all access points for that country (see java-attachment, GetApnStringsFromXml method).
>
> I've not sent the full xml-file, because I don’t know newsgroup/mailgroup etiquette that well, and might flood someone's inbox with the full 100+ KB xml file (?).
>
> One final note: Whenever the original MBPI-entry could not be matched to a MCC and/or MNC (based on the list provided @ http://en.wikipedia.org/wiki/Mobile_Network_Code), I've added the marker value '123456789'. Also, we didn't fully process the list, as time is money..
>
> Hope this is helpful.
We're going to need multiple MNCs for each operator, since for example
here in the US (via acquisition, since T-Mobile USA was put together
from a few different providers over about 5 years) they have 160, 200,
210, 220, 230, 240, 250, 260, 270, etc. And Cingular/AT&T has quite a
large number of MNCs too since they are the product of a lot of mergers
and acquisitions.
So as long as we can have multiple <mnc> for each provider, and multiple
<mcc> entries for each country (US is 310 and 311 and maybe more), it
should provide for the configs I know about.
Dan
> -----Original Message-----
> From: Dan Williams [mailto:dcbw redhat com]
> Sent: woensdag 15 april 2009 17:56
> To: Martijn Cox (LiveContacts)
> Cc: networkmanager-list gnome org; stuart ward bcs org; wader-devel lists warp es
> Subject: Re: APN list: adding mcc & mnc
>
> On Tue, 2009-04-14 at 15:05 +0200, Martijn Cox (LiveContacts) wrote:
> > Hello all,
> >
> >
> >
> > I’ve sent the following email to Wellark, the maintainer of the Mobile
> > Broadband Provider Info project, a few weeks ago, outlining a way to
> > include mobile country codes and mobile network codes in the MBPI
> > project. In the meantime, we’ve already implemented this scheme in our
> > company, and have successfully used it to extract the APN’s for two
> > providers in one country. Would you be interested in using this
> > scheme?
>
> Yeah, that would be pretty cool. IIRC, we can then extract bits from
> the IMSI and figure out which provider the SIM is for too, right?
>
> Can you provide a sample of how this would look in the XML config too?
> We need to ensure that we can store multiple MCC/MNC codes for each
> provider in the table.
>
> Dan
>
> >
> >
> > As Wellark has been very busy, he has asked me to forward this message
> > to both the NetworkManager and the Wader Development mailing list, as
> > he suspects there is additional interest these development groups in
> > adding country code and network codes to the MBPI project. Note that I
> > currently have no idea what the NetworkManager and Wader development
> > groups are, as this is not within the scope of my current
> > job-assignment.
> >
> >
> >
> > Regards, Martijn.
> >
> >
> >
> > From: Martijn Cox
> > Sent: woensdag 1 april 2009 13:00
> > To: 'antti kaijanmaki net'
> > Subject: apn list, adding mcc & mnc
> >
> >
> >
> >
> > Hi Wellark,
> >
> >
> >
> > I’m a developer for (amongst others), the blackberry platform. I’ve
> > come across your project, and wish to contribute by adding the mobile
> > country code and mobile network code to the xml file, based on the
> > Wikipedia list @ http://en.wikipedia.org/wiki/Mobile_Network_Code. Do
> > you regard such an endeavor as ok?
> >
> >
> >
> > I would like to add them, according to the following
> > DTD, which is based on your supplied DTD, with additions in yellow:
> >
> >
> >
> > <!ELEMENT serviceproviders (country*)>
> >
> > <!ATTLIST serviceproviders format CDATA #REQUIRED>
> >
> >
> >
> > <!ELEMENT country (provider* ,mcc+)>
> >
> > <!ATTLIST country code CDATA #REQUIRED>
> >
> >
> >
> > <!ELEMENT provider ( mnc+,
> >
> > name+,
> >
> > (gsm|cdma),
> >
> > username?,
> >
> > password?,
> >
> > dns*,
> >
> > gateway?)>
> >
> >
> >
> > <!ELEMENT name (#PCDATA)>
> >
> > <!ATTLIST name xml:lang CDATA #IMPLIED>
> >
> >
> >
> > <!ELEMENT gsm (apn)>
> >
> > <!ELEMENT apn (#PCDATA)>
> >
> >
> >
> > <!ELEMENT cdma EMPTY>
> >
> >
> >
> > <!ELEMENT username (#PCDATA)>
> >
> > <!ELEMENT password (#PCDATA)>
> >
> > <!ELEMENT dns (#PCDATA)>
> >
> > <!ELEMENT gateway (#PCDATA)>
> >
> >
> >
> > <!ELEMENT mcc (#PCDATA)>
> >
> > <!ELEMENT mnc (#PCDATA)>
> >
> >
> >
> > Do you think that would be ok? The reason for these additions is that
> > it’s easier to search this way when you have access to a provider id
> > (mobile network code), and mobile country code (i.s.o. the country
> > identifier you use, which is currently not available for me).
> >
> >
> >
> > Regards,
> >
> >
> >
> > Martijn Cox
> >
> > Livecontacts B.V.
> >
> >
> >
> >
> > _______________________________________________
> > NetworkManager-list mailing list
> > NetworkManager-list gnome org
> > http://mail.gnome.org/mailman/listinfo/networkmanager-list
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]