Sample code for LTE PCI Scan

uint16_t cellId = 0;
char mcc[LE_MRC_MCC_BYTES] = {0};
char mnc[LE_MRC_MNC_BYTES] = {0};
le_mrc_PciScanInformationListRef_t scanInfoListRef = NULL;
le_mrc_PciScanInformationRef_t scanInfoRef = NULL;
le_mrc_PlmnInformationRef_t plmnInfoRef = NULL;
 
// Request an LTE PCI scan
scanInfoListRef = le_mrc_PerformPciNetworkScan(LE_MRC_BITMASK_RAT_LTE);
LE_ASSERT(scanInfoListRef != NULL);
 
// Get reference to first cell info
scanInfoRef = le_mrc_GetFirstPciScanInfo(scanInfoListRef);
LE_ASSERT(scanInfoRef != NULL);
 
do
{
cellId = le_mrc_GetPciScanCellId(scanInfoRef);
 
// Get reference to the first PLMN info
plmnInfoRef = le_mrc_GetFirstPlmnInfo(scanInfoRef);
LE_ASSERT(plmnInfoRef != NULL);
 
do
{
if (LE_OK == le_mrc_GetPciScanMccMnc(plmnInfoRef,
mcc,
mnc,
{
LE_INFO("Cell ID: %"PRIu16", MCC: %s, MNC: %s",cellId, mcc, mnc);
}
 
plmnInfoRef = le_mrc_GetNextPlmnInfo(scanInfoRef);
 
}
while (plmnInfoRef);
 
scanInfoRef = le_mrc_GetNextPciScanInfo(scanInfoListRef);
 
}
while (scanInfoRef);
 
le_mrc_DeletePciNetworkScan(scanInfoListRef);