Merge branch 'docs/update_aplication_wifi' into 'master'

docs: update application examples for wifi.rst

See merge request espressif/esp-idf!32214
This commit is contained in:
Zhang Xiao Yan 2024-09-02 14:02:51 +08:00
commit 8c8e9ae546
2 changed files with 62 additions and 2 deletions

View File

@ -74,6 +74,34 @@ Generally, the most effective way to begin your own Wi-Fi application is to sele
This article is supplementary to the Wi-Fi APIs/Examples. It describes the principles of using the Wi-Fi APIs, the limitations of the current Wi-Fi API implementation, and the most common pitfalls in using Wi-Fi. This article also reveals some design details of the Wi-Fi driver. We recommend you to select an :example:`example <wifi>`.
- :example:`wifi/getting_started/station` demonstrates how to use the station functionality to connect to an AP.
- :example:`wifi/getting_started/softAP` demonstrates how to use the SoftAP functionality to configure {IDF_TARGET_NAME} as an AP.
- :example:`wifi/scan` demonstrates how to scan for available APs, configure the scan settings, and display the scan results.
- :example:`wifi/fast_scan` demonstrates how to perform fast and all channel scans for nearby APs, set thresholds for signal strength and authentication modes, and connect to the best fitting AP based on signal strength and authentication mode.
- :example:`wifi/wps` demonstrates how to use the WPS enrollee feature to simplify the process of connecting to a Wi-Fi router, with options for PIN or PBC modes.
- :example:`wifi/wps_softap_registrar` demonstrates how to use the WPS registrar feature on SoftAP mode, simplifying the process of connecting to a Wi-Fi SoftAP from a station.
- :example:`wifi/smart_config` demonstrates how to use the smartconfig feature to connect to a target AP using the ESPTOUCH app.
- :example:`wifi/power_save` demonstrates how to use the power save mode in station mode.
- :example:`wifi/softap_sta` demonstrates how to configure {IDF_TARGET_NAME} to function as both an AP and a station simultaneously, effectively enabling it to act as a Wi-Fi NAT router.
- :example:`wifi/iperf` demonstrates how to implement the protocol used by the iPerf performance measurement tool, allowing for performance measurement between two chips or between a single chip and a computer running the iPerf tool, with specific instructions for testing station/soft-AP TCP/UDP RX/TX throughput.
- :example:`wifi/roaming/roaming_app` demonstrates how to use the Wi-Fi Roaming App functionality to efficiently roam between compatible APs.
- :example:`wifi/roaming/roaming_11kvr` demonstrates how to implement roaming using 11k and 11v APIs.
.. only:: SOC_WIFI_HE_SUPPORT
- :example:`wifi/itwt` demonstrates how to use the iTWT feature, which only works in station mode and under different power save modes, with commands for setup, teardown, and suspend, and also shows the difference in current consumption when iTWT is enabled or disabled.
Setting Wi-Fi Compile-time Options
++++++++++++++++++++++++++++++++++++
@ -1671,7 +1699,7 @@ Wi-Fi Easy Connect™ (DPP)
Wi-Fi Easy Connect\ :sup:`TM` (or Device Provisioning Protocol) is a secure and standardized provisioning protocol for configuring Wi-Fi devices. More information can be found in :doc:`esp_dpp <../api-reference/network/esp_dpp>`.
WPA2-Enterprise
+++++++++++++++++++++++++++++++++
---------------
WPA2-Enterprise is the secure authentication mechanism for enterprise wireless networks. It uses RADIUS server for authentication of network users before connecting to the Access Point. The authentication process is based on 802.1X policy and comes with different Extended Authentication Protocol (EAP) methods such as TLS, TTLS, and PEAP. RADIUS server authenticates the users based on their credentials (username and password), digital certificates, or both. When {IDF_TARGET_NAME} in station mode tries to connect an AP in enterprise mode, it sends authentication request to AP which is sent to RADIUS server by AP for authenticating the station. Based on different EAP methods, the parameters can be set in configuration which can be opened using ``idf.py menuconfig``. WPA2_Enterprise is supported by {IDF_TARGET_NAME} only in station mode.

View File

