[PATCH 1/2] nas: add Get Operator Name and Operator Name indication

Dan Williams dcbw at redhat.com
Mon Feb 13 18:50:23 UTC 2017


On Sun, 2017-02-12 at 10:52 +0100, Aleksander Morgado wrote:
> Hey,
> 
> Some comments on the DB fields themselves below.
> 
> On Sat, Feb 11, 2017 at 4:17 AM, Dan Williams <dcbw at redhat.com>
> wrote:
> > ---
> >  data/qmi-common.json            | 96
> > ++++++++++++++++++++++++++++++++++++++++-
> >  data/qmi-service-nas.json       | 29 +++++++++++++
> >  src/libqmi-glib/qmi-enums-nas.h | 61 ++++++++++++++++++++++++++
> >  3 files changed, 185 insertions(+), 1 deletion(-)
> > 
> > diff --git a/data/qmi-common.json b/data/qmi-common.json
> > index d29f5a0..ca7d72d 100644
> > --- a/data/qmi-common.json
> > +++ b/data/qmi-common.json
> > @@ -409,5 +409,99 @@
> >                        { "name"          : "Guaranteed Uplink
> > Bitrate",
> >                          "format"        : "guint32" },
> >                        { "name"          : "Max Uplink Bitrate",
> > -                        "format"        : "guint32" } ] }
> > +                        "format"        : "guint32" } ] },
> > +
> > +    //
> > *******************************************************************
> > **************
> > +    // NAS common TLVs
> > +
> > +   { "common-ref"         : "NAS Service Provider Name",
> > +     "name"               : "Service Provider Name",
> > +     "id"                 : "0x10",
> > +     "mandatory"          : "no",
> > +     "type"               : "TLV",
> > +     "format"             : "sequence",
> > +     "contents"           : [ { "name"   : "Display Condition",
> > +                                "format" : "guint8" },
> 
> Any idea what this display condition is?

Looks like this TLV is really just EFspn in QMI TLV form.  So the
Display Condition is from ETSI TS 151 011 EFspn docs, which is a
bitfield:

b1=0: display of registered PLMN not required when
registered PLMN is either HPLMN or a PLMN in
the Service Provider PLMNN List (see EF SPDI ).
(I have 3 MVNO SIMs that return 0)

b1=1: display of registered PLMN required when
registered PLMN is either HPLMN or a PLMN in
the Service Provider PLMN List (see EF SPDI ).
(I have 1 MVNO SIM that returns 1)

b2=0: display of the service provider name is
required when registered PLMN is neither HPLMN
nor a PLMN in the service provider PLMN
list(see EF SPDI ).

b2=1: display of the service provider name is not
required when registered PLMN is neither HPLMN
nor a PLMN in the service provider PLMN
list(see EF SPDI ).

I suppose we could enum it for clarity?

Dan

> > +                              { "name"       : "Name",
> > +                                "format"     : "string" } ] },
> > +
> > +   { "common-ref"         : "NAS Operator PLMN List",
> > +     "name"               : "Operator PLMN List",
> > +     "id"                 : "0x11",
> > +     "mandatory"          : "no",
> > +     "type"               : "TLV",
> > +     "format"             : "array",
> > +     "size-prefix-format" : "guint16",
> > +     "array-element"      : { "name" : "Element",
> > +                              "format"   : "struct",
> > +                              "contents" : [ { "name"       :
> > "MCC",
> > +                                               "format"     :
> > "string",
> > +                                               "fixed-size" : "3"
> > },
> > +                                             { "name"       :
> > "MNC",
> > +                                               "format"     :
> > "string",
> > +                                               "fixed-size" : "3"
> > },
> > +                                             { "name"       :
> > "LAC1",
> > +                                               "format"     :
> > "guint16" },
> > +                                             { "name"       :
> > "LAC2",
> > +                                               "format"     :
> > "guint16" },
> > +                                             { "name"       :
> > "PLMN Name Record Identifier",
> > +                                               "format"     :
> > "guint8" } ] } },
> > +
> > +   { "common-ref"         : "NAS Operator PLMN Name",
> > +     "name"               : "Operator PLMN Name",
> > +     "id"                 : "0x12",
> > +     "mandatory"          : "no",
> > +     "type"               : "TLV",
> > +     "format"             : "array",
> > +     "array-element"      : { "name" : "Element",
> > +                              "format"   : "struct",
> > +                              "contents" : [ { "name"          :
> > "Short Encoding",
> > +                                               "format"        :
> > "guint8",
> > +                                               "public-format" :
> > "QmiNasPlmnEncodingScheme" },
> > +                                             { "name"          :
> > "Short Country Initials",
> > +                                               "format"        :
> > "guint8",
> > +                                               "public-format" :
> > "QmiNasPlmnNameCountryInitials" },
> > +                                             { "name"          :
> > "Long Bits",
> 
> "Long name spare bits"
> 
> > +                                               "format"        :
> > "guint8",
> > +                                               "public-format" :
> > "QmiNasPlmnNameSpareBits" },
> > +                                             { "name"          :
> > "Spare Bits",
> 
> "Short name spare bits"
> 
> > +                                               "format"        :
> > "guint8",
> > +                                               "public-format" :
> > "QmiNasPlmnNameSpareBits" },
> > +                                             { "name"          :
> > "Long Name",
> > +                                               "format"        :
> > "array",
> > +                                               "array-element" : {
> > "format" : "guint8" } },
> > +                                             { "name"          :
> > "Short Name",
> > +                                               "format"        :
> > "array",
> > +                                               "array-element" : {
> > "format" : "guint8" } } ] } },
> > +
> > +   { "common-ref"         : "NAS Operator String Name",
> > +     "name"               : "Operator String Name",
> > +     "id"                 : "0x13",
> > +     "mandatory"          : "no",
> > +     "type"               : "TLV",
> > +     "format"             : "string" },
> > +
> > +   { "common-ref"         : "NAS Operator NITZ Information",
> > +     "name"               : "Operator NITZ Information",
> > +     "id"                 : "0x14",
> > +     "mandatory"          : "no",
> > +     "type"               : "TLV",
> > +     "format"             : "sequence",
> > +     "contents"           : [ { "name"          : "Short
> > Encoding",
> > +                                "format"        : "guint8",
> > +                                "public-format" :
> > "QmiNasPlmnEncodingScheme" },
> > +                              { "name"          : "Short Country
> > Initials",
> > +                                "format"        : "guint8",
> > +                                "public-format" :
> > "QmiNasPlmnNameCountryInitials" },
> > +                              { "name"          : "Long Bits",
> 
> "long name spare bits"
> 
> > +                                "format"        : "guint8",
> > +                                "public-format" :
> > "QmiNasPlmnNameSpareBits" },
> > +                              { "name"          : "Spare Bits",
> 
> "short name spare bits"
> 
> > +                                "format"        : "guint8",
> > +                                "public-format" :
> > "QmiNasPlmnNameSpareBits" },
> > +                              { "name"          : "Long Name",
> > +                                "format"        : "string" },
> > +                              { "name"          : "Short Name",
> > +                                "format"        : "string" } ] }
> > +
> >  ]
> > diff --git a/data/qmi-service-nas.json b/data/qmi-service-nas.json
> > index c4259ec..4dcdead 100644
> > --- a/data/qmi-service-nas.json
> > +++ b/data/qmi-service-nas.json
> > @@ -1493,6 +1493,35 @@
> >                                          "public-format" :
> > "gboolean" } ] } ] },
> > 
> >    //
> > *******************************************************************
> > **************
> > +  {  "name"    : "Get Operator Name",
> > +     "type"    : "Message",
> > +     "service" : "NAS",
> > +     "id"      : "0x0039",
> > +     "version" : "1.0",
> > +     "output"  : [  { "common-ref" : "Operation Result" },
> > +                    { "common-ref"    : "NAS Service Provider
> > Name",
> > +                      "prerequisites" : [ { "common-ref" :
> > "Success" } ] },
> > +                    { "common-ref"    : "NAS Operator PLMN List",
> > +                      "prerequisites" : [ { "common-ref" :
> > "Success" } ] },
> > +                    { "common-ref"    : "NAS Operator PLMN Name",
> > +                      "prerequisites" : [ { "common-ref" :
> > "Success" } ] },
> > +                    { "common-ref"    : "NAS Operator String
> > Name",
> > +                      "prerequisites" : [ { "common-ref" :
> > "Success" } ] },
> > +                    { "common-ref"    : "NAS Operator NITZ
> > Information",
> > +                      "prerequisites" : [ { "common-ref" :
> > "Success" } ] } ] },
> > +
> > +  {  "name"    : "Operator Name",
> > +     "type"    : "Indication",
> > +     "service" : "NAS",
> > +     "id"      : "0x0040",
> 
> 0x003A ! :9
> 
> > +     "version" : "1.0",
> > +     "output"  : [  { "common-ref"    : "NAS Service Provider
> > Name" },
> > +                    { "common-ref"    : "NAS Operator PLMN List"
> > },
> > +                    { "common-ref"    : "NAS Operator PLMN Name"
> > },
> > +                    { "common-ref"    : "NAS Operator String Name"
> > },
> > +                    { "common-ref"    : "NAS Operator NITZ
> > Information" } ] },
> > +
> > +  //
> > *******************************************************************
> > **************
> >    {  "name"    : "Get Cell Location Info",
> >       "type"    : "Message",
> >       "service" : "NAS",
> > diff --git a/src/libqmi-glib/qmi-enums-nas.h b/src/libqmi-glib/qmi-
> > enums-nas.h
> > index 34212da..07a480a 100644
> > --- a/src/libqmi-glib/qmi-enums-nas.h
> > +++ b/src/libqmi-glib/qmi-enums-nas.h
> > @@ -1250,4 +1250,65 @@ typedef enum {
> >   * Since: 1.16
> >   */
> > 
> > +/*****************************************************************
> > ************/
> > +/* Helper enums for the 'QMI NAS Get Operator Name'
> > request/response */
> > +/**
> > + * QmiNasPlmnEncodingScheme:
> > + * @QMI_NAS_PLMN_ENCODING_SCHEME_GSM: GSM default alphabet packed
> > encoding (ETSI GSM 03.38)
> > + * @QMI_NAS_PLMN_ENCODING_SCHEME_UCS2LE: UCS-2 little-endian
> > + *
> > + * PLMN name encoding schemes.  See 3GPP TS 24.008 section
> > "Network Name
> > + * information element".
> > + *
> > + * Since: 1.17
> > + */
> > +typedef enum {
> > +    QMI_NAS_PLMN_ENCODING_SCHEME_GSM    = 0,
> > +    QMI_NAS_PLMN_ENCODING_SCHEME_UCS2LE = 1,
> > +} QmiNasPlmnEncodingScheme;
> > +
> > +/**
> > + * QmiNasPlmnNameCountryInitials:
> > + * @QMI_NAS_PLMN_NAME_COUNTRY_INITIALS_DO_NOT_ADD: don't add
> > country initials
> > + * @QMI_NAS_PLMN_NAME_COUNTRY_INIITALS_ADD: add country initials
> > + * @QMI_NAS_PLMN_NAME_COUNTRY_INIITALS_UNSPECIFIED: unspecified
> > + *
> > + * PLMN name country initials options. See 3GPP TS 24.008
> > + * section "Network Name information element".
> > + *
> > + * Since: 1.17
> > + */
> > +typedef enum {
> > +    QMI_NAS_PLMN_NAME_COUNTRY_INITIALS_DO_NOT_ADD  = 0,
> > +    QMI_NAS_PLMN_NAME_COUNTRY_INIITALS_ADD         = 1,
> > +    QMI_NAS_PLMN_NAME_COUNTRY_INIITALS_UNSPECIFIED = 0xFF,
> > +} QmiNasPlmnNameCountryInitials;
> > +
> > +/**
> > + * QmiNasPlmnNameSpareBits:
> > + * @QMI_NAS_PLMN_NAME_SPARE_BITS_UNKNOWN: unknown
> > + * @QMI_NAS_PLMN_NAME_SPARE_BITS_BIT_8: bit 8 is spare
> > + * @QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_78: bits 7 - 8 are spare
> > + * @QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_68: bits 6 - 8 are spare
> > + * @QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_58: bits 5 - 8 are spare
> > + * @QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_48: bits 4 - 8 are spare
> > + * @QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_38: bits 3 - 8 are spare
> > + * @QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_28: bits 2 - 8 are spare
> > + *
> > + * PLMN name spare bits in last octet of a network name.  See 3GPP
> > TS 24.008
> > + * section "Network Name information element".
> > + *
> > + * Since: 1.17
> > + */
> > +typedef enum {
> > +    QMI_NAS_PLMN_NAME_SPARE_BITS_UNKNOWN = 0,
> > +    QMI_NAS_PLMN_NAME_SPARE_BITS_BIT_8   = 1,
> > +    QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_78 = 2,
> > +    QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_68 = 3,
> > +    QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_58 = 4,
> > +    QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_48 = 5,
> > +    QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_38 = 6,
> > +    QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_28 = 7,
> > +} QmiNasPlmnNameSpareBits;
> > +
> >  #endif /* _LIBQMI_GLIB_QMI_ENUMS_NAS_H_ */
> > --
> > 2.9.3
> > _______________________________________________
> > libqmi-devel mailing list
> > libqmi-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/libqmi-devel
> 
> 
> 


More information about the libqmi-devel mailing list