[FSO] DBus, MCC and MNC

Ronan Daniellou rdaniellou at laposte.net
Tue Nov 25 17:58:16 CET 2008


Hi all,

I am working on a logger using GSM and GPS. I need the MCC[1] and
MNC[2]. AFAIK the only place where to get these data is in the result of
(description taken from the freesmartphone.org page):
org.freesmartphone.GSM.Network
ListProviders ( ) -> a(isss)
An array of four-tuples with the following structure:
    * Unique numerical operator code,
    * Status ("unknown", "available", "current", "forbidden"),
[snip]

The numerical operator code is in fact the concatenation of the two MCC
and MNC.

When I get a signal about GSM registration changing, I see if I am
'home' or roaming. So once I know the values for 'home', I don't need to
check again MCC and MNC. But when I am roaming, these values could any
time change. My problem is that using ListProviders needs at least 20
seconds (it returns 3 networks in my case). Which is too long for me in 
my logger loop.

Thus I was wondering if there is another place where is located the
current MCC and MNC?

Another point is when I receive a signal about GSM registration change,
I get the lac and cell id. Nevertheless if I call ListProviders
afterwards, how can I be sure that it is all consistent? Isn't it
possible that between this signal and the value returned by
ListProviders, MCC and MNC  have changed?

Thanks,

Ronan

[1] http://en.wikipedia.org/wiki/Mobile_country_code
[2] http://en.wikipedia.org/wiki/Mobile_Network_Code




More information about the devel mailing list