le_mrc_interface.h
Go to the documentation of this file.
21 * It allows you to limit some M2M services based on the reliability of the network environment, and122 * le_mrc_GetLteBandCapabilities() let you get the LTE band capabilities by retrieving a bit mask134 * The application can register a handler function to retrieve the Radio Access Technology each time158 * The application can register a handler function to retrieve the registration status each time the173 * When the network registration fails, the platform specific network registration error code can184 * You must call le_mrc_MeasureSignalMetrics() to measure the signal metrics of the serving cell (aka187 * When the signal metrics are no longer needed, you must call le_mrc_DeleteSignalMetrics() to free192 * le_mrc_GetGsmSignalMetrics() the signal strength in dBm and the bit error rate measured on GSM205 * The RAT, the lower-range and the upper-range thresholds must be passed as input parameters. These206 * parameters are updated each time the function is called, the previous thresholds are replaced by224 * le_mrc_GetServingCellLteTracAreaCode() retrieves the the Tracking Area Code of the serving cell279 * - le_mrc_GetNeighborCellLocAreaCode() gets the location area code of the cell specified with the282 * - le_mrc_GetNeighborCellRxLevel() gets the signal strength (in dBm) of the cell specified with286 * - le_mrc_GetNeighborCellUmtsEcIo() gets the Ec/Io (the received energy per chip divided by the287 * power density in the band measured in dBm on the primary CPICH channel of serving cell) of the289 * - le_mrc_GetNeighborCellLteIntraFreq() gets the RSRP and RSRQ of the Interfrequency of the cell291 * - le_mrc_GetNeighborCellLteInterFreq() gets the RSRP and RSRQ of the Interfrequency of the cell310 * @snippet "apps/test/modemServices/mrc/mrcIntegrationTest/mrcTest/le_mrcTest.c" Band Preferences317 * @snippet "apps/test/modemServices/mrc/mrcIntegrationTest/mrcTest/le_mrcTest.c" RAT Preferences335 * @snippet "apps/test/modemServices/mrc/mrcIntegrationTest/mrcTest/le_mrcTest.c" Loc information341 * @snippet "apps/test/modemServices/mrc/mrcIntegrationTest/mrcTest/le_mrcTest.c" Band Capabilities376 //--------------------------------------------------------------------------------------------------379 * Connect the current client thread to the service providing this API. Block until the service is382 * For each thread that wants to use this API, either ConnectService or TryConnectService must be383 * called before any other functions in this API. Normally, ConnectService is automatically called388 //--------------------------------------------------------------------------------------------------394 //--------------------------------------------------------------------------------------------------397 * Try to connect the current client thread to the service providing this API. Return with an error400 * For each thread that wants to use this API, either ConnectService or TryConnectService must be401 * called before any other functions in this API. Normally, ConnectService is automatically called408 * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is bound.409 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).412 //--------------------------------------------------------------------------------------------------418 //--------------------------------------------------------------------------------------------------424 * longer a connection to the service, and the functions in this API can't be used. For details, see429 //--------------------------------------------------------------------------------------------------436 //--------------------------------------------------------------------------------------------------440 //--------------------------------------------------------------------------------------------------444 //--------------------------------------------------------------------------------------------------449 //--------------------------------------------------------------------------------------------------453 //--------------------------------------------------------------------------------------------------457 //--------------------------------------------------------------------------------------------------461 //--------------------------------------------------------------------------------------------------466 //--------------------------------------------------------------------------------------------------470 //--------------------------------------------------------------------------------------------------474 //--------------------------------------------------------------------------------------------------519 //--------------------------------------------------------------------------------------------------524 //--------------------------------------------------------------------------------------------------563 //--------------------------------------------------------------------------------------------------568 //--------------------------------------------------------------------------------------------------581 //--------------------------------------------------------------------------------------------------586 //--------------------------------------------------------------------------------------------------590 //--------------------------------------------------------------------------------------------------594 //--------------------------------------------------------------------------------------------------598 //--------------------------------------------------------------------------------------------------602 //--------------------------------------------------------------------------------------------------606 //--------------------------------------------------------------------------------------------------610 //--------------------------------------------------------------------------------------------------614 //--------------------------------------------------------------------------------------------------618 //--------------------------------------------------------------------------------------------------622 //--------------------------------------------------------------------------------------------------626 //--------------------------------------------------------------------------------------------------630 //--------------------------------------------------------------------------------------------------634 //--------------------------------------------------------------------------------------------------638 //--------------------------------------------------------------------------------------------------642 //--------------------------------------------------------------------------------------------------646 //--------------------------------------------------------------------------------------------------650 //--------------------------------------------------------------------------------------------------674 //--------------------------------------------------------------------------------------------------678 //--------------------------------------------------------------------------------------------------699 //--------------------------------------------------------------------------------------------------703 //--------------------------------------------------------------------------------------------------726 //--------------------------------------------------------------------------------------------------730 //--------------------------------------------------------------------------------------------------734 //--------------------------------------------------------------------------------------------------738 //--------------------------------------------------------------------------------------------------742 //--------------------------------------------------------------------------------------------------746 //--------------------------------------------------------------------------------------------------750 //--------------------------------------------------------------------------------------------------759 //--------------------------------------------------------------------------------------------------761 (767 //--------------------------------------------------------------------------------------------------776 //--------------------------------------------------------------------------------------------------778 (784 //--------------------------------------------------------------------------------------------------793 //--------------------------------------------------------------------------------------------------795 (801 //--------------------------------------------------------------------------------------------------812 //--------------------------------------------------------------------------------------------------814 (820 //--------------------------------------------------------------------------------------------------829 //--------------------------------------------------------------------------------------------------831 (836 //--------------------------------------------------------------------------------------------------844 //--------------------------------------------------------------------------------------------------854 //--------------------------------------------------------------------------------------------------858 //--------------------------------------------------------------------------------------------------865 //--------------------------------------------------------------------------------------------------873 //--------------------------------------------------------------------------------------------------883 //--------------------------------------------------------------------------------------------------887 //--------------------------------------------------------------------------------------------------894 //--------------------------------------------------------------------------------------------------902 //--------------------------------------------------------------------------------------------------921 //--------------------------------------------------------------------------------------------------925 //--------------------------------------------------------------------------------------------------932 //--------------------------------------------------------------------------------------------------942 //--------------------------------------------------------------------------------------------------948 //--------------------------------------------------------------------------------------------------961 //--------------------------------------------------------------------------------------------------971 //--------------------------------------------------------------------------------------------------982 //--------------------------------------------------------------------------------------------------998 //--------------------------------------------------------------------------------------------------1008 //--------------------------------------------------------------------------------------------------1027 //--------------------------------------------------------------------------------------------------1034 //--------------------------------------------------------------------------------------------------1040 //--------------------------------------------------------------------------------------------------1050 //--------------------------------------------------------------------------------------------------1057 //--------------------------------------------------------------------------------------------------1067 //--------------------------------------------------------------------------------------------------1074 //--------------------------------------------------------------------------------------------------1084 //--------------------------------------------------------------------------------------------------1091 //--------------------------------------------------------------------------------------------------1101 //--------------------------------------------------------------------------------------------------1108 //--------------------------------------------------------------------------------------------------1118 //--------------------------------------------------------------------------------------------------1125 //--------------------------------------------------------------------------------------------------1135 //--------------------------------------------------------------------------------------------------1142 //--------------------------------------------------------------------------------------------------1152 //--------------------------------------------------------------------------------------------------1159 //--------------------------------------------------------------------------------------------------1169 //--------------------------------------------------------------------------------------------------1176 //--------------------------------------------------------------------------------------------------1191 //--------------------------------------------------------------------------------------------------1204 //--------------------------------------------------------------------------------------------------1219 //--------------------------------------------------------------------------------------------------1229 //--------------------------------------------------------------------------------------------------1239 //--------------------------------------------------------------------------------------------------1245 //--------------------------------------------------------------------------------------------------1259 //--------------------------------------------------------------------------------------------------1266 //--------------------------------------------------------------------------------------------------1280 //--------------------------------------------------------------------------------------------------1287 //--------------------------------------------------------------------------------------------------1297 //--------------------------------------------------------------------------------------------------1304 //--------------------------------------------------------------------------------------------------1315 //--------------------------------------------------------------------------------------------------1337 //--------------------------------------------------------------------------------------------------1350 //--------------------------------------------------------------------------------------------------1357 //--------------------------------------------------------------------------------------------------1370 //--------------------------------------------------------------------------------------------------1378 //--------------------------------------------------------------------------------------------------1388 //--------------------------------------------------------------------------------------------------1395 //--------------------------------------------------------------------------------------------------1408 //--------------------------------------------------------------------------------------------------1415 //--------------------------------------------------------------------------------------------------1423 //--------------------------------------------------------------------------------------------------1430 //--------------------------------------------------------------------------------------------------1432 * This function must be called to perform a cellular network scan asynchronously. This function1438 //--------------------------------------------------------------------------------------------------1451 //--------------------------------------------------------------------------------------------------1453 * This function must be called to get the first Scan Information object reference in the list of1464 //--------------------------------------------------------------------------------------------------1471 //--------------------------------------------------------------------------------------------------1473 * This function must be called to get the next Scan Information object reference in the list of1484 //--------------------------------------------------------------------------------------------------1491 //--------------------------------------------------------------------------------------------------1502 //--------------------------------------------------------------------------------------------------1509 //--------------------------------------------------------------------------------------------------1523 //--------------------------------------------------------------------------------------------------1542 //--------------------------------------------------------------------------------------------------1556 //--------------------------------------------------------------------------------------------------1569 //--------------------------------------------------------------------------------------------------1579 //--------------------------------------------------------------------------------------------------1586 //--------------------------------------------------------------------------------------------------1598 //--------------------------------------------------------------------------------------------------1605 //--------------------------------------------------------------------------------------------------1617 //--------------------------------------------------------------------------------------------------1624 //--------------------------------------------------------------------------------------------------1636 //--------------------------------------------------------------------------------------------------1643 //--------------------------------------------------------------------------------------------------1655 //--------------------------------------------------------------------------------------------------1662 //--------------------------------------------------------------------------------------------------1677 //--------------------------------------------------------------------------------------------------1687 //--------------------------------------------------------------------------------------------------1697 //--------------------------------------------------------------------------------------------------1713 //--------------------------------------------------------------------------------------------------1726 //--------------------------------------------------------------------------------------------------1733 //--------------------------------------------------------------------------------------------------1743 //--------------------------------------------------------------------------------------------------1749 //--------------------------------------------------------------------------------------------------1758 //--------------------------------------------------------------------------------------------------1765 //--------------------------------------------------------------------------------------------------1778 //--------------------------------------------------------------------------------------------------1785 //--------------------------------------------------------------------------------------------------1798 //--------------------------------------------------------------------------------------------------1805 //--------------------------------------------------------------------------------------------------1816 //--------------------------------------------------------------------------------------------------1823 //--------------------------------------------------------------------------------------------------1827 * @return The Location Area Code of a cell. 0xFFFF value is returned if the value is not available.1834 //--------------------------------------------------------------------------------------------------1841 //--------------------------------------------------------------------------------------------------1852 //--------------------------------------------------------------------------------------------------1859 //--------------------------------------------------------------------------------------------------1870 //--------------------------------------------------------------------------------------------------1877 //--------------------------------------------------------------------------------------------------1879 * This function must be called to get the Ec/Io; the received energy per chip divided by the power1891 //--------------------------------------------------------------------------------------------------1898 //--------------------------------------------------------------------------------------------------1911 //--------------------------------------------------------------------------------------------------1926 //--------------------------------------------------------------------------------------------------1939 //--------------------------------------------------------------------------------------------------1954 //--------------------------------------------------------------------------------------------------1956 * This function must be called to measure the signal metrics. It creates and returns a reference1964 //--------------------------------------------------------------------------------------------------1970 //--------------------------------------------------------------------------------------------------1979 //--------------------------------------------------------------------------------------------------1986 //--------------------------------------------------------------------------------------------------1997 //--------------------------------------------------------------------------------------------------2004 //--------------------------------------------------------------------------------------------------2006 * This function returns the signal strength in dBm and the bit error rate measured on GSM network.2017 //--------------------------------------------------------------------------------------------------2030 //--------------------------------------------------------------------------------------------------2043 //--------------------------------------------------------------------------------------------------2065 //--------------------------------------------------------------------------------------------------2079 //--------------------------------------------------------------------------------------------------2101 //--------------------------------------------------------------------------------------------------2115 //--------------------------------------------------------------------------------------------------2137 //--------------------------------------------------------------------------------------------------2145 //--------------------------------------------------------------------------------------------------2151 //--------------------------------------------------------------------------------------------------2159 //--------------------------------------------------------------------------------------------------2165 //--------------------------------------------------------------------------------------------------2173 //--------------------------------------------------------------------------------------------------2179 //--------------------------------------------------------------------------------------------------2189 //--------------------------------------------------------------------------------------------------2196 //--------------------------------------------------------------------------------------------------2206 //--------------------------------------------------------------------------------------------------2213 //--------------------------------------------------------------------------------------------------2223 //--------------------------------------------------------------------------------------------------le_result_t le_mrc_GetLteBandCapabilities(le_mrc_LteBandBitMask_t *bandMaskPtrPtr)uint32_t le_mrc_GetNeighborCellId(le_mrc_CellInfoRef_t ngbrCellInfoRef)le_result_t le_mrc_GetGsmSignalMetrics(le_mrc_MetricsRef_t MetricsRef, int32_t *rssiPtr, uint32_t *berPtr)le_result_t le_mrc_GetSignalQual(uint32_t *qualityPtr)uint16_t le_mrc_GetServingCellLteTracAreaCode(void)void le_mrc_DeleteNeighborCellsInfo(le_mrc_NeighborCellsRef_t ngbrCellsRef)le_mrc_CellInfoRef_t le_mrc_GetNextNeighborCellInfo(le_mrc_NeighborCellsRef_t ngbrCellsRef)le_result_t le_mrc_GetNetRegState(le_mrc_NetRegState_t *statePtr)le_mrc_RatChangeHandlerRef_t le_mrc_AddRatChangeHandler(le_mrc_RatChangeHandlerFunc_t handlerPtr, void *contextPtr)le_result_t le_mrc_SetAutomaticRegisterMode(void)struct le_mrc_PreferredOperatorList * le_mrc_PreferredOperatorListRef_tDefinition: le_mrc_interface.h:619struct le_mrc_PreferredOperator * le_mrc_PreferredOperatorRef_tDefinition: le_mrc_interface.h:611le_mrc_SignalStrengthChangeHandlerRef_t le_mrc_AddSignalStrengthChangeHandler(le_mrc_Rat_t rat, int32_t lowerRangeThreshold, int32_t upperRangeThreshold, le_mrc_SignalStrengthChangeHandlerFunc_t handlerPtr, void *contextPtr)le_result_t le_mrc_GetRadioPower(le_onoff_t *powerPtr)uint32_t le_mrc_GetServingCellId(void)le_mrc_NetRegStateEventHandlerRef_t le_mrc_AddNetRegStateEventHandler(le_mrc_NetRegStateHandlerFunc_t handlerPtr, void *contextPtr)le_result_t le_mrc_SetRadioPower(le_onoff_t power)struct le_mrc_NeighborCells * le_mrc_NeighborCellsRef_tDefinition: le_mrc_interface.h:635le_result_t le_mrc_SetTdScdmaBandPreferences(le_mrc_TdScdmaBandBitMask_t bandMask)void le_mrc_SetManualRegisterModeAsync(const char *mcc, const char *mnc, le_mrc_ManualSelectionHandlerFunc_t handlerPtr, void *contextPtr)le_mrc_Rat_t le_mrc_GetRatOfSignalMetrics(le_mrc_MetricsRef_t MetricsRef)struct le_mrc_NetRegStateEventHandler * le_mrc_NetRegStateEventHandlerRef_tDefinition: le_mrc_interface.h:731le_result_t le_mrc_GetTdScdmaBandPreferences(le_mrc_TdScdmaBandBitMask_t *bandMaskPtrPtr)void le_mrc_DeleteSignalMetrics(le_mrc_MetricsRef_t MetricsRef)struct le_mrc_RatChangeHandler * le_mrc_RatChangeHandlerRef_tDefinition: le_mrc_interface.h:739le_mrc_CellInfoRef_t le_mrc_GetFirstNeighborCellInfo(le_mrc_NeighborCellsRef_t ngbrCellsRef)le_result_t le_mrc_GetCdmaSignalMetrics(le_mrc_MetricsRef_t MetricsRef, int32_t *ssPtr, uint32_t *erPtr, int32_t *ecioPtr, int32_t *sinrPtr, int32_t *ioPtr)le_result_t le_mrc_GetNeighborCellLteIntraFreq(le_mrc_CellInfoRef_t ngbrCellInfoRef, int32_t *rsrqPtr, int32_t *rsrpPtr)struct le_mrc_ScanInformationList * le_mrc_ScanInformationListRef_tDefinition: le_mrc_interface.h:603le_result_t le_mrc_TryConnectService(void)le_result_t le_mrc_GetRatPreferences(le_mrc_RatBitMask_t *ratMaskPtrPtr)le_mrc_ScanInformationListRef_t le_mrc_PerformCellularNetworkScan(le_mrc_RatBitMask_t ratMask)le_result_t le_mrc_SetBandPreferences(le_mrc_BandBitMask_t bandMask)le_result_t le_mrc_SetRatPreferences(le_mrc_RatBitMask_t ratMask)void le_mrc_DeleteCellularNetworkScan(le_mrc_ScanInformationListRef_t scanInformationListRef)int32_t le_mrc_GetNeighborCellRxLevel(le_mrc_CellInfoRef_t ngbrCellInfoRef)le_result_t le_mrc_GetNeighborCellLteInterFreq(le_mrc_CellInfoRef_t ngbrCellInfoRef, int32_t *rsrqPtr, int32_t *rsrpPtr)struct le_mrc_SignalStrengthChangeHandler * le_mrc_SignalStrengthChangeHandlerRef_tDefinition: le_mrc_interface.h:747le_mrc_NeighborCellsRef_t le_mrc_GetNeighborCellsInfo(void)le_mrc_Rat_t le_mrc_GetCellularNetworkRat(le_mrc_ScanInformationRef_t scanInformationRef)uint32_t le_mrc_GetServingCellLocAreaCode(void)le_mrc_PreferredOperatorRef_t le_mrc_GetFirstPreferredOperator(le_mrc_PreferredOperatorListRef_t preferredOperatorListRef)void le_mrc_PerformCellularNetworkScanAsync(le_mrc_RatBitMask_t ratMask, le_mrc_CellularNetworkScanHandlerFunc_t handlerPtr, void *contextPtr)le_result_t le_mrc_GetLteSignalMetrics(le_mrc_MetricsRef_t MetricsRef, int32_t *ssPtr, uint32_t *blerPtr, int32_t *rsrqPtr, int32_t *rsrpPtr, int32_t *snrPtr)void(* le_mrc_RatChangeHandlerFunc_t)(le_mrc_Rat_t rat, void *contextPtr)Definition: le_mrc_interface.h:778int32_t le_mrc_GetPlatformSpecificRegistrationErrorCode(void)le_mrc_PreferredOperatorRef_t le_mrc_GetNextPreferredOperator(le_mrc_PreferredOperatorListRef_t preferredOperatorListRef)void le_mrc_RemoveRatChangeHandler(le_mrc_RatChangeHandlerRef_t addHandlerRef)le_result_t le_mrc_GetTdScdmaBandCapabilities(le_mrc_TdScdmaBandBitMask_t *bandMaskPtrPtr)le_result_t le_mrc_SetLteBandPreferences(le_mrc_LteBandBitMask_t bandMask)bool le_mrc_IsCellularNetworkForbidden(le_mrc_ScanInformationRef_t scanInformationRef)struct le_mrc_ScanInformation * le_mrc_ScanInformationRef_tDefinition: le_mrc_interface.h:595int32_t le_mrc_GetNeighborCellUmtsEcIo(le_mrc_CellInfoRef_t ngbrCellInfoRef)le_result_t le_mrc_RemovePreferredOperator(const char *mcc, const char *mnc)le_mrc_ScanInformationRef_t le_mrc_GetNextCellularNetworkScan(le_mrc_ScanInformationListRef_t scanInformationListRef)le_result_t le_mrc_GetRadioAccessTechInUse(le_mrc_Rat_t *ratPtr)le_result_t le_mrc_SetManualRegisterMode(const char *mcc, const char *mnc)le_mrc_PreferredOperatorListRef_t le_mrc_GetPreferredOperatorsList(void)le_result_t le_mrc_GetLteBandPreferences(le_mrc_LteBandBitMask_t *bandMaskPtrPtr)le_result_t le_mrc_GetCellularNetworkMccMnc(le_mrc_ScanInformationRef_t scanInformationRef, char *mccPtr, size_t mccPtrNumElements, char *mncPtr, size_t mncPtrNumElements)le_result_t le_mrc_GetBandCapabilities(le_mrc_BandBitMask_t *bandMaskPtrPtr)le_result_t le_mrc_GetCellularNetworkName(le_mrc_ScanInformationRef_t scanInformationRef, char *namePtr, size_t namePtrNumElements)bool le_mrc_IsCellularNetworkHome(le_mrc_ScanInformationRef_t scanInformationRef)void le_mrc_ConnectService(void)void le_mrc_DeletePreferredOperatorsList(le_mrc_PreferredOperatorListRef_t preferredOperatorListRef)void le_mrc_RemoveSignalStrengthChangeHandler(le_mrc_SignalStrengthChangeHandlerRef_t addHandlerRef)void le_mrc_RemoveNetRegStateEventHandler(le_mrc_NetRegStateEventHandlerRef_t addHandlerRef)void(* le_mrc_NetRegStateHandlerFunc_t)(le_mrc_NetRegState_t state, void *contextPtr)Definition: le_mrc_interface.h:761Not registered but currently searching for a new operator.Definition: le_mrc_interface.h:659le_result_t le_mrc_GetUmtsSignalMetrics(le_mrc_MetricsRef_t MetricsRef, int32_t *ssPtr, uint32_t *blerPtr, int32_t *ecioPtr, int32_t *rscpPtr, int32_t *sinrPtr)void le_mrc_DisconnectService(void)bool le_mrc_IsCellularNetworkInUse(le_mrc_ScanInformationRef_t scanInformationRef)void(* le_mrc_ManualSelectionHandlerFunc_t)(le_result_t result, void *contextPtr)Definition: le_mrc_interface.h:831uint32_t le_mrc_GetNeighborCellLocAreaCode(le_mrc_CellInfoRef_t ngbrCellInfoRef)le_result_t le_mrc_GetRegisterMode(bool *isManualPtrPtr, char *mccPtr, size_t mccPtrNumElements, char *mncPtr, size_t mncPtrNumElements)le_result_t le_mrc_GetCurrentNetworkMccMnc(char *mccStr, size_t mccStrNumElements, char *mncStr, size_t mncStrNumElements)le_result_t le_mrc_AddPreferredOperator(const char *mcc, const char *mnc, le_mrc_RatBitMask_t ratMask)le_mrc_MetricsRef_t le_mrc_MeasureSignalMetrics(void)bool le_mrc_IsCellularNetworkAvailable(le_mrc_ScanInformationRef_t scanInformationRef)Registration was denied, usually because of invalid access credentials.Definition: le_mrc_interface.h:662void(* le_mrc_SignalStrengthChangeHandlerFunc_t)(int32_t ss, void *contextPtr)Definition: le_mrc_interface.h:795le_result_t le_mrc_GetPreferredOperatorDetails(le_mrc_PreferredOperatorRef_t preferredOperatorRef, char *mccPtr, size_t mccPtrNumElements, char *mncPtr, size_t mncPtrNumElements, le_mrc_RatBitMask_t *ratMaskPtr)Not registered and not currently searching for new operator.Definition: le_mrc_interface.h:653le_result_t le_mrc_GetCurrentNetworkName(char *nameStr, size_t nameStrNumElements)le_result_t le_mrc_GetBandPreferences(le_mrc_BandBitMask_t *bandMaskPtrPtr)void(* le_mrc_CellularNetworkScanHandlerFunc_t)(le_mrc_ScanInformationListRef_t listRef, void *contextPtr)Definition: le_mrc_interface.h:814le_mrc_ScanInformationRef_t le_mrc_GetFirstCellularNetworkScan(le_mrc_ScanInformationListRef_t scanInformationListRef)le_mrc_Rat_t le_mrc_GetNeighborCellRat(le_mrc_CellInfoRef_t ngbrCellInfoRef)