From 4fd34e5e4c9498b36185bd80d69dfd133a9ba10b Mon Sep 17 00:00:00 2001 From: Sajia Date: Thu, 24 Jul 2025 18:43:54 +0530 Subject: [PATCH 1/3] fix(wifi): Add bss max idle timer and protected keep alive fixes --- components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld | 2 +- components/esp_wifi/include/esp_wifi_types_generic.h | 2 +- components/esp_wifi/lib | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld index 1178331f39b..a9758072119 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld @@ -80,7 +80,7 @@ tsf_hal_set_tbtt_start_time = 0x40001f38; ieee80211_ampdu_reorder = 0x40001fb0; ieee80211_encap_esfbuf = 0x40001fb8; ieee80211_output_process = 0x40001fc4; -sta_input = 0x40001fcc; +//sta_input = 0x40001fcc; ieee80211_classify = 0x40001fe0; ieee80211_crypto_decap = 0x40001ff8; //ieee80211_ccmp_decrypt = 0x4000200c; diff --git a/components/esp_wifi/include/esp_wifi_types_generic.h b/components/esp_wifi/include/esp_wifi_types_generic.h index 502f345de57..21bee273742 100644 --- a/components/esp_wifi/include/esp_wifi_types_generic.h +++ b/components/esp_wifi/include/esp_wifi_types_generic.h @@ -521,7 +521,7 @@ typedef enum { * @brief Configuration structure for BSS max idle */ typedef struct { - uint16_t period; /**< Sets BSS Max idle period (1 Unit = 1000TUs OR 1.024 Seconds). If there are no frames for this period from a STA, SoftAP will disassociate due to inactivity. Setting it to 0 disables the feature */ + uint16_t period; /**< Sets BSS Max idle period (1 Unit = 1000TUs OR 1.024 Seconds). If there are no frames for this period from a STA, SoftAP will disassociate due to inactivity. Setting it to 0 disables the feature. Minimum value will be 10 */ bool protected_keep_alive; /**< Requires clients to use protected keep alive frames for BSS Max Idle period */ } wifi_bss_max_idle_config_t; diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 4faf5f1e9f1..9a2f1c6ccba 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 4faf5f1e9f1254042771b2ec46028f5c5c8d36c6 +Subproject commit 9a2f1c6ccba624fdd29362a16b70a8dc6c7d4d98 From 1edf75c9cf52330d06f97da1939066a8454a521a Mon Sep 17 00:00:00 2001 From: muhaidong Date: Mon, 2 Mar 2026 14:19:23 +0800 Subject: [PATCH 2/3] fix(wifi): fix arp and dns affect signaling test issue 1. fix arp and dns affects signaling test issue 2. improve ap chnnel parameter documentation 3. fix set country change ap channel issue 4. fix beacon timeout too long issue 5. only unicast frames count as keep-alive --- components/esp_wifi/include/esp_wifi_types_generic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_wifi/include/esp_wifi_types_generic.h b/components/esp_wifi/include/esp_wifi_types_generic.h index 21bee273742..218dd06cbce 100644 --- a/components/esp_wifi/include/esp_wifi_types_generic.h +++ b/components/esp_wifi/include/esp_wifi_types_generic.h @@ -532,7 +532,7 @@ typedef struct { uint8_t ssid[32]; /**< SSID of soft-AP. If ssid_len field is 0, this must be a Null terminated string. Otherwise, length is set according to ssid_len. */ uint8_t password[64]; /**< Password of soft-AP. */ uint8_t ssid_len; /**< Optional length of SSID field. */ - uint8_t channel; /**< Channel of soft-AP */ + uint8_t channel; /**< Channel of soft-AP. Set to 0 for auto selection (min channel: typically 1 for 2.4G, 36 for 5G). Other invalid values return ESP_ERR_INVALID_ARG. */ wifi_auth_mode_t authmode; /**< Auth mode of soft-AP. Do not support AUTH_WEP, AUTH_WAPI_PSK and AUTH_OWE in soft-AP mode. When the auth mode is set to WPA2_PSK, WPA2_WPA3_PSK or WPA3_PSK, the pairwise cipher will be overwritten with WIFI_CIPHER_TYPE_CCMP by default, unless explicitly set. */ uint8_t ssid_hidden; /**< Broadcast SSID or not, default 0, broadcast the SSID */ uint8_t max_connection; /**< Max number of stations allowed to connect in */ From b67963103acbed372bb970ec18e6736824ea8f5a Mon Sep 17 00:00:00 2001 From: muhaidong Date: Sat, 21 Mar 2026 16:16:20 +0800 Subject: [PATCH 3/3] fix(wifi): fix fail case connection with bss max idle enabled --- .../esp_wifi/test_apps/wifi_connect/main/test_bss_max_idle.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/esp_wifi/test_apps/wifi_connect/main/test_bss_max_idle.c b/components/esp_wifi/test_apps/wifi_connect/main/test_bss_max_idle.c index 0ca728dae96..d8fd71295a4 100644 --- a/components/esp_wifi/test_apps/wifi_connect/main/test_bss_max_idle.c +++ b/components/esp_wifi/test_apps/wifi_connect/main/test_bss_max_idle.c @@ -63,7 +63,8 @@ typedef u16 __bitwise be16; #define WIFI_FAIL (1<<3) #define EMPH_STR(s) "****** "s" ******" -#define MAX_IDLE_PERIOD (5) +//For station, max idle period is default 10 (1000TUs) +#define MAX_IDLE_PERIOD (10) #define ETHTYPE_IP 0x0800 static const char* TAG = "test_bss_max_idle";