MNC/MCC as string?
Rémi Denis-Courmont
remi at remlab.net
Wed Jun 10 09:42:02 PDT 2009
Le mercredi 10 juin 2009 19:15:19 Denis Kenzior, vous avez écrit :
> > 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'.
Well, the point is that leading zeroes are meaningful (much like with phone
numbers in fact). The API, not just the implementation, must distinguish
network "xy" from network "0xy", so that manual selection remains unambiguous.
A D-Bus string is probably nicer to use than an integer using ISI's BCD
scheme.
--
Rémi Denis-Courmont
Nokia Devices R&D
More information about the ofono
mailing list