mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
Merge branch 'doc/fix_issues_from_general_review_v5.5' into 'release/v5.5'
fix some issues found by Opus 4.5(v5.5) See merge request espressif/esp-idf!46527
This commit is contained in:
@@ -282,7 +282,7 @@ Setting Coexistence Compile-time Options
|
||||
- :ref:`CONFIG_ESP_WIFI_RX_IRAM_OPT`: turning off this configuration option will reduce the IRAM memory by approximately 17 KB.
|
||||
- :ref:`CONFIG_LWIP_TCP_SND_BUF_DEFAULT`: reduce the default TX buffer size for TCP sockets.
|
||||
- :ref:`CONFIG_LWIP_TCP_WND_DEFAULT`: reduce the default size of the RX window for TCP sockets.
|
||||
- :ref:`CONFIG_LWIP_TCP_RECVMBOX_SIZE`: reduce the size of the TCP receive mailbox. Receive mailbox buffers data within active connections and handles data flow during connections。
|
||||
- :ref:`CONFIG_LWIP_TCP_RECVMBOX_SIZE`: reduce the size of the TCP receive mailbox. Receive mailbox buffers data within active connections and handles data flow during connections.
|
||||
- :ref:`CONFIG_LWIP_TCP_ACCEPTMBOX_SIZE`: reduce the size of the TCP accept mailbox. Accept mailbox queues incoming connection requests and manages the initiation of new connections.
|
||||
- :ref:`CONFIG_LWIP_UDP_RECVMBOX_SIZE`: reduce the size of the UDP receive mailbox.
|
||||
- :ref:`CONFIG_LWIP_TCPIP_RECVMBOX_SIZE`: reduce the size of TCPIP task receive mailbox.
|
||||
|
||||
@@ -51,7 +51,7 @@ Second, the time from powering up to powering down Wi-Fi related modules in a st
|
||||
- Time offset caused by clock accuracy. The main reason is that clocks may deviate from ideal time to some extent, and the deviation can be positive or negative.
|
||||
- Time spent processing missed beacon frames, such as the duration of continuous listening after a missed beacon, the maximum allowable number of missed beacons, etc. The existence and duration of this period are uncertain but can be configured within a range.
|
||||
- Active time added to ensure the reception of burst data packets, which can be determined by configuration.
|
||||
- ILDE time is required for specific power-saving modes to meet entry conditions. Therefore, reducing the working time can improve power performance while meeting communication requirements.
|
||||
- IDLE time is required for specific power-saving modes to meet entry conditions. Therefore, reducing the working time can improve power performance while meeting communication requirements.
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
|
||||
@@ -1412,7 +1412,7 @@ API :cpp:func:`esp_wifi_set_config()` can be used to configure the station. And
|
||||
* - threshold
|
||||
- The threshold is used to filter the found AP. If the RSSI or security mode is less than the configured threshold, the AP will be discarded.
|
||||
|
||||
If the RSSI is set to 0, it means the default threshold and the default RSSI threshold are -127 dBm. If the authmode threshold is set to 0, it means the default threshold and the default authmode threshold are open.
|
||||
If the RSSI is set to 0, it means the default threshold is used, and the default RSSI threshold is -127 dBm. If the authmode threshold is set to 0, it means the default threshold is used, and the default authmode threshold is open.
|
||||
|
||||
|
||||
.. attention::
|
||||
@@ -2113,7 +2113,7 @@ Refer ESP-IDF example :idf_file:`examples/wifi/roaming/README.md` to set up and
|
||||
|
||||
Fast BSS Transition
|
||||
---------------------------
|
||||
Fast BSS transition (802.11R FT), is a standard to permit continuous connectivity aboard wireless devices in motion, with fast and secure client transitions from one Basic Service Set (abbreviated BSS, and also known as a base station or more colloquially, an access point) to another performed in a nearly seamless manner **avoiding 802.1i 4 way handshake** . 802.11R specifies transitions between access points by redefining the security key negotiation protocol, allowing both the negotiation and requests for wireless resources to occur in parallel. The key derived from the server to be cached in the wireless network, so that a reasonable number of future connections can be based on the cached key, avoiding the 802.1X process
|
||||
Fast BSS transition (802.11R FT), is a standard to permit continuous connectivity aboard wireless devices in motion, with fast and secure client transitions from one Basic Service Set (abbreviated BSS, and also known as a base station or more colloquially, an access point) to another performed in a nearly seamless manner **avoiding 802.11i 4 way handshake**. 802.11R specifies transitions between access points by redefining the security key negotiation protocol, allowing both the negotiation and requests for wireless resources to occur in parallel. The key derived from the server to be cached in the wireless network, so that a reasonable number of future connections can be based on the cached key, avoiding the 802.1X process.
|
||||
|
||||
|
||||
{IDF_TARGET_NAME} station supports FT for WPA2-PSK networks. Do note that {IDF_TARGET_NAME} station only support FT over the air protocol only.
|
||||
|
||||
@@ -282,7 +282,7 @@ BLE MESH 共存状态描述
|
||||
- :ref:`CONFIG_ESP_WIFI_RX_IRAM_OPT` 选择关闭此配置选项,关闭此配置选项将会减少大约 17 KB 的 IRAM 内存。
|
||||
- :ref:`CONFIG_LWIP_TCP_SND_BUF_DEFAULT` 选择减小 TCP 套接字默认发送缓存区。
|
||||
- :ref:`CONFIG_LWIP_TCP_WND_DEFAULT` 选择减小 TCP 套接字默认接收窗口。
|
||||
- :ref:`CONFIG_LWIP_TCP_RECVMBOX_SIZE` 可配置减小 TCP 接收邮箱。接受邮箱负责缓冲 TCP 连接中的数据,确保数据流畅传输。
|
||||
- :ref:`CONFIG_LWIP_TCP_RECVMBOX_SIZE` 可配置减小 TCP 接收邮箱。接收邮箱负责缓冲 TCP 连接中的数据,确保数据流畅传输。
|
||||
- :ref:`CONFIG_LWIP_TCP_ACCEPTMBOX_SIZE` 管理传入的连接请求,可配置减小 TCP 接受邮箱。接受邮箱负责管理传入的连接请求,促进建立新的 TCP 连接。
|
||||
- :ref:`CONFIG_LWIP_UDP_RECVMBOX_SIZE` 选择减小 UDP 接收邮箱。
|
||||
- :ref:`CONFIG_LWIP_TCPIP_RECVMBOX_SIZE` 选择减小 TCPIP 任务接收邮箱。
|
||||
|
||||
@@ -50,8 +50,8 @@ Wi-Fi 省电的基本原理
|
||||
|
||||
- 时钟准确性导致的 time offset,主要原因是时钟或多或少都会与理想的时间存在偏移,同时偏移的正负不定。
|
||||
- 处理 beacon 漏听后的时间,如漏听后持续监听时间、允许最多丢失 beacon 数目等,这段时间存不存在以及存在多久都不定,但是可以配置范围。
|
||||
- 为了确保能够接受突发数据包而添加的 active 时间,可由配置决定。
|
||||
- ILDE 时间是具体某些功耗模式进入条件要求。因此在满足通信需求的情况下,降低工作时间可以改善功耗表现。
|
||||
- 为了确保能够接收突发数据包而添加的 active 时间,可由配置决定。
|
||||
- IDLE 时间是具体某些功耗模式进入条件要求。因此在满足通信需求的情况下,降低工作时间可以改善功耗表现。
|
||||
|
||||
.. code-block:: text
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ Wi-Fi 驱动程序
|
||||
|
||||
- :example:`wifi/scan` 演示如何扫描可用的 AP,配置扫描设置,并显示扫描结果。
|
||||
|
||||
- :example:`wifi/fast_scan` 演示如何执行快速和全通道扫描,查找附近的 AP,设置信号强度的阈值和认证模式,并根据信号强度和认证模式连接到最合适的 AP。
|
||||
- :example:`wifi/fast_scan` 演示如何执行快速和全信道扫描,查找附近的 AP,设置信号强度的阈值和认证模式,并根据信号强度和认证模式连接到最合适的 AP。
|
||||
|
||||
- :example:`wifi/wps` 演示如何使用 WPS 入网功能,简化连接 Wi-Fi 路由器的过程,支持 PIN 或 PBC 模式。
|
||||
|
||||
@@ -575,7 +575,7 @@ Wi-Fi 驱动程序初始化成功后,可以进入到配置阶段。该场景
|
||||
- 全信道后端主动扫描
|
||||
- 全信道后端被动扫描
|
||||
- 全信道前端主动扫描
|
||||
- 全信道后端被动扫描
|
||||
- 全信道前端被动扫描
|
||||
- 特定信道后端主动扫描
|
||||
- 特定信道后端被动扫描
|
||||
- 特定信道前端主动扫描
|
||||
@@ -1414,7 +1414,7 @@ API :cpp:func:`esp_wifi_set_config()` 可用于配置 station。配置的参数
|
||||
* - threshold
|
||||
- 该字段用来筛选找到的 AP,如果 AP 的 RSSI 或安全模式小于配置的阈值,则不会被连接。
|
||||
|
||||
如果 RSSI 设置为 0,则表示默认阈值、默认 RSSI 阈值为 -127 dBm。如果 authmode 阈值设置为 0,则表示默认阈值,默认 authmode 阈值无授权。
|
||||
如果 RSSI 设置为 0,则表示默认阈值,默认 RSSI 阈值为 -127 dBm。如果 authmode 阈值设置为 0,则表示默认阈值,默认 authmode 阈值无授权。
|
||||
|
||||
|
||||
.. attention::
|
||||
@@ -2648,11 +2648,11 @@ Wi-Fi 80211 数据包发送
|
||||
|
||||
如果 Wi-Fi 模式是 station 模式,MAC 的地址 1 是 station 所连 AP 的 MAC,地址 2 是 station 接口的 MAC,那么就称数据包是从 station 发送到 AP。另一方面,如果 Wi-Fi 模式是 AP 模式,且 MAC 地址 1 是该 AP 所连 station 的 MAC,地址 2 是 AP 接口的 MAC,那么就称数据包是从 AP 发送到 station。为避免与 Wi-Fi 连接冲突,可采用以下检查方法:
|
||||
|
||||
- 如果数据包类型是数据,且是从 station 发送到 AP,IEEE 802.11 Frame control 字段中的 ToDS 位应该为 1,FromDS 位为 0,否则,Wi-Fi 驱动程序不接受该数据包。
|
||||
- 如果数据包类型是数据,且是从 station 发送到 AP,IEEE 802.11 Frame control 字段中的 ToDS 位应该为 1,FromDS 位为 0。否则,Wi-Fi 驱动程序将丢弃该数据包。
|
||||
|
||||
- 如果数据包类型是数据,且是从 AP 发送到 station,IEEE 802.11 Frame control 字段中的 ToDS 位应该为 0,FromDS 位为 1,否则,Wi-Fi 驱动程序不接受该数据包。
|
||||
- 如果数据包类型是数据,且是从 AP 发送到 station,IEEE 802.11 Frame control 字段中的 ToDS 位应该为 0,FromDS 位为 1。否则,Wi-Fi 驱动程序将丢弃该数据包。
|
||||
|
||||
- 如果数据包是从 station 发送到 AP,或从 AP 到 station,Power Management、More Data 和 Re-Transmission 位应该为 0,否则,Wi-Fi 驱动程序不接受该数据包。
|
||||
- 如果数据包是从 station 发送到 AP,或从 AP 到 station,Power Management、More Data 和 Re-Transmission 位应该为 0。否则,Wi-Fi 驱动程序将丢弃该数据包。
|
||||
|
||||
如果任何检查失败,将返回 ``ESP_ERR_INVALID_ARG``。
|
||||
|
||||
@@ -2718,7 +2718,7 @@ Wi-Fi 多根天线
|
||||
- 总字节数指 len 字段。
|
||||
- 每个长训练字段 (LTF) 类型对应的 CSI 数据存储在从 buf 字段开始的缓冲区中。每个元素以两个字节的形式存储:虚部和实部。每个元素的顺序与表中的子载波相同。LTF 的顺序是 LLTF、HT-LTF 和 STBC-HT-LTF。但是,根据信道和数据包的信息,3 个 LTF 可能都不存在(见上文)。
|
||||
- 如果 :cpp:type:`wifi_csi_info_t` 的 first_word_invalid 字段为 true,表示由于 {IDF_TARGET_NAME} 的硬件限制,CSI 数据的前四个字节无效。
|
||||
- 更多信息,如 RSSI,射频的噪声底,接收时间和天线 rx_ctrl 领域。
|
||||
- 更多信息,如 RSSI、射频底噪声、接收时间及天线,请参见 rx_ctrl 字段。
|
||||
|
||||
子载波的虚部和实部的使用请参考下表。
|
||||
|
||||
@@ -2966,7 +2966,7 @@ Wi-Fi 使用的堆内存峰值是 Wi-Fi 驱动程序 **理论上消耗的最大
|
||||
如何提高 Wi-Fi 性能
|
||||
----------------------------------
|
||||
|
||||
{IDF_TARGET_NAME} Wi-Fi 的性能受许多参数的影响,各参数之间存在相互制约。如果配置地合理,不仅可以提高性能,还可以增加应用程序的可用内存,提高稳定性。
|
||||
{IDF_TARGET_NAME} Wi-Fi 的性能受许多参数的影响,各参数之间存在相互制约。如果配置得合理,不仅可以提高性能,还可以增加应用程序的可用内存,提高稳定性。
|
||||
|
||||
在本节中,我们将简单介绍 Wi-Fi/LWIP 协议栈的工作模式,并说明各个参数的作用。我们将推荐几种配置等级,你可以根据使用场景选择合适的等级。
|
||||
|
||||
@@ -3001,7 +3001,7 @@ Wi-Fi 使用的堆内存峰值是 Wi-Fi 驱动程序 **理论上消耗的最大
|
||||
该参数表示接收端 AMPDU BA 窗口的大小,应配置为 :ref:`CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM` 和 :ref:`CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM` 的二倍数值中较小的数值。
|
||||
|
||||
- :ref:`CONFIG_LWIP_TCP_WND_DEFAULT`
|
||||
该参数表示 LWIP 层用于每个 TCP 流的的接收数据缓冲区大小,应配置为 WIFI_DYNAMIC_RX_BUFFER_NUM (KB) 的值,从而实现高稳定性能。同时,在有多个流的情况下,应相应降低该参数值。
|
||||
该参数表示 LWIP 层用于每个 TCP 流的接收数据缓冲区大小,应配置为 WIFI_DYNAMIC_RX_BUFFER_NUM (KB) 的值,从而实现高稳定性能。同时,在有多个流的情况下,应相应降低该参数值。
|
||||
|
||||
**发送数据方向:**
|
||||
|
||||
@@ -3012,7 +3012,7 @@ Wi-Fi 使用的堆内存峰值是 Wi-Fi 驱动程序 **理论上消耗的最大
|
||||
该参数表示 Wi-Fi 层发送数据缓冲区数量。提高该参数可以增强数据包发送的性能。该参数值需要与 LWIP 层的发送数据缓冲区大小相匹配。
|
||||
|
||||
- :ref:`CONFIG_LWIP_TCP_SND_BUF_DEFAULT`
|
||||
该参数表示 LWIP 层用于每个 TCP 流的的发送数据缓冲区大小,应配置为 WIFI_DYNAMIC_TX_BUFFER_NUM (KB) 的值,从而实现高稳定性能。在有多个流的情况下,应相应降低该参数值。
|
||||
该参数表示 LWIP 层用于每个 TCP 流的发送数据缓冲区大小,应配置为 WIFI_DYNAMIC_TX_BUFFER_NUM (KB) 的值,从而实现高稳定性能。在有多个流的情况下,应相应降低该参数值。
|
||||
|
||||
**通过在 IRAM 中放置代码优化吞吐量:**
|
||||
|
||||
|
||||
@@ -230,7 +230,7 @@ ESP-WIFI-MESH 将在禁用自组网时尝试维护节点的当前 Wi-Fi 状态
|
||||
ESP-WIFI-MESH 将尝试在启用自组网时保持节点的当前 Wi-Fi 状态。但是,根据节点类型以及是否选择了新的父节点,节点的 Wi-Fi 状态可能会发生变化。下表显示了启用自组网的效果。
|
||||
|
||||
+----------------+--------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| 是否选择父节点 | 是否为根结点 | 作用 |
|
||||
| 是否选择父节点 | 是否为根节点 | 作用 |
|
||||
+----------------+--------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| N | N | 已连接到父节点的节点将保持连接。 |
|
||||
| | +------------------------------------------------------------------------------------------------------------------------+
|
||||
@@ -238,13 +238,13 @@ ESP-WIFI-MESH 将尝试在启用自组网时保持节点的当前 Wi-Fi 状态
|
||||
| +--------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| | Y | 已连接到路由器的根节点将保持连接。 |
|
||||
| | +------------------------------------------------------------------------------------------------------------------------+
|
||||
| | | 从路由器断开的根结点需调用 :cpp:func:`esp_mesh_connect` 进行重连。 |
|
||||
| | | 从路由器断开的根节点需调用 :cpp:func:`esp_mesh_connect` 进行重连。 |
|
||||
+----------------+--------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| Y | N | 没有父节点的节点将自动选择首选父节点并连接。 |
|
||||
| | +------------------------------------------------------------------------------------------------------------------------+
|
||||
| | | 已连接到父节点的节点将断开连接,重新选择首选父节点并进行重连。 |
|
||||
| +--------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
| | Y | 根结点在连接至父节点前必须放弃“根结点”的角色。因此,根节点将断开与路由器和所有子节点的连接,选择首选父节点并进行连接。 |
|
||||
| | Y | 根节点在连接至父节点前必须放弃“根节点”的角色。因此,根节点将断开与路由器和所有子节点的连接,选择首选父节点并进行连接。 |
|
||||
+----------------+--------------+------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
下方代码片段展示了如何启用自组网功能。
|
||||
|
||||
@@ -9,8 +9,8 @@ Wi-Fi 库
|
||||
Wi-Fi 库支持配置及监控 {IDF_TARGET_NAME} Wi-Fi 连网功能。支持配置:
|
||||
|
||||
- station 模式(即 STA 模式或 Wi-Fi 客户端模式),此时 {IDF_TARGET_NAME} 连接到接入点 (AP)。
|
||||
- AP 模式(即 Soft-AP 模式或接入点模式),此时基站连接到 {IDF_TARGET_NAME}。
|
||||
- station/AP 共存模式({IDF_TARGET_NAME} 既是接入点,同时又作为基站连接到另外一个接入点)。
|
||||
- AP 模式(即 Soft-AP 模式或接入点模式),此时 station 连接到 {IDF_TARGET_NAME}。
|
||||
- station/AP 共存模式({IDF_TARGET_NAME} 既是接入点,同时又作为 station 连接到另外一个接入点)。
|
||||
|
||||
- 上述模式的各种安全模式(WPA、WPA2、WPA3 等)。
|
||||
- 扫描接入点(包括主动扫描及被动扫描)。
|
||||
|
||||
Reference in New Issue
Block a user