Просмотр исходного кода

esp_wifi:

1. Modify LR for esp32
2. Optimize some debug logs for probe response
3. Optimize phy and soc files
4. Fix the bug that no event for connect
5. Fix the bug that set_channel doesn't work for softAP
6. Add sta connect again ap sent disconnect event
7. Add set/get inactive time api
8. Fix connect hidden AP doesn't update information
9. Add rf test long short support
zhangyanjiao 5 лет назад
Родитель
Сommit
0a8abf6ffe
2 измененных файлов с 34 добавлено и 1 удалено
  1. 33 0
      components/esp_wifi/include/esp_wifi.h
  2. 1 1
      components/esp_wifi/lib_esp32

+ 33 - 0
components/esp_wifi/include/esp_wifi.h

@@ -1090,6 +1090,39 @@ esp_err_t esp_wifi_set_ant(const wifi_ant_config_t *config);
   */
 esp_err_t esp_wifi_get_ant(wifi_ant_config_t *config);
 
+/**
+  * @brief     Set the inactive time of the ESP32 STA or AP
+  *
+  * @attention 1. For Station, If the station does not receive a beacon frame from the connected SoftAP during the inactive time,
+  *               disconnect from SoftAP. Default 6s.
+  * @attention 2. For SoftAP, If the softAP doesn't receive any data from the connected STA during inactive time,
+  *               the softAP will force deauth the STA. Default is 300s.
+  * @attention 3. The inactive time configuration is not stored into flash
+  *
+  * @param     ifx  interface to be configured.
+  * @param     sec  Inactive time. Unit seconds.
+  *
+  * @return
+  *    - ESP_OK: succeed
+  *    - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
+  *    - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
+  *    - ESP_ERR_WIFI_ARG: invalid argument, For Station, if sec is less than 3. For SoftAP, if sec is less than 10.
+  */
+esp_err_t esp_wifi_set_inactive_time(wifi_interface_t ifx, uint16_t sec);
+
+/**
+  * @brief     Get inactive time of specified interface
+  *
+  * @param     ifx  Interface to be configured.
+  * @param     sec  Inactive time. Unit seconds.
+  *
+  * @return
+  *    - ESP_OK: succeed
+  *    - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
+  *    - ESP_ERR_WIFI_ARG: invalid argument
+  */
+esp_err_t esp_wifi_get_inactive_time(wifi_interface_t ifx, uint16_t *sec);
+
 #ifdef __cplusplus
 }
 #endif

+ 1 - 1
components/esp_wifi/lib_esp32

@@ -1 +1 @@
-Subproject commit 96f30622f9f5ff35470bcd61ffa697f8f32ac144
+Subproject commit afbe070254ced57b6dae169aa46405457fcb362a