PLMN identity: 04.08 vs. RANAP

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Daniel Willmann dwillmann at sysmocom.de
Wed Apr 6 15:18:54 UTC 2016


Hi,

On Wed, 2016-04-06 at 14:20 +0200, Neels Hofmeyr wrote:
> Hi list,
> 
> I've noted a subtle difference in specifications for BCD-coding MCC and MNC.
> 
> I'll illustrate by encoding the two sets
>   MCC 123, MNC 45
> and
>   MCC 123, MNC 456
> 
> In Figure 10.5.3/3GPP TS 04.08, we have both the third digits in the second
> byte, i.e. above are encoded as:
>   21 f3 54
> and
>   21 63 54
> respectively

> In 3GPP TS 25.413 in 9.2.3.55 PLMN Identity, I see a very similar definition
> for BCD coding, but it omits the detail to put the last MNC digit into the
> second byte. So, by omittance, it defines a different coding from 04.08:
>   21 f3 54 (same)
> but
>   21 43 65
> respectively.

This is what the hnb does. A PLMNID of 901123 results in
09 11 32 being transmitted in HNBAP.
PLMNID of 90123 corresponds to 09 f1 32

The RANAP fields for LAI and SAI are encoded the same.

> This strikes me as pretty odd, and I wonder whether the spec author overlooked
> this detail. The definition in the RANAP spec is also squeezed into the
> rightmost column of the IE description table, so it looks like a "quick hack".

Yet another fun quirk...

> I would like to replace the ranap_parse_lai() implementation with
> gsm48_mcc_mnc_from_bcd() to have less code duplication, and hence I hit this
> weird difference.
> 
> Does anyone have an idea how I should handle this?

Since the coding differs I wouldn't try to merge the implementations.
I'd think that it would obscure more than it helps.


Regards
Daniel

-- 
- Daniel Willmann <dwillmann at sysmocom.de>       http://www.sysmocom.de/
=======================================================================
* sysmocom - systems for mobile communications GmbH
* Alt-Moabit 93
* 10559 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B
* Geschaeftsfuehrer / Managing Directors: Holger Freyther, Harald Welte




More information about the OpenBSC mailing list