Possible bug in "gsm48_decode_lai" code

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/baseband-devel@lists.osmocom.org/.

Sylvain Munaut 246tnt at gmail.com
Thu Dec 6 20:14:15 UTC 2012


> i don't like having two functions with different results too. the problem is
> that osmocom-bb uses hex lai everywhere, and openbsc uses decimal lai.
> changing osmocom-bb would result in loosing support for 3-digits-MNC. (02 is
> not 002 and neither 02x) harald mentioned to maybe change lai at openbsc in
> the future, so 3-digits-MNC are correctly supported there too. then i would
> suggest to use hex MCC also. also it would make sense to move the "input"
> and "print" functions for hex type MCC/MNC to libosmocore too.

Ok thanks for the explanation, that makes it clear why and this
certainly indicates that the hex version are the "right" way.

Then I'd suggest to put both encode_hex decode_hex version in
libosmocore and put a note deprecating use of the decimal version
since they can't be used to support all mnc/mcc combination like they
should. This way we avoid writing new software against functions that
have these limitations.

Sounds good to everyone ? If no objections, I'll do that.

Cheers,

    Sylvain




More information about the baseband-devel mailing list