This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3100 - sl_WlanGet not returning the correct RSSI

The function sl_WlanGet ALWAYS returns a RSSI value of -95dB.

Here is the code running inside of the wlan_station example, after the connection with the AP is established:

   int16_t                  status = -1;
    SlGetRxStatResponse_t    rxStatResp;
    slWlanScanParamCommand_t ScanParamConfig;
    uint16_t                 Option = WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS;
    uint16_t                 OptionLen = sizeof(slWlanScanParamCommand_t);

    status =  sl_WlanGet(SL_WLAN_CFG_GENERAL_PARAM_ID ,&Option,&OptionLen,(unsigned char *)&ScanParamConfig);
    if(status < 0)
    {
        returnStatus = -1;
    }
    else
    {
        *rssi = ScanParamConfig.rssiThershold;
    }

Do you have any comments on how to read the correct RSSI value?

We do not want to use the function sl_WlanGetNetworkList() because it requires to much computational effort and consequently battery power. sl_WlanGetNetworkList() works fine though. 

Thank you!

  • Hi,

    Reason of your issue is simple. You use wrong API. Your code returns configuration (scan threshold) instead current RSSI value. Default value of this threshold is set to -95.

    To read current RSSI you need to use this API:

    SlGetRxStatResponse_t rssiRxStat;

    int rssiDataAct; if (sl_WlanRxStatGet(&rssiRxStat, 0) == 0) { if (rssiRxStat.AvarageDataCtrlRssi != 0) { rssiDataAct = rssiRxStat.AvarageDataCtrlRssi; } } else { rssiDataAct = -99; }

    In this case is RSSI value counted from data packets. If you call this API every 5 sec, then you will have RSSI from previous 5 sec.


    Jan