RSSI level from AP connected to the ESP station.

filipESP
Posts: 74
Joined: Tue Nov 06, 2018 12:42 pm

RSSI level from AP connected to the ESP station.

Postby filipESP » Thu Feb 21, 2019 8:49 am

I try to get RSSI level using esp_wifi_sta_get_ap_info( wifi_ap_record_t *ap_info ) function. I read the RSSI level like this:
1. create wifi_ap_record_t ap_info variable
2.call esp_wifi_sta_get_ap_info()
3. read value, uint8_t tx_power = ap_info->rssi;
The tx_power variable is 0 all time.

filipESP
Posts: 74
Joined: Tue Nov 06, 2018 12:42 pm

Re: RSSI level from AP connected to the ESP station.

Postby filipESP » Thu Feb 21, 2019 12:28 pm

It is already working. :)

bojanj
Posts: 2
Joined: Sun Sep 29, 2019 4:43 pm

Re: RSSI level from AP connected to the ESP station.

Postby bojanj » Sun Sep 29, 2019 5:11 pm

Does anyone know how to read RSSI of stations connected to ESP Access Point? According to information I have found on internet this should be possible by the use of esp_wifi_set_vendor_ie_cb function but I can’t get it working with Arduino. It crashes ESP. Does someone have a working example? Here is the code that does nothing but crashing ESP:

void cb (void *ctx, wifi_vendor_ie_type_t type, const uint8_t sa [6], const vendor_ie_data_t *vnd_ie, int rssi) {
return;
}
esp_err_t eet = esp_wifi_set_vendor_ie_cb (cb, NULL);

I'm getting: Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.

filipESP
Posts: 74
Joined: Tue Nov 06, 2018 12:42 pm

Re: RSSI level from AP connected to the ESP station.

Postby filipESP » Mon Sep 30, 2019 10:45 am

In esp_wifi_types.h there is a struct:

/** @brief Description of STA associated with AP */
typedef struct {
uint8_t mac[6]; /**< mac address */
int8_t rssi; /**< current average rssi of sta connected */
uint32_t phy_11b:1; /**< bit: 0 flag to identify if 11b mode is enabled or not */
uint32_t phy_11g:1; /**< bit: 1 flag to identify if 11g mode is enabled or not */
uint32_t phy_11n:1; /**< bit: 2 flag to identify if 11n mode is enabled or not */
uint32_t phy_lr:1; /**< bit: 3 flag to identify if low rate is enabled or not */
uint32_t reserved:28; /**< bit: 4..31 reserved */
} wifi_sta_info_t;

Who is online

Users browsing this forum: No registered users and 106 guests