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!