Hi,
I need RSSI value from the connected AP, for this, I use the below code
SlDeviceGetStat_t deviceRXStat; int ret = 0; ret = sl_DeviceStatStart(0); // start statistics mode - only one mode can be use in parallel (as described above) if (ret != 0) { AS_LOG(AS_LOG_INFO, "[CTRL] sl_DeviceStatStart failed = %d",ret); } sleep(1); // sleep for 1 sec ret = sl_DeviceStatGet(SL_DEVICE_STAT_WLAN_RX, sizeof(SlDeviceGetStat_t), &deviceRXStat); if (ret != 0) { AS_LOG(AS_LOG_INFO, "[CTRL] sl_DeviceStatGet failed = %d",ret); }
ret = sl_DeviceStatStop(0); if (ret != 0) { AS_LOG(AS_LOG_INFO, "[CTRL] sl_DeviceStatStop failed = %d",ret); }
AS_LOG(AS_LOG_INFO, "[CTRL] RSSI = %d",deviceRXStat.AvarageDataCtrlRssi);
I run this routine in every 5 minutes but i got RSSI = 0 Value every time.
But, If I use only
sl_DeviceStatGet(SL_DEVICE_STAT_WLAN_RX, sizeof(SlDeviceGetStat_t), &deviceRXStat);
I got the correct value.
So my question is which method is correct to get RSSI value?
If there is any other method or better approch to get the RSSI value then let me know.
I use Below SDK and service pack
SDK : simplelink_cc32xx_sdk_3_20_00_06
Service pack: sp_4.7.0.3_3.1.0.5_3.1.0.26