|
|
@@ -163,9 +163,9 @@ WIFI_EVENT_STA_DISCONNECTED
|
|
|
++++++++++++++++++++++++++++++++++++
|
|
|
This event can be generated in the following scenarios:
|
|
|
|
|
|
- - When esp_wifi_disconnect(), or esp_wifi_stop(), or esp_wifi_deinit(), or esp_wifi_restart() is called and the station is already connected to the AP.
|
|
|
- - When esp_wifi_connect() is called, but the Wi-Fi driver fails to set up a connection with the AP due to certain reasons, e.g. the scan fails to find the target AP, authentication times out, etc. If there are more than one AP with the same SSID, the disconnected event is raised after the station fails to connect all of the found APs.
|
|
|
- - When the Wi-Fi connection is disrupted because of specific reasons, e.g., the station continuously loses N beacons, the AP kicks off the station, the AP's authentication mode is changed, etc.
|
|
|
+ - When :cpp:func:`esp_wifi_disconnect()`, or :cpp:func:`esp_wifi_stop()`, or :cpp:func:`esp_wifi_deinit()` is called and the station is already connected to the AP.
|
|
|
+ - When :cpp:func:`esp_wifi_connect()` is called, but the Wi-Fi driver fails to set up a connection with the AP due to certain reasons, e.g. the scan fails to find the target AP, authentication times out, etc. If there are more than one AP with the same SSID, the disconnected event is raised after the station fails to connect all of the found APs.
|
|
|
+ - When the Wi-Fi connection is disrupted because of specific reasons, e.g., the station continuously loses N beacons, the AP kicks off the station, the AP's authentication mode is changed, etc.
|
|
|
|
|
|
Upon receiving this event, the default behavior of the event task is:
|
|
|
- Shuts down the station's LwIP netif.
|
|
|
@@ -224,8 +224,8 @@ WIFI_EVENT_AP_STADISCONNECTED
|
|
|
++++++++++++++++++++++++++++++++++++
|
|
|
This event can happen in the following scenarios:
|
|
|
|
|
|
- - The application calls esp_wifi_disconnect(), or esp_wifi_deauth_sta(), to manually disconnect the station.
|
|
|
- - The Wi-Fi driver kicks off the station, e.g. because the AP has not received any packets in the past five minutes, etc.
|
|
|
+ - The application calls :cpp:func:`esp_wifi_disconnect()`, or esp_wifi_deauth_sta(), to manually disconnect the station.
|
|
|
+ - The Wi-Fi driver kicks off the station, e.g. because the AP has not received any packets in the past five minutes, etc. The time can be modified by :cpp:func:`esp_wifi_set_inactive_time`.
|
|
|
- The station kicks off the AP.
|
|
|
|
|
|
When this event happens, the event task will do nothing, but the application event callback needs to do something, e.g., close the socket which is related to this station, etc.
|
|
|
@@ -1444,7 +1444,7 @@ In maximum power save mode, station wakes up every listen interval to receive be
|
|
|
|
|
|
Call ``esp_wifi_set_ps(WIFI_PS_MIN_MODEM)`` to enable Modem-sleep minimum power save mode or ``esp_wifi_set_ps(WIFI_PS_MAX_MODEM)`` to enable Modem-sleep maximum power save mode after calling :cpp:func:`esp_wifi_init`. When station connects to AP, Modem-sleep will start. When station disconnects from AP, Modem-sleep will stop.
|
|
|
|
|
|
-Call ``esp_wifi_set_ps(WIFI_PS_NONE)`` to disable modem sleep entirely. This has much higher power consumption, but provides minimum latency for receiving Wi-Fi data in real time. When modem sleep is enabled, received Wi-Fi data can be delayed for as long as the DTIM period (minimum power save mode) or the listen interval (maximum power save mode).
|
|
|
+Call ``esp_wifi_set_ps(WIFI_PS_NONE)`` to disable modem sleep entirely. This has much higher power consumption, but provides minimum latency for receiving Wi-Fi data in real time. When modem sleep is enabled, received Wi-Fi data can be delayed for as long as the DTIM period (minimum power save mode) or the listen interval (maximum power save mode). Disabling modem sleep entirely is not possible for Wi-Fi and Bluetooth coexist mode.
|
|
|
|
|
|
The default Modem-sleep mode is WIFI_PS_MIN_MODEM.
|
|
|
|
|
|
@@ -1491,9 +1491,7 @@ When the throughput is tested by iperf example, the sdkconfig is :idf_file:`exam
|
|
|
Wi-Fi 80211 Packet Send
|
|
|
---------------------------
|
|
|
|
|
|
-**Important notes: The API esp_wifi_80211_tx is not available in IDF 2.1, but will be so in the upcoming release.**
|
|
|
-
|
|
|
-The esp_wifi_80211_tx API can be used to:
|
|
|
+The :cpp:func:`esp_wifi_80211_tx` API can be used to:
|
|
|
|
|
|
- Send the beacon, probe request, probe response, action frame.
|
|
|
- Send the non-QoS data frame.
|
|
|
@@ -1842,6 +1840,7 @@ The peak heap memory that Wi-Fi consumes is the **theoretically-maximum memory**
|
|
|
- the maximum packet size that the Wi-Fi driver can send: wifi_tx_pkt_size_max
|
|
|
|
|
|
So, the peak memory that the Wi-Fi driver consumes can be calculated with the following formula:
|
|
|
+
|
|
|
wifi_dynamic_peek_memory = (wifi_rx_dynamic_buf_num * wifi_rx_pkt_size_max) + (wifi_tx_dynamic_buf_num * wifi_tx_pkt_size_max)
|
|
|
|
|
|
Generally, we do not need to care about the dynamic tx long buffers and dynamic tx long long buffers, because they are management frames which only have a small impact on the system.
|