Sample code for LTE PCI Scan

uint16_t physicalCellId = 0;
uint32_t globalCellId = 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
{
physicalCellId = le_mrc_GetPciScanCellId(scanInfoRef);
globalCellId = le_mrc_GetPciScanGlobalCellId(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: physical %"PRIu16" global %"PRIu32", MCC: %s, MNC: %s",
physicalCellId, globalCellId, mcc, mnc);
}
 
plmnInfoRef = le_mrc_GetNextPlmnInfo(scanInfoRef);
 
}
while (plmnInfoRef);
 
scanInfoRef = le_mrc_GetNextPciScanInfo(scanInfoListRef);
 
}
while (scanInfoRef);
 
le_mrc_DeletePciNetworkScan(scanInfoListRef);