All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: MNC/MCC as string?
Date: Wed, 10 Jun 2009 11:15:19 -0500	[thread overview]
Message-ID: <200906101115.20159.denkenz@gmail.com> (raw)
In-Reply-To: <5338cd9d9e632d7614da20e4277889b6@localhost>

[-- Attachment #1: Type: text/plain, Size: 1894 bytes --]

Aki,

On Wednesday 10 June 2009 06:26:07 Aki Niemi wrote:
> Hi,
>
> Currently, the MNC and MCC values are of type short, which is a little
> problematic.
>
> The MNC code can either be 2 or 3 digits, and it would be quite natural to
> assume the logic is that 3 digits are used for codes > 99. However, this is
> not correct -- it depends on the MCC. It seems mostly American operators
> have 3 digit MNCs, whereas most of the rest of the world 2 digit MNCs. The
> implication is that 01 and 001 are not considered identical.

It doesn't seem this clear-cut.  E.g. according to my Neo on with T-Mobile US 
SIM:

AT+COPS?
+COPS: 0,0,"T-Mobile"
OK
AT+COPS=3,2
OK
AT+COPS?
+COPS: 0,2,"31026"
OK
AT+COPS=2
OK
+CREG: 0
AT+COPS=1,2,"31026"
OK
+CREG: 2
+CREG: 1,"99EC","1A11"

At least according to wikipedia the real MCC/MNC of T-Mobile is 310260.  Go 
figure.

>
> Nokia modems both send and receive MNC/MCC pairs as Binary Coded Decimal
> (BCD) strings. Any 2 digit MNC is padded with 0xF. Problem is, when listing
> operators, the conversion of MNC codes from BCD to short loses this
> information, and will result in manual network selection failing (BCD '001'
> -> short '1' -> BCD '01F' != BCD '001').
>
> Anyone opposed to changing the mnc and mcc code types from short to string?
>

I agree that this does seem to be an issue, so no problems in changing this.  
Do you consider this an implementation issue only (e.g. APIs do not change) or 
do you want to change the NetworkOperator attributes to a string as well?  If 
this is an implementation issue we can always adopt the Nokia convention of 
padding the MNC by 0xF on the right and leave them as a 'short'.

>
> Cheers,
> Aki
> _______________________________________________
> ofono mailing list
> ofono(a)ofono.org
> http://lists.ofono.org/listinfo/ofono

Regards,
-Denis

  reply	other threads:[~2009-06-10 16:15 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-10 11:26 MNC/MCC as string? Aki Niemi
2009-06-10 16:15 ` Denis Kenzior [this message]
2009-06-10 16:42   ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2009-06-10 17:41     ` Denis Kenzior
2009-06-11 11:46       ` Marcel Holtmann
2009-06-11 14:04         ` Jan Luebbe
2009-06-11 15:09           ` Marcel Holtmann
2009-06-11 14:32         ` Denis Kenzior
2009-06-11 15:12           ` Marcel Holtmann
2009-06-11 18:00           ` Aki Niemi
2009-06-11 18:10             ` Marcel Holtmann
2009-06-11 19:02               ` Aki Niemi
2009-06-11 19:18                 ` Marcel Holtmann
2009-06-11 19:38                   ` Aki Niemi
2009-06-11 20:08                     ` Denis Kenzior
2009-06-12 10:01                       ` Aki Niemi
2009-06-12 10:12                         ` Marcel Holtmann
2009-06-12 10:53                           ` Aki Niemi
2009-06-13  1:01                             ` Denis Kenzior
2009-06-12 10:56                           ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2009-06-11 19:58                   ` =?unknown-8bit?q?R=C3=A9mi?= Denis-Courmont
2009-06-11 20:33                     ` Marcel Holtmann
2009-06-11 20:35                 ` Marcel Holtmann
2009-06-11 18:24             ` Denis Kenzior
2009-06-11 18:10         ` Aki Niemi
2009-06-11  6:16   ` Aki Niemi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200906101115.20159.denkenz@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.