Page 1 of 1

How to calculate RSSI of Received Packets

Posted: Wed Feb 15, 2017 6:35 am
by Ritesh
Hi,

I have created one sample example in which one ESP32 based board is started into AP mode while another board is started into STA mode and transfered some packets between each other.

I want to calculate RSSI of total received packets on receiver side and for that I have checked into SDK but not found proper API for that. I just found following code to get AP RSSI.

Code: Select all

wifi_ap_record_t wifidata;
if (esp_wifi_sta_get_ap_info(&wifidata)==0)
{
	printf("************** rssi:%d\r\n", wifidata.rssi);
}
So, I think above code will just give Signal Strength of AP mode device with which device will be connected. So, Is there any way or any APIs to decode received packets into MAC Layer from Application to check RSSI and LQI of each packets received?

Let me correct if I am wrong.

Re: How to calculate RSSI of Received Packets

Posted: Wed Feb 15, 2017 7:39 am
by WiFive

Re: How to calculate RSSI of Received Packets

Posted: Wed Feb 15, 2017 12:47 pm
by Ritesh
WiFive wrote:You can try promiscuous mode
https://github.com/espressif/esp-idf/bl ... pes.h#L192

Hi,

Thanks for Reply.

Do you have any example or sample code read RSSI of Packet Received into that promiscuous mode?

If yes then please provide that sample code or link for that which will be helpful to test RSSI on ESP32 chip based board.

Re: How to calculate RSSI of Received Packets

Posted: Thu Aug 03, 2017 2:21 am
by tobewinner
Ritesh wrote:
WiFive wrote:You can try promiscuous mode
https://github.com/espressif/esp-idf/bl ... pes.h#L192

Hi,

Thanks for Reply.

Do you have any example or sample code read RSSI of Packet Received into that promiscuous mode?

If yes then please provide that sample code or link for that which will be helpful to test RSSI on ESP32 chip based board.
I have the same question. The rssi i got form esp_wifi_sta_get_ap_info doesn't change with distance.
when i move the esp32 closer to the ap, the rssi i got is same as the previous one.
How do you get the real rssi at running?

Re: How to calculate RSSI of Received Packets

Posted: Thu Aug 03, 2017 9:17 am
by Staubgeborener

Re: How to calculate RSSI of Received Packets

Posted: Sat Aug 05, 2017 7:00 am
by tobewinner
Staubgeborener wrote:Maybe this can help:
https://gist.github.com/Staubgeborener/ ... b81c158576
Thanks, however my esp32 works in sta mode, is it possible to get the real time rssi in sta mode?
In ESP8266_RTOS_SDK, i can use wifi_station_get_rssi to get the real time rssi.