From 5a09cf600efa80362a19415b4f2c9c83f84d60b1 Mon Sep 17 00:00:00 2001 From: liu zhifu Date: Mon, 30 Mar 2020 21:44:59 +0800 Subject: [PATCH] esp32: add esp_wifi_internal_statistic_dump() The API is used to dump WiFi lmac/hmac/wpa key statistics, which is helpful for WiFi issue debugging. The application need to call the API at the moment potential problem happens, such as: 1. When receiving WiFi disconnect event 2. When receiving IP lost event 3. When sockets failed, such as TX or RX timeout etc 4. Any other places that the application suspect the WiFi works incorrectly --- components/esp32/include/esp_wifi_internal.h | 11 +++++++++++ components/esp32/lib | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/components/esp32/include/esp_wifi_internal.h b/components/esp32/include/esp_wifi_internal.h index 468a180937..f70de329ec 100644 --- a/components/esp32/include/esp_wifi_internal.h +++ b/components/esp32/include/esp_wifi_internal.h @@ -318,6 +318,17 @@ esp_err_t esp_wifi_internal_set_log_mod(wifi_log_module_t module, uint32_t submo */ esp_err_t esp_wifi_internal_get_log(wifi_log_level_t *log_level, uint32_t *log_mod); +/** + * @brief Dump WiFi key statistic counters + * + * @attention Application can call this API at the points that potential error happens, + * such as, WiFi disconnect, IP lost, socket fail etc. + * + * @return + * - ESP_OK: succeed + */ +esp_err_t esp_wifi_internal_statistic_dump(void); + #ifdef __cplusplus } #endif diff --git a/components/esp32/lib b/components/esp32/lib index 0148006b1a..eb22764d37 160000 --- a/components/esp32/lib +++ b/components/esp32/lib @@ -1 +1 @@ -Subproject commit 0148006b1a060034185df5c54f7dd07a45e27034 +Subproject commit eb22764d374d6b11396fd338af5ff3bc21efd947