The Modem Radio Control (MRC) APIs is used to control cellular network environments.
It's important for many M2M apps to know details about cellular network environments (like network registration and signal quality). It allows you to limit some M2M services based on the reliability of the network environment, and provides information to control power consumption (power on or shutdown the radio module).
All the functions of this API are provided by the modemService service.
Here's a code sample binding to modem services:
bindings: { clientExe.clientComponent.le_mrc -> modemService.le_mrc }
le_mrc_SetRadioPower() API allows the application to power up or shutdown the radio module.
le_mrc_GetRadioPower() API displays radio module power state.
The following functions let you configure and retrieve the radio configuration preferences: le_mrc_SetAutomaticRegisterMode(), le_mrc_SetManualRegisterMode() and le_mrc_GetRegisterMode() let you set/get the selected Scan mode.
le_mrc_SetBandPreferences(), le_mrc_GetBandPreferences() let you set/get the 2G/3G band preferences by using a bit mask built with le_mrc_BandBitMask_t
The 2G/3G band preferences can be:
le_mrc_SetLteBandPreferences(), le_mrc_GetLteBandPreferences() let you set/get the LTE band preferences by using a bit mask built with le_mrc_LteBandBitMask_t
.
The LTE band preferences can be 0 to 43 except 15, 16, 22, 23, and 26 to 32.
le_mrc_SetTdScdmaBandPreferences(), le_mrc_GetTdScdmaBandPreferences() let you set/get the TD-SCDMA band preferences by using a bit mask built with le_mrc_TdScdmaBandBitMask_t
The TD-SCDMA band preferences can be 'A' to 'F'
le_mrc_AddPreferredOperator() , le_mrc_RemovePreferredOperator() to add/remove a preferred operator by specifying the MCC/MNC and the Radio Access Technology.
le_mrc_GetPreferredOperatorsList(), le_mrc_GetFirstPreferredOperator(), le_mrc_GetNextPreferredOperator(), le_mrc_DeletePreferredOperatorsList(), le_mrc_GetPreferredOperatorDetails() let you retrieve a list of the selected preferred operators and get their details.
le_mrc_GetRadioAccessTechInUse() API retrieves the current active Radio Access Technology.
The application can register a handler function to retrieve the Radio Access Technology each time the RAT changes.
le_mrc_AddRatChangeHandler() API installs a RAT change handler.
le_mrc_RemoveRatChangeHandler() API uninstalls the handler function.
le_mrc_SetRatPreferences(), le_mrc_GetRatPreferences() let you set/get the Radio Access Technology preferences by using a bit mask built with le_mrc_RatBitMask_t
.
The Radio Access Technology preferences can be:
le_mrc_GetNetRegState() API retrieves the radio module network registration status.
The application can register a handler function to retrieve the registration status each time the registration state changes.
le_mrc_AddNetRegStateEventHandler() API installs a registration state handler.
le_mrc_RemoveNetRegStateHandler() API uninstalls the handler function.
le_mrc_RegisterCellularNetwork() API registers on a cellular network.
le_mrc_GetSignalQual() retrieves the received signal strength details.
You must call le_mrc_MeasureSignalMetrics() to measure the signal metrics of the serving cell (aka the 'serving' cell). It returns a reference of le_mrc_MetricsRef_t type.
When the signal metrics are no longer needed, you must call le_mrc_DeleteSignalMetrics() to free all allocated ressources associated with the Metrics object.
le_mrc_GetRatOfSignalMetrics() returns the Radio Access Technology of the signal measures.
le_mrc_GetGsmSignalMetrics() the signal strength in dBm and the bit error rate measured on GSM network.
le_mrc_GetUmtsSignalMetrics() returns the signal metrics measured on UMTS network.
le_mrc_GetLteSignalMetrics() returns the signal metrics measured on LTE network.
le_mrc_GetCdmaSignalMetrics() returns the signal metrics measured on CDMA network.
The application can register a handler function to get notifications when the signal strength changes of a certain threshold value.
le_mrc_AddSignalStrengthChangeHandler() API installs a signal strength change handler. The RAT, the lower-range and the upper-range thresholds must be passed as input parameters. These parameters are updated each time the function is called, the previous thresholds are replaced by the new ones if the function is called with the same RAT.
The event is notified when we cross the range limits in both direction.
le_mrc_RemoveSignalStrengthChangeHandler() API uninstalls the handler function.
le_mrc_GetServingCellId() retrieves the the serving Cell Identifier.
le_mrc_GetServingCellLocAreaCode() retrieves the Location Area Code of the serving cell.
le_mrc_GetCurrentNetworkName() retrieves the Current Network Name. le_mrc_GetCurrentNetworkMccMnc() retrieves the Current Network PLMN information.
Call le_mrc_PerformCellularNetworkScan() to fill a list of all network in sight. You can go through all Scan Information by calling le_mrc_GetFirstCellularNetworkScan() and le_mrc_GetNextCellularNetworkScan().
For each Scan Information, you can call:
le_mrc_DeleteCellularNetworkScan() should be called when you do not need the list anymore.
Usage example:
You must call le_mrc_GetNeighborCellsInfo() to retrieve the neighboring cells information. It returns a reference of le_mrc_NeighborCellsRef_t type.
When the neighboring cells information is no longer needed, you must call le_mrc_DeleteNeighborCellsInfo() to free all allocated resources associated with the object.
Then, you can use the following function to get the information:
Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.