How to calculate RSSI of Received Packets

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

How to calculate RSSI of Received Packets

Postby Ritesh » Wed Feb 15, 2017 6:35 am

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.
Regards,
Ritesh Prajapati

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: How to calculate RSSI of Received Packets

Postby WiFive » Wed Feb 15, 2017 7:39 am


Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: How to calculate RSSI of Received Packets

Postby Ritesh » Wed Feb 15, 2017 12:47 pm

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.
Regards,
Ritesh Prajapati

tobewinner
Posts: 30
Joined: Thu Dec 10, 2015 5:27 am

Re: How to calculate RSSI of Received Packets

Postby tobewinner » Thu Aug 03, 2017 2:21 am

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?

Staubgeborener
Posts: 20
Joined: Sat Jul 22, 2017 11:59 am

Re: How to calculate RSSI of Received Packets

Postby Staubgeborener » Thu Aug 03, 2017 9:17 am


tobewinner
Posts: 30
Joined: Thu Dec 10, 2015 5:27 am

Re: How to calculate RSSI of Received Packets

Postby tobewinner » Sat Aug 05, 2017 7:00 am

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.

Who is online

Users browsing this forum: No registered users and 100 guests