Question on Mobile Identification Number for GSM

Aleksander Morgado aleksander at aleksander.es
Fri Oct 31 00:57:29 PDT 2014


On Thu, Oct 30, 2014 at 9:16 PM, Dan Williams <dcbw at redhat.com> wrote:
> On Thu, 2014-10-30 at 15:02 +0000, Highland, Glenn wrote:
>> Hello:
>>
>> Is there a way to query ModemManager 1.4.0 specifically for the Mobile Identification Number (MIN), or do I need to
>> get the IMSI from the Sim interface and just pull-off the last 10 bytes/digits?
>
> Let's actually call this the MSIN, since MIN is a specific CDMA/IS-95
> term that actually doesn't apply to 3GPP/GSM.  (MINs can be treated like
> MSINs, but not all MSINs are MINs.)
>
> You're right, at the moment there is no way to just get the MSIN as a
> single property.  We could add this as a feature request though.
> (There's also no function get the CDMA MIN either, but it looks like we
> have QCDM and QMI methods to do that if we get around to exposing it.)
>
>> The reason I ask is (according to Wikipedia), some MIN/MSINs could be 9 digits rather than 10, even though almost
>> every place I've searched the MIN/MSIN is described as being 10 bytes long.
>
> The reason it says they are either 9 or 10 digits long is because they
> are stored as part of the IMSI of the SIM card.  The IMSI has a maximum
> of 15 numbers and is composed of the MCC, MNC, and MSIN.  The MCC is
> always 3 digits, and the MNC is either 2 or 3 digits.  The remaining
> digits are the MSIN, which is where you get the 9 or 10 digit length
> from.  If the MNC is 2 digits, then the MSIN will be 10 digits.
>
> 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...

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list