Been looking at the MCC/MNC api recently as

Been looking at the MCC/MNC api recently as there was some changes and was asked to look at it. 

I did a bugzilla search and started looking at the interesting bugs:

Bug 861397 – Automatic APN selection does not work for some mcc/mnc values
Bug 864798 – CostControl broken due to ICC MCC/MNC int to string change
Bug 835729 – B2G RIL: we shall update operator’s mcc/mnc first then longName / shortName
Bug 845629 – [Gaia] change mcc/mnc type from integer to string
Bug 828307 – B2G RIL: Change to store MNC/MCC values from integer to string

By looking at these bugs, I found that there’s a preference to store the last MCC/MNC values, that we changed some things from integer to strings (which helps for keeping the leading 0), that if we can’t detect the MCC, MNC, we fall back to using GPS (which is terribly slow and you have to be outside waiting 10 mins.. ), we also try to figure out the name of the operator based on the MCC/MNC  (which After doing some testing, does not necessarily mean carrier!)

 

I also learned that the follow apps use the MCC/MNC:
Browser
Cost Control
Marketplace
Settings

 

Finally the devs have made various test cases to test these :

Mocking Mobile connection testing:
unit test:
 apps/system/test/unit/mobile_operator_test.js
marionette test:
 dom/network/tests/marionette/test_mobile_networks.js
xpcshell test:
 dom/system/gonk/tests/test_ril_worker_icc.js

There’s still a bug in question :

Bug 824772 – PrixTel MVNO has mcc == 0 and mnc == 0 when reading data network info.
And I’m not sure we’re suppose to get the network operator, or the SIM carrier from this.  From what I understand of the code, it seems to be getting the network operator, not necessarily the carrier.

 

ie so if you’re using a German SIM card, and once the marketplace gets implemented to show this… and you go to the US with the same telecom.. you will get the US market not the German one.  Is what I’m gathering.

Advertisements

About shizen008

Breaking things and getting in trouble for it since '74. Disclaimer: I am not responsible if I make your head explode reading this blog! The writings here are my own expression and not of any companies. I currently work on being a QA for B2G aka Firefox OS
Aside | This entry was posted in Uncategorized. Bookmark the permalink.

One Response to Been looking at the MCC/MNC api recently as

  1. shizen008 says:

    Turns out Movistar shows a different situation. It shows the appropriate value. I need to dig into things a bit more.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s