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.
RSSI level from AP connected to the ESP station.
Re: RSSI level from AP connected to the ESP station.
It is already working.
Re: RSSI level from AP connected to the ESP station.
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.
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.
Re: RSSI level from AP connected to the ESP station.
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;
/** @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: Bing [Bot], Majestic-12 [Bot] and 90 guests