@ -27,6 +27,10 @@ Wi-Fi 驱动程序
- 支持多个天线
- 支持获取信道状态信息
.. only:: SOC_WIFI_NAN_SUPPORT
- Wi-Fi Aware (NAN)
.. only:: esp32c6
- 支持 4 个虚拟接口,即 STA、AP、Sniffer 和 reserved。
@ -70,6 +74,34 @@ Wi-Fi 驱动程序
本文将补充说明 Wi-Fi API 和 Wi-Fi 示例的相关信息,重点描述使用 Wi-Fi API 的原则、当前 Wi-Fi API 实现的限制以及使用 Wi-Fi 时的常见错误。同时,本文还介绍了 Wi-Fi 驱动程序的一些设计细节。建议选择一个示例 :example:`example <wifi>` 进行参考。
- :example:`wifi/getting_started/station` 演示如何使用 station 功能连接到 AP。
- :example:`wifi/getting_started/softAP` 演示如何使用 SoftAP 功能将 {IDF_TARGET_NAME} 配置为 AP。
- :example:`wifi/scan` 演示如何扫描可用的 AP配置扫描设置并显示扫描结果。
- :example:`wifi/fast_scan` 演示如何执行快速和全通道扫描,查找附近的 AP设置信号强度的阈值和认证模式并根据信号强度和认证模式连接到最合适的 AP。
- :example:`wifi/wps` 演示如何使用 WPS 入网功能,简化连接 Wi-Fi 路由器的过程,支持 PIN 或 PBC 模式。
- :example:`wifi/wps_softap_registrar` 演示如何在 SoftAP 模式下使用 WPS 注册器功能,从而简化从 station 连接到 Wi-Fi SoftAP 的过程。
- :example:`wifi/smart_config` 演示如何使用 smartconfig 功能通过 ESPTOUCH 应用连接到目标 AP。
- :example:`wifi/power_save` 演示如何使用 station 模式的省电模式。
- :example:`wifi/softap_sta` 演示如何配置 {IDF_TARGET_NAME} 同时用作 AP 和 station从而可将其用作 Wi-Fi NAT 路由器。
- :example:`wifi/iperf` 演示如何实现 iPerf 性能测量工具所使用的协议,允许在两个芯片之间或在单个芯片和运行 iPerf 工具的计算机之间进行性能测量,并提供测试 station/SoftAP TCP/UDP RX/TX 吞吐量的具体说明。
- :example:`wifi/roaming/roaming_app` 演示如何使用 Wi-Fi Roaming App 功能,在兼容的 AP 之间高效漫游。
- :example:`wifi/roaming/roaming_11kvr` 演示如何使用 11k 和 11v API 实现漫游功能。
.. only:: SOC_WIFI_HE_SUPPORT
- :example:`wifi/itwt` 演示如何使用 iTWT 功能,该功能仅在 station 模式下工作,并在不同的省电模式下提供设置、拆卸和挂起的命令,还展示了启用和禁用 iTWT 时的电流消耗差异。
设置 Wi-Fi 编译时选项
++++++++++++++++++++++++++++++++++++
@ -1667,7 +1699,7 @@ Wi-Fi Easy Connect™ (DPP)
Wi-Fi Easy Connect\ :sup:`TM` (也称为设备配置协议)是一个安全且标准化的配置协议,用于配置 Wi-Fi 设备。更多信息请参考 :doc:`esp_dpp <../api-reference/network/esp_dpp>`
WPA2-Enterprise
+++++++++++++++++++++++++++++++++
---------------
WPA2-Enterprise 是企业无线网络的安全认证机制。在连接到接入点之前,它使用 RADIUS 服务器对网络用户进行身份验证。身份验证过程基于 802.1X 标准,并有不同的扩展身份验证协议 (EAP) 方法,如 TLS、TTLS、PEAP 等。RADIUS 服务器根据用户的凭据(用户名和密码)、数字证书或两者对用户进行身份验证。当处于 station 模式的 {IDF_TARGET_NAME} 尝试连接到企业模式的 AP 时,它会向 AP 发送身份验证请求AP 会将该请求发送到 RADIUS 服务器以对 station 进行身份验证。根据不同的 EAP 方式,可以通过 ``idf.py menuconfig`` 打开配置,并在配置中设置参数。{IDF_TARGET_NAME} 仅在 station 模式下支持 WPA2_Enterprise。