Querying operator name

Dan Williams dcbw at redhat.com
Thu Sep 8 15:09:26 UTC 2022


On Fri, 2022-09-09 at 02:02 +1200, Tom Isaacson wrote:
> Thanks. Is there a recommended source to lookup the MCCMNC codes?
> Something like https://github.com/musalbas/mcc-mnc-table
> 
> I keep running into this problem with libqmi - the commands are
> documented but not the responses. Has anyone considered turning on
> the Wiki tab in Github https://github.com/freedesktop/libqmi so we
> can use it for documentation? Would be good to have examples of data
> returned, explanation of fields, etc.

There's also https://github.com/GNOME/mobile-broadband-provider-info
but since all of these are likely submission driven they may be
incomplete.

For example, neither have Bug Tussel (311-33) which is small roaming
provider in southern Wisconsin USA, but:

https://docs.routee.net/docs/list-of-mccmnc-codes

does. Point being, nothing will be complete, but most should be valid
for larger carriers.

Dan

> 
> Tom Isaacson
> 
> 
> On Thu, Sep 8, 2022 at 9:52 PM Aleksander Morgado
> <aleksandermj at chromium.org> wrote:
> > Hey Tom,
> > 
> > On Tue, Sep 6, 2022 at 6:42 PM Tom Isaacson
> > <tom.isaacson at teknique.com> wrote:
> > > 
> > > When I query different SIM cards with:
> > > qmicli --device=/dev/cdc-wdm0 --device-open-qmi --nas-get-
> > > operator-name
> > > 
> > > I get different responses. My first SIM returned:
> > > Service Provider Name
> > >      Display Condition: '(null)'
> > >      Name             : 'Skinny'
> > > 
> > > But in the US that was missing, so I switched to:
> > > NITZ information:
> > >      Long Name:  'AT&T'
> > >      Short Name: 'AT&T'
> > >      Country:    'initials-do-not-add'
> > > 
> > > which was also included in the first SIM. But now I'm trying a UK
> > > SIM and I get:
> > > PLMN List:
> > >      MCC/MNC: '234-15'  LAC Range: 0->65279 PNN Record: 1
> > > 
> > > which I assume refers to http://mcc-mnc.com/. Do I have to
> > > include a copy of this list on my device to lookup the operator
> > > name? Are there any other formats that can get returned by this
> > > command?
> > > 
> > 
> > If you want the operator name of your SIM card, you can use
> > --nas-get-home-network. If that reports that it's unprovisioned,
> > you
> > can always try to parse the first 5-6 digits of the IMSI and match
> > them to the MCCMNC of your expected operators.
> > 
> > If you want the operator name of your network provider, you can use
> > --nas-get-operator-name, or otherwise use --nas-get-system-info to
> > retrieve the MCCMNC, and then use --nas-get-plmn-name=[mccmnc]
> > 
> > -- 
> > Aleksander
> 
> 



More information about the libqmi-devel mailing list