# Radio Service

- [API reference](https://docs.qualcomm.com/doc/80-41102-2/topic/_doxygen_rst_file__doxygen_sources_taf_radio_interface_h.html#file-taf-radio-interface-h)

The Radio Service APIs contain phone and network functions and is applied to configure and obtain wireless cellular network information. By default, the radio service is powered on and available by the system.

## IPC interfaces binding

The functions of this API are provided by the **tafRadioSvc** service.

The following example illustrates how to bind to the Radio service.

bindings:
    {
        clientExe.clientComponent.taf_radio -> tafRadioSvc.taf_radio
    }
    Copy to clipboard

## Power management

Users can power on or power off the radio, but by default it is powered on.

- [taf\_radio\_SetRadioPower()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a37b5fb5c93ed0d53516b513f02cf07be.html#Documentationa00644_1a37b5fb5c93ed0d53516b513f02cf07be) / [taf\_radio\_GetRadioPower()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a94d4ebea49020c8811e89a25a65ded9f.html#Documentationa00644_1a94d4ebea49020c8811e89a25a65ded9f) — Sets/gets radio power status.

The following example illustrates powering on the radio.

le_onoff_t power = LE_OFF;
    
    if (taf_radio_SetRadioPower(LE_ON, phoneId) != LE_OK)
        LE_ERROR("Fail to set radio power.");
    
    if (taf_radio_GetRadioPower(&power, phoneId) != LE_OK)
        LE_ERROR("Fail to get radio power status.");
    
    if (power != LE_ON)
        LE_ERROR("Unexpected power status.");
    Copy to clipboard

## Network registration

Users can register with the network automatically or manually with specific MCC and MNC.

- [taf\_radio\_SetAutomaticRegisterMode()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1af5b7f009690c9d61a5a6288629b71f59.html#Documentationa00644_1af5b7f009690c9d61a5a6288629b71f59) — Registers with a network automatically.
- [taf\_radio\_SetManualRegisterMode()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1aa70a722594799dc231a282e0c569161c.html#Documentationa00644_1aa70a722594799dc231a282e0c569161c) — Registers with a network with MCC and MNC manually.
- [taf\_radio\_GetRegisterMode()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a198da826cbb64c9510d522cd7eb0531f.html#Documentationa00644_1a198da826cbb64c9510d522cd7eb0531f) — Gets the network register mode.
- [taf\_radio\_SetManualRegisterModeAsync()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a20fb0cf87878e4f1c06344dfa73e4dca.html#Documentationa00644_1a20fb0cf87878e4f1c06344dfa73e4dca) — Registers with a network asynchronously with a handler.
- [taf\_radio\_AddNetRegRejectHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a8be9cc9a85a7da04fe3d9cb9031e6df9.html#Documentationa00644_1a8be9cc9a85a7da04fe3d9cb9031e6df9) / [taf\_radio\_RemoveNetRegRejectHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1af7c1cc3e7e642abd45fcdf100d1ef924.html#Documentationa00644_1af7c1cc3e7e642abd45fcdf100d1ef924) — Adds/removes handler for network registration rejection.
- [taf\_radio\_GetPlatformSpecificRegistrationErrorCode()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a17417c6978043af7f737214a9ec9eb1c.html#Documentationa00644_1a17417c6978043af7f737214a9ec9eb1c) — Gets the network registration error code.

The following example illustrates network registration.

if (taf_radio_SetManualRegisterMode(mccStr1, mncStr1, phoneId) == LE_OK)
        LE_ERROR("Fail to set manual register mode.");
    
    LE_INFO("Platform registration error code: %d.", taf_radio_GetPlatformSpecificRegistrationErrorCode());
    
    bool isManualMode = false;
    if (taf_radio_GetRegisterMode(&isManualMode, mccStr2, TAF_RADIO_MCC_BYTES, mncStr2,
        TAF_RADIO_MNC_BYTES, phoneId) != LE_OK)
        LE_ERROR("Fail to get register mode.");
    
    if (!isManualMode)
        LE_ERROR("Unexpected register mode.");
    
    if (strcmp(mccStr1, mccStr2) != 0)
        LE_ERROR("Unexpected MCC.");
    
    if (strcmp(mncStr1, mncStr2) != 0)
        LE_ERROR("Unexpected MNC.");
    Copy to clipboard

## Service domain

Users can get the registration domain for the current serving RAT.

- [taf\_radio\_GetServiceDomain()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a2fe094303d5dbe4b1fb4738506555d3c.html#Documentationa00644_1a2fe094303d5dbe4b1fb4738506555d3c) — Get the registration domain for the current serving RAT.
- [taf\_radio\_SetServiceDomainPreferences()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a069e03e63debd1b05a6383f71baea75d.html#Documentationa00644_1a069e03e63debd1b05a6383f71baea75d) — Sets the service domain preferences.
- [taf\_radio\_GetServiceDomainPreferences()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a39546f29f01139e4a5eec94fb8da1ae6.html#Documentationa00644_1a39546f29f01139e4a5eec94fb8da1ae6) — Gets the network register mode.

The following example illustrates getting service domain.

taf_radio_ServiceDomainState_t domain;
    le_result_t result = taf_radio_GetServiceDomainPreferences(&domain, phoneId);
    if (result != LE_OK)
       LE_ERROR("Fail to get service domain.");
    switch (domain)
    {
        case TAF_RADIO_SERVICE_DOMAIN_STATE_CS_ONLY:
            LE_INFO("Domain : CS Only");
            break;
        case TAF_RADIO_SERVICE_DOMAIN_STATE_PS_ONLY:
            LE_INFO("Domain : PS Only");
            break;
        case TAF_RADIO_SERVICE_DOMAIN_STATE_CS_AND_PS:
            LE_INFO("Domain : CS and PS");
            break;
        default:
            LE_ERROR("Domain : Unknown");
    }
    Copy to clipboard

## Preferred operators

Users can configure the preferences of operators and get the configuration details with a list.

- [taf\_radio\_GetPreferredOperatorsList()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1ab86aaef84d67ce6aac74aefe43528f2a.html#Documentationa00644_1ab86aaef84d67ce6aac74aefe43528f2a) / [taf\_radio\_DeletePreferredOperatorsList()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1ae0ea9c2f2068ce9cbf8853368705169b.html#Documentationa00644_1ae0ea9c2f2068ce9cbf8853368705169b) — Creates/deletes a preferred operator list reference.
- [taf\_radio\_AddPreferredOperator()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1aab2d7b679dc020b375760647ed940aa6.html#Documentationa00644_1aab2d7b679dc020b375760647ed940aa6) / [taf\_radio\_RemovePreferredOperator()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a4b436b87309d73c6816457789cd69aab.html#Documentationa00644_1a4b436b87309d73c6816457789cd69aab) — Adds/removes a preferred operator.
- [taf\_radio\_GetFirstPreferredOperator()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a979dccbf8f0c10b0570fe5a517514d13.html#Documentationa00644_1a979dccbf8f0c10b0570fe5a517514d13) / [taf\_radio\_GetNextPreferredOperator()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a68f9ba64e286803dba8d1d4d4c9ea06e.html#Documentationa00644_1a68f9ba64e286803dba8d1d4d4c9ea06e) — Gets the first/next preferred operator reference.
- [taf\_radio\_GetPreferredOperatorDetails()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a581697e3aa67f882ec3ef58227a778e7.html#Documentationa00644_1a581697e3aa67f882ec3ef58227a778e7) — Gets the operator details.

The following example illustrates preferred operator list management.

// Add preference.
    for (int i = 0; i < PREFERRED_OPERATOR_NUM; i++) {
        taf_radio_AddPreferredOperator(prefMccStr[i], prefMncStr[i], prefRatMask, phoneId);
    }
    
    // Create list.
    listRef = taf_radio_GetPreferredOperatorsList(phoneId);
    
    // Traverse list
    opRef = taf_radio_GetFirstPreferredOperator(listRef);
    while (opRef != nullptr) {
        taf_radio_GetPreferredOperatorDetails(opRef, mccStr, TAF_RADIO_MCC_BYTES, mncStr,
            TAF_RADIO_MNC_BYTES, &ratMask);
    
        // Do something with the operator details.
    
        opRef = taf_radio_GetNextPreferredOperator(listRef);
    }
    
    // Delete list.
    taf_radio_DeletePreferredOperatorsList(listRef);
    
    // Remove preference.
    for (int i = 0; i < PREFERRED_OPERATOR_NUM; i++) {
        taf_radio_RemovePreferredOperator(prefMccStr[i], prefMncStr[i], phoneId);
    }
    Copy to clipboard

## Radio Access Technology (RAT)

Users can get RAT in use, and configure RAT preferences.

- [taf\_radio\_GetRadioAccessTechInUse()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a836d54de3194280e1cfee8206c3bd4f3.html#Documentationa00644_1a836d54de3194280e1cfee8206c3bd4f3) — Gets radio access technology in use.
- [taf\_radio\_AddRatChangeHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1abe9c1c7ddac453f5319cb66a16106d6c.html#Documentationa00644_1abe9c1c7ddac453f5319cb66a16106d6c) / [taf\_radio\_RemoveRatChangeHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a990b0183ef5fe1b989c65f637d46b08b.html#Documentationa00644_1a990b0183ef5fe1b989c65f637d46b08b) — Adds/removes RAT change handler.
- [taf\_radio\_SetRatPreferences()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a6a7d41a62fea7418dd61bbbd56e1e4cc.html#Documentationa00644_1a6a7d41a62fea7418dd61bbbd56e1e4cc) / [taf\_radio\_GetRatPreferences()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a0f10719cd190761092dbfbd7d063d444.html#Documentationa00644_1a0f10719cd190761092dbfbd7d063d444) — Sets/gets RAT peferences.

The following example illustrates RAT change indication.

// RAT change indication handler.
    static void RatChangeHandler(const taf_radio_RatChangeInd_t* indPtr, void* contextPtr)
    {
        LE_INFO("RAT: %d", indPtr->rat);
    }
    
    // Add handler for RAT change.
    handlerRef = taf_radio_AddRatChangeHandler((taf_radio_RatChangeHandlerFunc_t)RatChangeHandler, NULL);
    
    // RAT change in some cases.
    Copy to clipboard

## Packet-switched state

Users can get the packet-switched (PS) state.

- [taf\_radio\_GetPacketSwitchedState()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a6724c90aad6ce7831983651a8430896a.html#Documentationa00644_1a6724c90aad6ce7831983651a8430896a) — Gets the PS state.
- [taf\_radio\_AddPacketSwitchedChangeHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a940d64335f8e88cd0a528003fdba0082.html#Documentationa00644_1a940d64335f8e88cd0a528003fdba0082) / [taf\_radio\_RemovePacketSwitchedChangeHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a107beab94f27dbc5826c25b2f21897fc.html#Documentationa00644_1a107beab94f27dbc5826c25b2f21897fc) — Adds/removes PS change handler.

The following example illustrates the PS change indication.

// PS change indication handler.
    static void PsChangeHandler(const taf_radio_NetRegState_t state, void* contextPtr)
    {
        LE_INFO("PS state: %d", state);
    }
    
    // Add handler for PS change.
    handlerRef = taf_radio_AddPacketSwitchedChangeHandler(
       (taf_radio_PacketSwitchedChangeHandlerFunc_t)PsChangeHandler, NULL);
    
    // PS change in some cases.
    Copy to clipboard

## Signal metrics

Users can measure signal and get metrics for different RATs.

- [taf\_radio\_GetSignalQual()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1adac6b8ee6c09564963c9cad9c32523e3.html#Documentationa00644_1adac6b8ee6c09564963c9cad9c32523e3) — Gets the highest signal strength level.
- [taf\_radio\_MeasureSignalMetrics()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a07f2da717ae6078808656b295c73cbd2.html#Documentationa00644_1a07f2da717ae6078808656b295c73cbd2) / [taf\_radio\_DeleteSignalMetrics()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a141cec5109eb5605e3628acd9d33f0c9.html#Documentationa00644_1a141cec5109eb5605e3628acd9d33f0c9) — Creates/deletes the signal metrics reference.
- [taf\_radio\_GetRatOfSignalMetrics()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1aac8ea4dcb68b8bce3f44d3139b34676a.html#Documentationa00644_1aac8ea4dcb68b8bce3f44d3139b34676a) — Gets RATs of signal metrics.
- [taf\_radio\_GetGsmSignalMetrics()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a4ad1548b9ab8dc6d0f042b0364a685b7.html#Documentationa00644_1a4ad1548b9ab8dc6d0f042b0364a685b7) / [taf\_radio\_GetUmtsSignalMetrics()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1aaacd08afc8188c4d3412d164e668bff8.html#Documentationa00644_1aaacd08afc8188c4d3412d164e668bff8) / [taf\_radio\_GetLteSignalMetrics()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a97383fe083174867480af9540fc9cfa8.html#Documentationa00644_1a97383fe083174867480af9540fc9cfa8) / [taf\_radio\_GetCdmaSignalMetrics()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a96cad66c5d00afbfa2f787dc99561f44.html#Documentationa00644_1a96cad66c5d00afbfa2f787dc99561f44) / [taf\_radio\_GetNr5gSignalMetrics()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1abb4c4b62bdf7931d77bae5733738eada.html#Documentationa00644_1abb4c4b62bdf7931d77bae5733738eada) — Gets GSM/UMTS/LTE/CDMA/NR5G signal metrics, these APIs should be called after calling taf\_radio\_GetRatOfSignalMetrics to get the valid RAT. If the return value is INVALID\_SIGNAL\_STRENGTH\_VALUE, it indicates that the signal metrics are unknown or not detectable.
- [taf\_radio\_AddSignalStrengthChangeHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1ad5071a590ca69e7daf0b3336d4042b17.html#Documentationa00644_1ad5071a590ca69e7daf0b3336d4042b17) / [taf\_radio\_RemoveSignalStrengthChangeHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a77fbbb69e6c5375b84a7b573509fdb4d.html#Documentationa00644_1a77fbbb69e6c5375b84a7b573509fdb4d) — Adds/removes signal strength change handler.
- [taf\_radio\_SetSignalStrengthIndThresholds()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a8fdb9c3df32a6e00ee74ae240b0caa9c.html#Documentationa00644_1a8fdb9c3df32a6e00ee74ae240b0caa9c) / [taf\_radio\_SetSignalStrengthIndDelta()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a7d6084e27a329c02d2d52076dea26353.html#Documentationa00644_1a7d6084e27a329c02d2d52076dea26353) — Sets signal strength reporting criteria. Either the threshold or delta can be set at a time.
- [taf\_radio\_SetSignalStrengthIndHysteresis()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1ae9c80c05cf308b2d75683497a9f50db1.html#Documentationa00644_1ae9c80c05cf308b2d75683497a9f50db1) / [taf\_radio\_SetSignalStrengthIndHysteresisTimer()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a673f755d2c29437b51728f5801f71bf0.html#Documentationa00644_1a673f755d2c29437b51728f5801f71bf0) — Sets the optional parameters for signal strength reporting criteria. Hysteresis is applicable only when threshold is set. Hysteresis timer is applicable for both threshold and delta.This API needs to be called before [taf\_radio\_SetSignalStrengthIndThresholds()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a8fdb9c3df32a6e00ee74ae240b0caa9c.html#Documentationa00644_1a8fdb9c3df32a6e00ee74ae240b0caa9c) and [taf\_radio\_SetSignalStrengthIndDelta()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a7d6084e27a329c02d2d52076dea26353.html#Documentationa00644_1a7d6084e27a329c02d2d52076dea26353).

The following example illustrates getting LTE signal metrics.

metricRef = taf_radio_MeasureSignalMetrics(phoneId);
    ratMask = taf_radio_GetRatOfSignalMetrics(metricRef);
    if (ratMask & TAF_RADIO_RAT_BIT_MASK_LTE) {
        if (taf_radio_GetLteSignalMetrics(metricsRef, &ss, &rsrq, &rsrp, &snr) == LE_OK) {
            LE_INFO("LTE signal strength in dBm: %d\n", ss);
            LE_INFO("LTE reference signal receive quality in dB : %d\n", rsrq);
            LE_INFO("LTE reference signal receive power in dBm : %d\n", rsrp);
            LE_INFO("LTE signal-to-noise ratio in 0.1 dB : %d\n", snr);
        } else {
            LE_ERROR("Fail to get LTE signal metrics.");
        }
    }
    Copy to clipboard

The following example illustrates setting the signal strength reporting criteria.

The signal strength notifications are sent based on the configurations of delta or threshold on the RAT(s) list. Additionally, the hysteresis dB can be applied on top of the threshold list. Furthermore, time hysteresis (hysteresis ms) can be applied either on top of the delta or on the threshold list, or even on top of both the threshold list and the hysteresis dB.

For NR5G and LTE only RSRP change will be notified to clients. For other RATs only RSSI change will be notified to clients.

- Delta (delta): A notification is sent when the difference between the current signal strength value and the last reported signal strength value crosses the specified delta. The value should be a non-zero positive integer, in units of 0.1dBm. For example, to set a delta of 10dBm, the value should be 100.

The default values for delta is as follows. Measurement type : value RSSI\_DELTA : 50 (in dBm) RSRP\_DELTA : 60 (in dBm)

- Threshold (lowerRange/upperRange): A notification is sent when the current signal strength crosses over or under any of the thresholds specified. For example, to set thresholds at -95 dBm and -80 dBm, the threshold list values are -950, -800, since the listed values are in units of 0.1 dBm.
- Hysteresis dB (optional): Prevents the generation of multiple notifications when the signal strength is close to a threshold value and experiencing frequent small changes. With a non-zero hysteresis, the signal strength indicators should cross over or under by more than the hysteresis value for a notification to be sent. To apply hysteresis, the value should be a non-zero positive integer, in units of 0.1 dBm. For example, to set a hysteresis dB of 10 dBm, the value should be 100.
- Hysteresis ms (optional): Time hystersis can be applied to avoid multiple notifications even when all the other criteria for a notification are met. The time hystersis can be applied on top of any other criteria (delta, threshold, threshold and hysteresis).

If the hysteresis(dB or ms) value is set to 0, the signal strength notification criteria just considers the threshold or delta. Once configured, the hysteresis value for a signal strength type is retained, until explicitly reconfigured to 0 again or device reboot. This configuration is a global setting. The signal strength setting does not persist through device reboot and needs to be configured again. Default signal strength configuration is set after a device reboot.

// Set the optional hysteresis time parameter. Applicable to delta and threshold.
    // Is a global variable and once set will be applicable to all RATs.
    taf_radio_SetSignalStrengthIndHysteresisTimer(hysteresis ms,phoneId);
    // Set the optional hysteresis dBm parameter. Applicable to threshold.
    // Is applicable to a sigType.
    taf_radio_SetSignalStrengthIndHysteresis(sigType,hysteresis dB,phoneId);
    
    // Call below API to set the signal strength for threshold criteria.
    taf_radio_SetSignalStrengthIndThresholds(sigType,lowerRange,upperRange,phoneId);
    // Call below API to set the signal strength for delta criteria.
    taf_radio_SetSignalStrengthIndDelta(sigType,delta,phoneId);
    Copy to clipboard

## Serving cellular network information

Users can get serving cellular network information.

- [taf\_radio\_GetServingCellId()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a771ad3bfe6de8645ffea642f7d29dfda.html#Documentationa00644_1a771ad3bfe6de8645ffea642f7d29dfda) — Gets the cell ID. **WARNING:** Only applicable for GSM/LTE/WCDMA/TDSCDMA.
- [taf\_radio\_GetServingCellLocAreaCode()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1abe815909075921b997053d5a6266609d.html#Documentationa00644_1abe815909075921b997053d5a6266609d) — Gets the location area code. **WARNING:** Only applicable for GSM/WCDMA/TDSCDMA.
- [taf\_radio\_GetServingCellLteTracAreaCode()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1ad0fb84e9dd82bd5a4b5fbdba650de7f7.html#Documentationa00644_1ad0fb84e9dd82bd5a4b5fbdba650de7f7) — Gets the tracking area code. **WARNING:** Only applicable for LTE.
- [taf\_radio\_GetServingCellEarfcn()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1aefdedf38e1819cee6c002d545506d92e.html#Documentationa00644_1aefdedf38e1819cee6c002d545506d92e) — Gets the E-UTRA absolute radio frequency channel number. **WARNING:** Only applicable for LTE.
- [taf\_radio\_GetServingCellTimingAdvance()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1aff7e9ddfd973aaed5d774d407f10c5a7.html#Documentationa00644_1aff7e9ddfd973aaed5d774d407f10c5a7) — Gets the timing advance. **WARNING:** Only applicable for GSM/LTE.
- [taf\_radio\_GetPhysicalServingLteCellId()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a73821394ef41986eaf0b881c7b796d84.html#Documentationa00644_1a73821394ef41986eaf0b881c7b796d84) — Gets the physical cell ID. **WARNING:** Only applicable for LTE.
- [taf\_radio\_GetServingCellGsmBsic()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a47d1e768e0e329b0a9bf9d6d06df0e48.html#Documentationa00644_1a47d1e768e0e329b0a9bf9d6d06df0e48) — Gets the base station ID. **WARNING:** Only applicable for GSM.
- [taf\_radio\_GetServingCellScramblingCode()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a4cbf6f08eaae4a784ff5f1b1d5e42600.html#Documentationa00644_1a4cbf6f08eaae4a784ff5f1b1d5e42600) — Gets the primary scrambling code. **WARNING:** Only applicable for WCDMA.
- [taf\_radio\_GetServingCellBandInfo()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1af53b3e628d6a1f721af4fe0dea33a816.html#Documentationa00644_1af53b3e628d6a1f721af4fe0dea33a816) — Gets 2G/3G band information. **WARNING:** Only applicable for GSM/WCDMA/TDSCDMA.
- [taf\_radio\_GetServingCellLteBandInfo()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a2ae636ac395be33937e5f52f05135a7a.html#Documentationa00644_1a2ae636ac395be33937e5f52f05135a7a) — Gets LTE band information. **WARNING:** Only applicable for LTE.
- [taf\_radio\_GetServingCellNrBandInfo()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1ae859c58c00e4ba5fb9b6f29e06eae784.html#Documentationa00644_1ae859c58c00e4ba5fb9b6f29e06eae784) — Gets NR band information. **WARNING:** Only applicable for NR.
- [taf\_radio\_GetNrIconType()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a7600afbcbbb909756f55f323b38b67bf.html#Documentationa00644_1a7600afbcbbb909756f55f323b38b67bf) — Gets NR icon type. **WARNING:** Applicable for NR (basic or uwb) and also appliable for LTE and LTE will return NONE.

## Network information

Users can use the following APIs to get the current network and discover nearby networks by scanning.

- [taf\_radio\_GetCurrentNetworkName()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a78385b810e8eaa31c74f4e83759d03e7.html#Documentationa00644_1a78385b810e8eaa31c74f4e83759d03e7) — Gets the current network name.
- [taf\_radio\_GetCurrentNetworkMccMnc()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a6544e6d3051d1fa530e2895ffffc5fbf.html#Documentationa00644_1a6544e6d3051d1fa530e2895ffffc5fbf) — Gets the current network MCC and MNC.
- [taf\_radio\_PerformCellularNetworkScan()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1ad2722bb0ca5670bb4c2c83a079a3a950.html#Documentationa00644_1ad2722bb0ca5670bb4c2c83a079a3a950) / [taf\_radio\_DeleteCellularNetworkScan()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1ad3d0507d3bdb26aa7a5402d92ba83305.html#Documentationa00644_1ad3d0507d3bdb26aa7a5402d92ba83305) — Creates/deletes a list reference for network scanning.
- [taf\_radio\_PerformCellularNetworkScanAsync()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a787d8bcdad09d370f6bcef53171a34a4.html#Documentationa00644_1a787d8bcdad09d370f6bcef53171a34a4) — Asynchronously performs a network scan with a handler.
- [taf\_radio\_GetFirstCellularNetworkScan()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a8099ab014ba1df532c696f7a2ed2a1c9.html#Documentationa00644_1a8099ab014ba1df532c696f7a2ed2a1c9) / [taf\_radio\_GetNextCellularNetworkScan()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a694b7d51c93e16bd5ac4901024d6ef43.html#Documentationa00644_1a694b7d51c93e16bd5ac4901024d6ef43) — Gets the first/next operator reference in the network scan list.
- [taf\_radio\_GetCellularNetworkMccMnc()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a682139bc8b9e9774e5538c88835ebd9a.html#Documentationa00644_1a682139bc8b9e9774e5538c88835ebd9a) — Gets MCC and MNC of a network scan operator.
- [taf\_radio\_GetCellularNetworkName()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1aefd3296afafffccfc2294ff636b710aa.html#Documentationa00644_1aefd3296afafffccfc2294ff636b710aa) — Gets the name of a network scan operator.
- [taf\_radio\_IsCellularNetworkInUse()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1ab012de52b9daf238dbc97ab663b635a1.html#Documentationa00644_1ab012de52b9daf238dbc97ab663b635a1) — Checks if using the network scan operator’s network.
- [taf\_radio\_IsCellularNetworkAvailable()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a916b358108bb13b8d1e7fc36cd591fec.html#Documentationa00644_1a916b358108bb13b8d1e7fc36cd591fec) — Checks if the network is available.
- [taf\_radio\_IsCellularNetworkHome()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a4a98581199bef40725f59d779714f6a4.html#Documentationa00644_1a4a98581199bef40725f59d779714f6a4) — Checks if it is the home network.
- [taf\_radio\_IsCellularNetworkForbidden()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a6f3e22940ea714e58bdf866059ee54ea.html#Documentationa00644_1a6f3e22940ea714e58bdf866059ee54ea) — Checks if the network is forbidden.

When users fail to register to the current network, they may scan and find the nearby networks, and register to an available network with MCC and MNC manually. The following example illustrates network scanning.

// Create list and perform network scan.
    listRef = taf_radio_PerformCellularNetworkScan(phoneId);
    
    // Traverse list
    opRef = taf_radio_GetFirstCellularNetworkScan(listRef);
    while (opRef != nullptr) {
        if (taf_radio_GetCellularNetworkName(opRef, name, TAF_RADIO_NETWORK_NAME_MAX_LEN) != LE_OK) {
            LE_ERROR("Fail to get network name.");
            break;
        }
    
        if (taf_radio_GetCellularNetworkMccMnc(opRef, mcc, TAF_RADIO_MCC_BYTES,
            mnc, TAF_RADIO_MNC_BYTES) != LE_OK) {
            LE_ERROR("Fail to get network MCC and MNC.");
            break;
        }
    
        inUse = taf_radio_IsCellularNetworkInUse(opRef);
        available = taf_radio_IsCellularNetworkAvailable(opRef);
        fobbiden = taf_radio_IsCellularNetworkForbidden(opRef);
        home = taf_radio_IsCellularNetworkHome(opRef);
    
        // Do something with the network scan information.
    
        opRef = taf_radio_GetNextCellularNetworkScan(listRef);
    }
    
    // Delete list.
    taf_radio_DeleteCellularNetworkScan(listRef);
    Copy to clipboard

## RAT capability information

Users can get the number of SIMs and RAT capabilities in given slot.

- [taf\_radio\_GetHardwareSimConfig()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a16f03e6dc9cda0cb5af4d7c12e4f6544.html#Documentationa00644_1a16f03e6dc9cda0cb5af4d7c12e4f6544) — Gets the maximum number of SIMs that can be supported simultaneously and the maximum number of SIMs that can be simultaneously active.If the maximum active SIM number is less than the maximum number, any combination of the SIMs can be active and the remaining can be in standby.
- [taf\_radio\_GetHardwareSimRatCapabilities()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a37d593b64622f8740b1d8be1403722f5.html#Documentationa00644_1a37d593b64622f8740b1d8be1403722f5) — simRatCapMask - Gets the supported SIM RAT capabilities which intersects with the device supported RAT capabilities and the device supported RAT capabilities in given slot. deviceRatCapMask - Gets the supported device RAT capabilities supported in given slot.

The following example illustrates the API usage.

// Gets sim count
    uint8_t totalSimCount = 0;
    uint8_t maxActiveSims = 0;
    le_result_t result = taf_radio_GetHardwareSimConfig(&totalSimCount,&maxActiveSims);
    
    // Gets RAT Capabilities
    taf_radio_RatBitMask_t deviceRatCapMask;
    taf_radio_RatBitMask_t simRatCapMask;
    result = taf_radio_GetHardwareSimRatCapabilities(&deviceRatCapMask,&simRatCapMask,phoneId);
    Copy to clipboard

## IMS (IP multimedia subsystem) information

Users can set and get the IMS registration status, service status and configurations in given slot.

- [taf\_radio\_GetImsRegStatus()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1ad56c7bcbdcd31ec704b613f4ad3dea67.html#Documentationa00644_1ad56c7bcbdcd31ec704b613f4ad3dea67) — Gets the IMS registration status in given slot.
- [taf\_radio\_GetImsSvcStatus()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a4f0f7edc61992244b53065b8afcd521d.html#Documentationa00644_1a4f0f7edc61992244b53065b8afcd521d) — Gets the IMS service status (including Voice over IMS and SMS) in given slot.
- [taf\_radio\_SetImsSvcCfg()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a0e45daea70cfe9b786c60271f16a7083.html#Documentationa00644_1a0e45daea70cfe9b786c60271f16a7083) — Sets the IMS service configurations (including IMS, Voice over IMS, Voice over NR, SMS over IMS, RTT) in given slot. **WARNING:** Disabling Voice over NR will result in the user equipment (UE) defaulting to support NR5G voice over EPS fallback. To enable Voice over NR, both IMS and Voice over IMS must be enabled.
- [taf\_radio\_GetImsSvcCfg()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1aa5ffba2c34e7e2d0f91e5115b8184e69.html#Documentationa00644_1aa5ffba2c34e7e2d0f91e5115b8184e69) — Gets the IMS service (IMS, Voice over IMS, Voice over NR, SMS over IMS, RTT) configurations in given slot.
- [taf\_radio\_SetImsUserAgent()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1aaabcfb3dec7c054348691958538b2a12.html#Documentationa00644_1aaabcfb3dec7c054348691958538b2a12) — Sets the IMS SIP User Agent configuration in given slot.
- [taf\_radio\_GetImsUserAgent()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a1a82b3181d47a12dcccb85555f180b64.html#Documentationa00644_1a1a82b3181d47a12dcccb85555f180b64) — Gets the IMS SIP User Agent configuration in given slot.
- [taf\_radio\_GetImsPdpError()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1aebe8ec749959d55623bd053808fc73f3.html#Documentationa00644_1aebe8ec749959d55623bd053808fc73f3) — Gets the IMS PDP error in given slot.
- [taf\_radio\_AddImsRegStatusChangeHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1ac8a0b63ab60803a7f5b4dc2e91f4e7db.html#Documentationa00644_1ac8a0b63ab60803a7f5b4dc2e91f4e7db) / [taf\_radio\_RemoveImsRegStatusChangeHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a0895400ed5153a355bc6817c105c5602.html#Documentationa00644_1a0895400ed5153a355bc6817c105c5602) — Adds/removes handler for IMS registration status change.
- [taf\_radio\_AddImsStatusChangeHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a5422766cea30099dc7ba0628130cd755.html#Documentationa00644_1a5422766cea30099dc7ba0628130cd755) / [taf\_radio\_RemoveImsStatusChangeHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1af703c9b02b464208793e68523539e8ee.html#Documentationa00644_1af703c9b02b464208793e68523539e8ee) — Adds/removes handler for IMS status change.

The following example illustrates the API usage.

// Sets IMS Voice over NR configuration.
      bool enable = false;
      taf_radio_ImsRef_t imsRef = taf_radio_GetIms(phoneId);
      le_result_t result = taf_radio_SetImsSvcCfg(imsRef, TAF_RADIO_IMS_SVC_TYPE_VONR, enable);
      if (result == LE_OK)
      {
          LE_INFO("VoNR has been successfully disabled.");
      } else {
          LE_ERROR("Failed to disable VoNR.");
      }
    
      // Gets IMS Voice over NR configuration.
      result = taf_radio_GetImsSvcCfg(imsRef, TAF_RADIO_IMS_SVC_TYPE_VONR, &enable);
      if (result == LE_OK)
      {
          if (enable)
          {
              LE_INFO("VoNR is enabled");
          } else {
              LE_INFO("VoNR is disabled");
          }
      } else {
          LE_ERROR("Failed to get the configuration of VoNR.");
      }

    @section c_taf_radio_net_reg_state Network registration state
    
    Users can get the circuit-switched (CS) network registration state and subscribe to changes.
    
     - taf_radio_GetNetRegState() -- Gets the CS network registration state (home, roaming, denied,
       searching, etc.).
    
     - taf_radio_AddNetRegStateEventHandler() / taf_radio_RemoveNetRegStateEventHandler() --
       Adds/removes handler for CS network registration state changes.
    
    @code
    
      taf_radio_NetRegState_t state;
      le_result_t res = taf_radio_GetNetRegState(&state, phoneId);
      if (res != LE_OK)
          LE_ERROR("Failed to get net reg state: %d", res);
      else
          LE_INFO("Current net reg state: %d", state);
    
      static void NetRegStateHandler(const taf_radio_NetRegStateInd_t* indPtr, void* contextPtr)
      {
          LE_INFO("Net reg state changed: %d on phone %d", indPtr->state, indPtr->phoneId);
      }
      taf_radio_NetRegStateEventHandlerRef_t handlerRef =
          taf_radio_AddNetRegStateEventHandler(
              (taf_radio_NetRegStateHandlerFunc_t)NetRegStateHandler, NULL);
      // ... later:
      taf_radio_RemoveNetRegStateEventHandler(handlerRef);
    Copy to clipboard

## Operating mode

Users can set and get the device operating mode (online, airplane, offline, etc.) and subscribe to operating mode changes.

- [taf\_radio\_SetOperatingMode()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1aad3bceb4a9b042b3adbf4243b05f6f20.html#Documentationa00644_1aad3bceb4a9b042b3adbf4243b05f6f20) — Sets the operating mode (e.g., online, airplane).
- [taf\_radio\_GetOperatingMode()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a55755f4e5aca88d8869daad11039fc07.html#Documentationa00644_1a55755f4e5aca88d8869daad11039fc07) — Gets the current operating mode.
- [taf\_radio\_AddOpModeChangeHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a72da222aa46fb17941449b28777f423c.html#Documentationa00644_1a72da222aa46fb17941449b28777f423c) / [taf\_radio\_RemoveOpModeChangeHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a1c1763ac9d08710d6c739ec111be3303.html#Documentationa00644_1a1c1763ac9d08710d6c739ec111be3303) — Adds/removes handler for operating mode changes.

le_result_t res = taf_radio_SetOperatingMode(TAF_RADIO_OP_MODE_AIRPLANE, phoneId);
    if (res != LE_OK)
        LE_ERROR("Failed to set airplane mode: %d", res);
    
    taf_radio_OpMode_t mode;
    res = taf_radio_GetOperatingMode(&mode, phoneId);
    if (res != LE_OK)
        LE_ERROR("Failed to get operating mode: %d", res);
    else
        LE_INFO("Current operating mode: %d", mode);
    
    res = taf_radio_SetOperatingMode(TAF_RADIO_OP_MODE_ONLINE, phoneId);
    if (res != LE_OK)
        LE_ERROR("Failed to restore online mode: %d", res);
    Copy to clipboard

## NR5G serving cell information

Users can get NR5G-specific serving cell information.

- [taf\_radio\_GetServingNrCellId()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1abf6d55cee2ae5eba9cb843100086f9c5.html#Documentationa00644_1abf6d55cee2ae5eba9cb843100086f9c5) — Gets the 64-bit NR cell identity (use instead of [taf\_radio\_GetServingCellId()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a771ad3bfe6de8645ffea642f7d29dfda.html#Documentationa00644_1a771ad3bfe6de8645ffea642f7d29dfda) for NR5G).
- [taf\_radio\_GetServingCellNrTracAreaCode()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a76750bae0135e26c1d9a161ca677708c.html#Documentationa00644_1a76750bae0135e26c1d9a161ca677708c) — Gets the NR tracking area code.
- [taf\_radio\_GetServingCellNrArfcn()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a27b8a145e0eff3c725cfdadf65ce900a.html#Documentationa00644_1a27b8a145e0eff3c725cfdadf65ce900a) — Gets the NR absolute radio frequency channel number.
- [taf\_radio\_GetPhysicalServingNrCellId()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a0081108f35880f6d8a79798958e29d81.html#Documentationa00644_1a0081108f35880f6d8a79798958e29d81) — Gets the NR physical cell identity.

uint64_t nrCellId = taf_radio_GetServingNrCellId(phoneId);
    if (nrCellId == UINT64_MAX)
        LE_ERROR("Failed to get NR cell ID.");
    else
        LE_INFO("NR cell ID: %" PRIu64, nrCellId);
    
    int32_t nrTac = taf_radio_GetServingCellNrTracAreaCode(phoneId);
    if (nrTac == INT32_MAX)
        LE_ERROR("Failed to get NR TAC.");
    
    int32_t nrArfcn = taf_radio_GetServingCellNrArfcn(phoneId);
    if (nrArfcn == INT32_MAX)
        LE_ERROR("Failed to get NR ARFCN.");
    
    uint32_t nrPcid = taf_radio_GetPhysicalServingNrCellId(phoneId);
    if (nrPcid == UINT32_MAX)
        LE_ERROR("Failed to get NR physical cell ID.");
    Copy to clipboard

## Serving cell channel and routing area information

Users can get GSM/UMTS channel numbers, routing area code, and the full network name.

- [taf\_radio\_GetServingCellArfcn()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a364939537cbeee40a97fd9b0e3d1dc5e.html#Documentationa00644_1a364939537cbeee40a97fd9b0e3d1dc5e) — Gets the GSM absolute radio frequency channel number. **WARNING:** Only applicable for GSM.
- [taf\_radio\_GetServingCellUarfcn()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a94bab7a88c9c545ee89cf6e0c415cc76.html#Documentationa00644_1a94bab7a88c9c545ee89cf6e0c415cc76) — Gets the UMTS/TDSCDMA UTRA absolute radio frequency channel number. **WARNING:** Only applicable for UMTS/TDSCDMA.
- [taf\_radio\_GetServingCellRoutingAreaCode()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1ad22ddc1d6bfaffd8ad1ee0f4b0ce2c1f.html#Documentationa00644_1ad22ddc1d6bfaffd8ad1ee0f4b0ce2c1f) — Gets the routing area code. **WARNING:** Only applicable for GSM/WCDMA/TDSCDMA.
- [taf\_radio\_GetCurrentNetworkLongName()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a5bc15e4837cf578a934fbd8be8a3486c.html#Documentationa00644_1a5bc15e4837cf578a934fbd8be8a3486c) — Gets the current network full (long) name.

int32_t arfcn;
    le_result_t res = taf_radio_GetServingCellArfcn(&arfcn, phoneId);
    if (res == LE_OK)
        LE_INFO("GSM ARFCN: %d", arfcn);
    else if (res == LE_NOT_FOUND)
        LE_INFO("Not a GSM cell.");
    else
        LE_ERROR("Failed to get ARFCN: %d", res);
    
    uint8_t rac;
    res = taf_radio_GetServingCellRoutingAreaCode(&rac, phoneId);
    if (res != LE_OK)
        LE_ERROR("Failed to get RAC: %d", res);
    else
        LE_INFO("Routing area code: %u", rac);
    
    char longName[TAF_RADIO_NETWORK_NAME_MAX_LEN + 1];
    res = taf_radio_GetCurrentNetworkLongName(longName, sizeof(longName), phoneId);
    if (res != LE_OK)
        LE_ERROR("Failed to get long network name: %d", res);
    else
        LE_INFO("Network long name: %s", longName);
    Copy to clipboard

## PCI network scan

Users can perform a network scan with Physical Cell Identity (PCI) to discover nearby cells. Each PCI scan entry contains a physical cell ID, global cell ID, and a list of PLMN IDs.

- [taf\_radio\_PerformPciNetworkScan()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a527cbdeb94aff501a4e11c047c1d23c6.html#Documentationa00644_1a527cbdeb94aff501a4e11c047c1d23c6) / [taf\_radio\_DeletePciNetworkScan()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1aa36e634d72727c5c0320f4ce0969c626.html#Documentationa00644_1aa36e634d72727c5c0320f4ce0969c626) — Performs/deletes a PCI network scan.
- [taf\_radio\_PerformPciNetworkScanAsync()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a71413ea7bee9fd1893e4f66d3a4dbeb5.html#Documentationa00644_1a71413ea7bee9fd1893e4f66d3a4dbeb5) — Asynchronously performs a PCI network scan.
- [taf\_radio\_GetFirstPciScanInfo()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a116da80ae462f6bdc26acfb95eb6467a.html#Documentationa00644_1a116da80ae462f6bdc26acfb95eb6467a) / [taf\_radio\_GetNextPciScanInfo()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a4d0eafe9a83ca822b011e29926ca8a3b.html#Documentationa00644_1a4d0eafe9a83ca822b011e29926ca8a3b) — Iterates PCI scan entries.
- [taf\_radio\_GetFirstPlmnInfo()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a9ff5f4afe5f3f9872d68d2eec7ed780a.html#Documentationa00644_1a9ff5f4afe5f3f9872d68d2eec7ed780a) / [taf\_radio\_GetNextPlmnInfo()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1ad3b5e840ae0c719371a6bd0c015abe15.html#Documentationa00644_1ad3b5e840ae0c719371a6bd0c015abe15) — Iterates PLMN IDs within a PCI scan entry.
- [taf\_radio\_GetPciScanCellId()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a916c71cea11f859cbf0284fb2bdb68de.html#Documentationa00644_1a916c71cea11f859cbf0284fb2bdb68de) — Gets the physical cell ID of a PCI scan entry.
- [taf\_radio\_GetPciScanGlobalCellId()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a7b84e3ee6823ea6f05d1b886c5dfd7c1.html#Documentationa00644_1a7b84e3ee6823ea6f05d1b886c5dfd7c1) — Gets the global cell ID of a PCI scan entry.
- [taf\_radio\_GetPciScanMccMnc()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1aeaf4f1eb2af07fae110e169c2e103112.html#Documentationa00644_1aeaf4f1eb2af07fae110e169c2e103112) — Gets the MCC and MNC of a PLMN in a PCI scan entry.

taf_radio_PciScanInformationListRef_t listRef =
        taf_radio_PerformPciNetworkScan(TAF_RADIO_RAT_BIT_MASK_LTE, phoneId);
    if (listRef == NULL)
    {
        LE_ERROR("PCI scan failed.");
    }
    else
    {
        taf_radio_PciScanInformationRef_t cellRef = taf_radio_GetFirstPciScanInfo(listRef);
        while (cellRef != NULL)
        {
            uint16_t pcid = taf_radio_GetPciScanCellId(cellRef);
            uint32_t gcid = taf_radio_GetPciScanGlobalCellId(cellRef);
            LE_INFO("PCI: %u, Global CID: %u", pcid, gcid);
            taf_radio_PlmnInformationRef_t plmnRef = taf_radio_GetFirstPlmnInfo(cellRef);
            while (plmnRef != NULL)
            {
                char mcc[TAF_RADIO_MCC_BYTES], mnc[TAF_RADIO_MNC_BYTES];
                if (taf_radio_GetPciScanMccMnc(plmnRef, mcc, sizeof(mcc),
                    mnc, sizeof(mnc)) == LE_OK)
                    LE_INFO("  PLMN: %s-%s", mcc, mnc);
                plmnRef = taf_radio_GetNextPlmnInfo(cellRef);
            }
            cellRef = taf_radio_GetNextPciScanInfo(listRef);
        }
        taf_radio_DeletePciNetworkScan(listRef);
    }
    Copy to clipboard

## Neighbor cells information

Users can get information about neighboring cells and subscribe to cell info changes.

- [taf\_radio\_GetNeighborCellsInfo()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a3e5a932df62e3a5998a9d742d61523de.html#Documentationa00644_1a3e5a932df62e3a5998a9d742d61523de) / [taf\_radio\_DeleteNeighborCellsInfo()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1aa888eeb34e5797e48617a4f23fa87fe7.html#Documentationa00644_1aa888eeb34e5797e48617a4f23fa87fe7) — Creates/deletes a neighbor cells information reference.
- [taf\_radio\_GetFirstNeighborCellInfo()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a30e6ca114bcceaaa89839b5dc88d75a4.html#Documentationa00644_1a30e6ca114bcceaaa89839b5dc88d75a4) / [taf\_radio\_GetNextNeighborCellInfo()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a3e572fac3bdcdbadc6e993aca5089531.html#Documentationa00644_1a3e572fac3bdcdbadc6e993aca5089531) — Iterates neighbor cell entries.
- [taf\_radio\_GetNeighborCellId()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1aaee0daa17550bac6bbfc037eca33d37d.html#Documentationa00644_1aaee0daa17550bac6bbfc037eca33d37d) — Gets the neighbor cell identity (64-bit).
- [taf\_radio\_GetNeighborCellLocAreaCode()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1aae4ab727459cde33a83434ead71b44ac.html#Documentationa00644_1aae4ab727459cde33a83434ead71b44ac) — Gets the neighbor cell location area code.
- [taf\_radio\_GetNeighborCellRxLevel()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1ab4a4462cdebef25ca16a6e078f41a8a2.html#Documentationa00644_1ab4a4462cdebef25ca16a6e078f41a8a2) — Gets the neighbor cell signal strength in dBm.
- [taf\_radio\_GetNeighborCellRat()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a93237f3351401f030bee17e1315a273a.html#Documentationa00644_1a93237f3351401f030bee17e1315a273a) — Gets the neighbor cell RAT.
- [taf\_radio\_GetPhysicalNeighborLteCellId()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1abe9d9fabc4fdfe86515c0b8c7c1405b3.html#Documentationa00644_1abe9d9fabc4fdfe86515c0b8c7c1405b3) — Gets the neighbor LTE physical cell ID.
- [taf\_radio\_GetPhysicalNeighborNrCellId()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a2ce8da0fd852e5bb88e530250cab3c7e.html#Documentationa00644_1a2ce8da0fd852e5bb88e530250cab3c7e) — Gets the neighbor NR5G physical cell ID.
- [taf\_radio\_GetNeighborCellGsmBsic()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a6b115d6d07c12a35de2cc9d833836df5.html#Documentationa00644_1a6b115d6d07c12a35de2cc9d833836df5) — Gets the neighbor GSM base station identity code.
- [taf\_radio\_AddCellInfoChangeHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a8a864009028cf489767ec68fc05ae5cf.html#Documentationa00644_1a8a864009028cf489767ec68fc05ae5cf) / [taf\_radio\_RemoveCellInfoChangeHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a92705511b541e0168a7eb1a93d80e278.html#Documentationa00644_1a92705511b541e0168a7eb1a93d80e278) — Adds/removes handler for cell information changes (serving/neighbor).

taf_radio_NeighborCellsRef_t ngbrRef = taf_radio_GetNeighborCellsInfo(phoneId);
    if (ngbrRef == NULL)
    {
        LE_ERROR("Failed to get neighbor cells info.");
    }
    else
    {
        taf_radio_CellInfoRef_t cellRef = taf_radio_GetFirstNeighborCellInfo(ngbrRef);
        while (cellRef != NULL)
        {
            taf_radio_Rat_t rat = taf_radio_GetNeighborCellRat(cellRef);
            uint64_t cellId = taf_radio_GetNeighborCellId(cellRef);
            int32_t rxLevel = taf_radio_GetNeighborCellRxLevel(cellRef);
            LE_INFO("Neighbor: RAT=%d, ID=%" PRIu64 ", RxLevel=%d dBm",
                rat, cellId, rxLevel);
            cellRef = taf_radio_GetNextNeighborCellInfo(ngbrRef);
        }
        taf_radio_DeleteNeighborCellsInfo(ngbrRef);
    }
    Copy to clipboard

## Network status

Users can get detailed network status including RAT service status and LTE CS capability. The network status reference is a per-phone cached object.

- [taf\_radio\_GetNetStatus()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1aaedc9bc1a17b669492c64671eb5794d9.html#Documentationa00644_1aaedc9bc1a17b669492c64671eb5794d9) — Gets the network status reference for a given phone.
- [taf\_radio\_GetRatSvcStatus()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a5da33fa97d4a5c3eafbfcca1e836aa91.html#Documentationa00644_1a5da33fa97d4a5c3eafbfcca1e836aa91) — Gets the RAT service status (no service, limited, service, limited regional, power save).
- [taf\_radio\_GetLteCsCap()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a37b706618e267b9af48f12bde06acbe2.html#Documentationa00644_1a37b706618e267b9af48f12bde06acbe2) — Gets the LTE CS capability (full service, CSFB not preferred, SMS only, limited, barred).
- [taf\_radio\_AddNetStatusChangeHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a8bbc3b32e7b3147af1b9d688e19289f3.html#Documentationa00644_1a8bbc3b32e7b3147af1b9d688e19289f3) / [taf\_radio\_RemoveNetStatusChangeHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1ac166a57224d363da256fdccd9b57c74f.html#Documentationa00644_1ac166a57224d363da256fdccd9b57c74f) — Adds/removes handler for network status changes (RAT service status, service domain, LTE CS capability).

taf_radio_NetStatusRef_t netRef = taf_radio_GetNetStatus(phoneId);
    if (netRef == NULL)
    {
        LE_ERROR("Failed to get network status reference.");
    }
    else
    {
        taf_radio_RatSvcStatus_t svcStatus;
        le_result_t res = taf_radio_GetRatSvcStatus(netRef, &svcStatus);
        if (res != LE_OK)
            LE_ERROR("Failed to get RAT service status: %d", res);
        else
            LE_INFO("RAT service status: %d", svcStatus);
    
        taf_radio_CsCap_t csCap;
        res = taf_radio_GetLteCsCap(netRef, &csCap);
        if (res != LE_OK)
            LE_ERROR("Failed to get LTE CS capability: %d", res);
        else
            LE_INFO("LTE CS capability: %d", csCap);
    }
    Copy to clipboard

## NR dual connectivity status

Users can get the EN-DC (E-UTRA NR Dual Connectivity) availability and DCNR restriction status.

- [taf\_radio\_GetNrDualConnectivityStatus()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a4374e79a59c643467a79b6ab828dd908.html#Documentationa00644_1a4374e79a59c643467a79b6ab828dd908) — Gets the ENDC availability and DCNR restriction.

taf_radio_NREndcAvailability_t endcAvail;
    taf_radio_NRDcnrRestriction_t dcnrRestrict;
    le_result_t res = taf_radio_GetNrDualConnectivityStatus(&endcAvail, &dcnrRestrict, phoneId);
    if (res != LE_OK)
        LE_ERROR("Failed to get NR dual connectivity status: %d", res);
    else
    {
        LE_INFO("ENDC availability: %d", endcAvail);
        LE_INFO("DCNR restriction: %d", dcnrRestrict);
    }
    Copy to clipboard

## Carrier Aggregation (CA) information

Users can get LTE Carrier Aggregation status and subscribe to CA information changes.

- [taf\_radio\_GetCAInformation()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a75801b14457e920d37407455da07d822.html#Documentationa00644_1a75801b14457e920d37407455da07d822) / [taf\_radio\_DeleteCAInformation()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1ab2f3c1762b2d4cac94723233cc4ea312.html#Documentationa00644_1ab2f3c1762b2d4cac94723233cc4ea312) — Creates/deletes a CA information reference. Currently only LTE (TAF\_RADIO\_RAT\_LTE) is supported.
- [taf\_radio\_GetLteCAStatus()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a0de2f7b9299906f4b733f69bb3482675.html#Documentationa00644_1a0de2f7b9299906f4b733f69bb3482675) — Gets the CA status (activated/deactivated) and the number of active component carriers.
- [taf\_radio\_AddCAInfoHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1afea6f8dc8d03214d805b381a73ef760d.html#Documentationa00644_1afea6f8dc8d03214d805b381a73ef760d) / [taf\_radio\_RemoveCAInfoHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1af2d390d71ab912178f0c9725ece53420.html#Documentationa00644_1af2d390d71ab912178f0c9725ece53420) — Adds/removes handler for CA information changes. Currently only LTE is supported.

taf_radio_CAInfoRef_t caRef;
    le_result_t res = taf_radio_GetCAInformation(phoneId, TAF_RADIO_RAT_LTE, &caRef);
    if (res != LE_OK)
        LE_ERROR("Failed to get CA information: %d", res);
    else
    {
        taf_radio_CAStatus_t status;
        uint32_t activeCCNum;
        res = taf_radio_GetLteCAStatus(caRef, &status, &activeCCNum);
        if (res != LE_OK)
            LE_ERROR("Failed to get LTE CA status: %d", res);
        else
            LE_INFO("CA status: %d, active CCs: %u", status, activeCCNum);
        taf_radio_DeleteCAInformation(caRef);
    }
    Copy to clipboard

## Connection status (ENDC)

Users can get and monitor the ENDC connection status (LTE+NR5G NSA availability).

- [taf\_radio\_GetConnStatus()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1ae1ee12fc20372dc52f6c087875c6ead9.html#Documentationa00644_1ae1ee12fc20372dc52f6c087875c6ead9) / [taf\_radio\_DeleteConnStatus()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1afc5eedd432ea3e2a4231d282c6281f9e.html#Documentationa00644_1afc5eedd432ea3e2a4231d282c6281f9e) — Creates/deletes a connection status reference.
- [taf\_radio\_GetEndcConnectionStatus()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1ab5a18dfac5511d9e0cd000cd8cf59c23.html#Documentationa00644_1ab5a18dfac5511d9e0cd000cd8cf59c23) — Gets the ENDC connection status from the reference.
- [taf\_radio\_AddConnectionStatusHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a8576b5af0c65875f82afde5ce37f3917.html#Documentationa00644_1a8576b5af0c65875f82afde5ce37f3917) / [taf\_radio\_RemoveConnectionStatusHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1ada78ea661957c9f97026ddd45d1ed43f.html#Documentationa00644_1ada78ea661957c9f97026ddd45d1ed43f) — Adds/removes handler for connection status changes.

taf_radio_ConnStatusRef_t connRef;
    le_result_t res = taf_radio_GetConnStatus(phoneId, &connRef);
    if (res != LE_OK)
        LE_ERROR("Failed to get connection status: %d", res);
    else
    {
        taf_radio_NREndcAvailability_t endcStatus;
        res = taf_radio_GetEndcConnectionStatus(connRef, &endcStatus);
        if (res != LE_OK)
            LE_ERROR("Failed to get ENDC connection status: %d", res);
        else
            LE_INFO("ENDC connection status: %d", endcStatus);
        taf_radio_DeleteConnStatus(connRef);
    }
    Copy to clipboard

## NR icon type

Users can get and monitor the NR icon type (5G basic or ultrawide band).

- [taf\_radio\_GetNrIconType()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a7600afbcbbb909756f55f323b38b67bf.html#Documentationa00644_1a7600afbcbbb909756f55f323b38b67bf) — Gets the NR icon type for the current serving cell.
- [taf\_radio\_AddNrIconTypeHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a7b5d7b00df4a47f91dca1387cb7c9d12.html#Documentationa00644_1a7b5d7b00df4a47f91dca1387cb7c9d12) / [taf\_radio\_RemoveNrIconTypeHandler()](https://docs.qualcomm.com/doc/80-41102-2/topic/function_a00644_1a54b6166caacf096fa17c25f53ee132dc.html#Documentationa00644_1a54b6166caacf096fa17c25f53ee132dc) — Adds/removes handler for NR icon type changes.

taf_radio_NrIconType_t iconType;
    le_result_t res = taf_radio_GetNrIconType(&iconType, phoneId);
    if (res != LE_OK)
        LE_ERROR("Failed to get NR icon type: %d", res);
    else
        LE_INFO("NR icon type: %d", iconType);
    
    static void NrIconTypeHandler(taf_radio_NrIconType_t type, uint8_t phoneId, void* contextPtr)
    {
        LE_INFO("NR icon type changed: %d on phone %d", type, phoneId);
    }
    taf_radio_NrIconTypeHandlerRef_t handlerRef =
        taf_radio_AddNrIconTypeHandler(
            (taf_radio_NrIconTypeHandlerFunc_t)NrIconTypeHandler, NULL);
    // ... later:
    taf_radio_RemoveNrIconTypeHandler(handlerRef);
    Copy to clipboard

Last Published: Jun 09, 2026

[Previous Topic
Power Management Service](https://docs.qualcomm.com/bundle/publicresource/80-41102-2/topics/page_c_tafpm.md) [Next Topic
SIM services](https://docs.qualcomm.com/bundle/publicresource/80-41102-2/topics/sim_services.md)