Leading zero(s) missing from MCC/MNC output

Aleksander Morgado aleksander at aleksander.es
Wed Feb 12 11:37:44 UTC 2020


> I'm noticing a (minor) issue in MM 1.12.4 release. The operator code is "53005" but leading "0" is missing in MNC field when displayed using -location-get command as below. I've noticed that if there are one or more leading zeros then both MCC and MNC do not report it. I've a test APN with MCC "001" and MNC "01" and what is see is "1" and "1" for both MCC and MNC respectively. I think leading zero(s) should not be removed. Please advise.
> 
> root at AprisaLTE:~# mmcli -m 0 --location-get -K
> modem.location.3gpp.mcc          : 530
> modem.location.3gpp.mnc          : 5
> 

In the location interface, both MCC and MNC are reported as numeric values, and that's why there is no leading zeros or anything. For location purposes, the numeric values of MCC and MNC are preferred. Same for LAC/TAC/CID, which are also given as numeric values (in hex).

In the remaining interfaces, the MCC+MNC pair is always given "together" as a string, including any leading zeros they may have.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list