[srslte-users] Wrong MCC and MNC encoding in nas.cc and log files.

Andre Puschmann andre.puschmann at softwareradiosystems.com
Mon Jul 3 19:39:12 UTC 2017


Hi David,

please note that the MCC/MNC printing in NAS does not print both values
in their decimal representation as one may expect. The values you see
there are the MCC/MNC in BCD, as those are the ones used over-the-air.
You can find appropriate converters in srslte/common/bcd_helpers.h.

Cheers
Andre


On 03.07.2017 16:53, David Rupprecht wrote:
> Hello,
> 
> While looking at the log, I was wondering about the encoding of MCC and
> MNC. It looks like the heading 0xF in the mcc and mnc encoding confused
> the %d. I know it is just a minor issue :).
> 
> // Generate authentication response using RAND, AUTN & KSI-ASME
> uint16 mcc, mnc;
> mcc = rrc->get_mcc();
> mnc = rrc->get_mnc();
> 
> nas_log->info("MCC=%d, MNC=%d\n", mcc, mnc);
> 
> Best Regards,
> David
> 



More information about the srslte-users mailing list