From 277f0f4470435eab99843c4c5b24912c4bc68971 Mon Sep 17 00:00:00 2001 From: zhangyanjiao Date: Thu, 6 Jul 2023 14:35:56 +0800 Subject: [PATCH] feat(wifi): Add API to get RSSI info after station connects to AP - Add esp_wifi_sta_get_rssi() function to retrieve RSSI info after station connects to AP --- components/esp_wifi/include/esp_wifi.h | 16 +++++++++++++++- components/esp_wifi/lib | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/components/esp_wifi/include/esp_wifi.h b/components/esp_wifi/include/esp_wifi.h index 4cdc1fb7d4..e62469fc72 100644 --- a/components/esp_wifi/include/esp_wifi.h +++ b/components/esp_wifi/include/esp_wifi.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -1364,6 +1364,20 @@ esp_err_t esp_wifi_sta_get_negotiated_phymode(wifi_phy_mode_t *phymode); */ esp_err_t esp_wifi_set_dynamic_cs(bool enabled); +/** + * @brief Get the rssi info after station connected to AP + * + * @attention This API should be called after station connected to AP. + * + * @param rssi store the rssi info received from last beacon. + * + * @return + * - ESP_OK: succeed + * - ESP_ERR_INVALID_ARG: invalid argument + * - ESP_FAIL: failed + */ +esp_err_t esp_wifi_sta_get_rssi(int *rssi); + #ifdef __cplusplus } #endif diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index fd77ffcf8e..019806ed40 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit fd77ffcf8e56ad5c9ea85d635f40ce63134101b0 +Subproject commit 019806ed40c268eb87438d7afcb5452ba4c3e70f