Merge branch 'bugfix/ftm_fixes_logging_change_v4.3' into 'release/v4.3'
wifi/ftm: Move FTM report logging into application and some bugfixes (Backport v4.3) See merge request espressif/esp-idf!13218
This commit is contained in:
@@ -349,42 +349,22 @@ menu "Wi-Fi"
|
||||
help
|
||||
The maximum time that wifi keep alive, unit: seconds.
|
||||
|
||||
config ESP_WIFI_FTM_ENABLE
|
||||
bool "WiFi FTM"
|
||||
default n
|
||||
depends on (IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3)
|
||||
help
|
||||
Enable feature Fine Timing Measurement for calculating WiFi Round-Trip-Time (RTT).
|
||||
|
||||
config ESP_WIFI_FTM_INITIATOR_SUPPORT
|
||||
bool "FTM Initiator support"
|
||||
default y
|
||||
depends on (IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3)
|
||||
|
||||
config ESP_WIFI_FTM_REPORT_LOG_ENABLE
|
||||
bool "FTM Report logging"
|
||||
default n
|
||||
depends on ESP_WIFI_FTM_INITIATOR_SUPPORT
|
||||
help
|
||||
Select this option to get a detailed report of FTM Procedure with raw values
|
||||
|
||||
config ESP_WIFI_FTM_REPORT_SHOW_RTT
|
||||
depends on ESP_WIFI_FTM_REPORT_LOG_ENABLE
|
||||
bool "Show RTT values"
|
||||
default y
|
||||
|
||||
config ESP_WIFI_FTM_REPORT_SHOW_DIAG
|
||||
depends on ESP_WIFI_FTM_REPORT_LOG_ENABLE
|
||||
bool "Show dialog tokens"
|
||||
default y
|
||||
|
||||
config ESP_WIFI_FTM_REPORT_SHOW_T1T2T3T4
|
||||
depends on ESP_WIFI_FTM_REPORT_LOG_ENABLE
|
||||
bool "Show T1 to T4"
|
||||
default y
|
||||
|
||||
config ESP_WIFI_FTM_REPORT_SHOW_RSSI
|
||||
depends on ESP_WIFI_FTM_REPORT_LOG_ENABLE
|
||||
bool "Show RSSI levels"
|
||||
default y
|
||||
depends on ESP_WIFI_FTM_ENABLE
|
||||
|
||||
config ESP_WIFI_FTM_RESPONDER_SUPPORT
|
||||
bool "FTM Responder support"
|
||||
default y
|
||||
depends on (IDF_TARGET_ESP32S2 || IDF_TARGET_ESP32C3)
|
||||
depends on ESP_WIFI_FTM_ENABLE
|
||||
|
||||
config ESP_WIFI_STA_DISCONNECTED_PM_ENABLE
|
||||
bool "Power Management for station at disconnected"
|
||||
|
||||
@@ -72,17 +72,6 @@ typedef enum {
|
||||
WIFI_LOG_MODULE_MESH, /*logs related to Mesh*/
|
||||
} wifi_log_module_t;
|
||||
|
||||
/**
|
||||
* @brief FTM Report log levels configuration
|
||||
*
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t show_rtt:1; /**< Display all valid Round-Trip-Time readings for FTM frames */
|
||||
uint8_t show_diag:1; /**< Display dialogue tokens for all FTM frames with valid readings */
|
||||
uint8_t show_t1t2t3t4:1;/**< Display all valid T1, T2, T3, T4 readings considered while calculating RTT */
|
||||
uint8_t show_rxrssi:1; /**< Display RSSI for each FTM frame with valid readings */
|
||||
} ftm_report_log_level_t;
|
||||
|
||||
/**
|
||||
* @brief WiFi log submodule definition
|
||||
*
|
||||
@@ -598,17 +587,6 @@ void esp_wifi_set_sleep_delay_time(uint32_t return_to_sleep_delay);
|
||||
*/
|
||||
void esp_wifi_set_keep_alive_time(uint32_t keep_alive_time);
|
||||
|
||||
/**
|
||||
* @brief Set FTM Report log level
|
||||
*
|
||||
* @param log_lvl Log levels configuration
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: succeed
|
||||
* - ESP_ERR_NOT_SUPPORTED: No FTM support
|
||||
*/
|
||||
esp_err_t esp_wifi_set_ftm_report_log_level(ftm_report_log_level_t *log_lvl);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -233,6 +233,7 @@ typedef struct {
|
||||
uint8_t max_connection; /**< Max number of stations allowed to connect in, default 4, max 10 */
|
||||
uint16_t beacon_interval; /**< Beacon interval which should be multiples of 100. Unit: TU(time unit, 1 TU = 1024 us). Range: 100 ~ 60000. Default value: 100 */
|
||||
wifi_cipher_type_t pairwise_cipher; /**< pairwise cipher of SoftAP, group cipher will be derived using this. cipher values are valid starting from WIFI_CIPHER_TYPE_TKIP, enum values before that will be considered as invalid and default cipher suites(TKIP+CCMP) will be used. Valid cipher suites in softAP mode are WIFI_CIPHER_TYPE_TKIP, WIFI_CIPHER_TYPE_CCMP and WIFI_CIPHER_TYPE_TKIP_CCMP. */
|
||||
bool ftm_responder; /**< Enable FTM Responder mode */
|
||||
} wifi_ap_config_t;
|
||||
|
||||
/** @brief STA configuration settings for the ESP32 */
|
||||
|
||||
Submodule components/esp_wifi/lib updated: 85cc831811...465f98ecb5
@@ -290,22 +290,6 @@ esp_err_t esp_wifi_init(const wifi_init_config_t *config)
|
||||
}
|
||||
adc2_cal_include(); //This enables the ADC2 calibration constructor at start up.
|
||||
|
||||
#ifdef CONFIG_ESP_WIFI_FTM_REPORT_LOG_ENABLE
|
||||
ftm_report_log_level_t log_lvl = {0};
|
||||
#ifdef CONFIG_ESP_WIFI_FTM_REPORT_SHOW_RTT
|
||||
log_lvl.show_rtt = 1;
|
||||
#endif
|
||||
#ifdef CONFIG_ESP_WIFI_FTM_REPORT_SHOW_DIAG
|
||||
log_lvl.show_diag = 1;
|
||||
#endif
|
||||
#ifdef CONFIG_ESP_WIFI_FTM_REPORT_SHOW_T1T2T3T4
|
||||
log_lvl.show_t1t2t3t4 = 1;
|
||||
#endif
|
||||
#ifdef CONFIG_ESP_WIFI_FTM_REPORT_SHOW_RSSI
|
||||
log_lvl.show_rxrssi = 1;
|
||||
#endif
|
||||
esp_wifi_set_ftm_report_log_level(&log_lvl);
|
||||
#endif
|
||||
esp_wifi_config_info();
|
||||
return result;
|
||||
}
|
||||
@@ -344,3 +328,10 @@ void set_xpd_sar(bool en)
|
||||
adc_power_release();
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef CONFIG_ESP_WIFI_FTM_ENABLE
|
||||
void ieee80211_ftm_attach(void)
|
||||
{
|
||||
/* Do not remove, stub to overwrite weak link in Wi-Fi Lib */
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user