Question on Mobile Identification Number for GSM

Aleksander Morgado aleksander at aleksander.es
Fri Oct 31 06:09:47 PDT 2014


On Fri, Oct 31, 2014 at 8:57 AM, Aleksander Morgado
<aleksander at aleksander.es> wrote:
>> So for now, you can read the "Imsi" property of the Sim interface, and
>> then the OperatorIdentifier property of the Sim interface.  Strip the 5
>> or 6 digit OperatorIdentifier (which is the MCC/MNC of the issuing telco
>> eg "310260") off the front of the Imsi, and you've got the MSIN.
>
> Problem being that you may not know exactly how many digits to strip
> (5 or 6). I have a built-in database of MNC lengths developed for
> ModemManager somewhere in a branch, but it wasn't perfect (lots of
> issues in India IIRC). Still, that may be a
> not-perfect-but-still-useful approach? I believe that Ofono ended up
> doing the same. BTW; my need of this database of MNC lengths wasn't to
> get the MSIN, but to actually get the MCCMNC of the SIM card and
> expose it in the interface...


This is the branch I was referring about:
http://cgit.freedesktop.org/ModemManager/ModemManager?h=aleksander%2Fmnc-length

And this was the patch introducing the MNC length guess:
http://cgit.freedesktop.org/ModemManager/ModemManager/commit/?h=aleksander/mnc-length&id=3feb7c8d148c8ea03cb46b535a4eccd9fb7966fa

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list