diff --git a/docs/en/api-guides/wifi-security.rst b/docs/en/api-guides/wifi-security.rst index b5de91f3386..b7a601957c8 100644 --- a/docs/en/api-guides/wifi-security.rst +++ b/docs/en/api-guides/wifi-security.rst @@ -163,12 +163,12 @@ Enhanced Open™ is used for providing security and privacy to users connecting Setting up OWE with {IDF_TARGET_NAME} ++++++++++++++++++++++++++++++++++++++ -For station mode : +For station mode: A configuration option :ref:`CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA` and configuration parameter :cpp:type:`owe_enabled` in :cpp:type:`wifi_sta_config_t` is provided to enable OWE support for the station. To use OWE transition mode, along with the configuration provided above, `authmode` from :cpp:type:`wifi_scan_threshold_t` should be set to ``WIFI_AUTH_OPEN``. -For softap mode : +For SoftAP mode: A configuration option :ref:`CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_SOFTAP` from menuconfig should be enabled and configuration parameter `authmode` from :cpp:type:`wifi_ap_config_t` should be set to ``WIFI_AUTH_OWE``. SoftAP does not support OWE Transition Mode; configure ``WIFI_AUTH_OWE`` only. @@ -183,13 +183,13 @@ To use this feature, enable configuration option :ref:`CONFIG_ESP_WIFI_STA_RANDO .. note:: - The `CONFIG_ESP_WIFI_STA_RANDOM_MAC_AUTO_RESET_INTERVAL` will only generate and set new random mac address when station is not connected to any AP. If the station is connected to any AP, the connection will not be interrupted and same random mac will be used. If the periodic auto-reset timer expires while the station is in the connected state, the timer will be armed/triggered at the next disconnect. + The :ref:`CONFIG_ESP_WIFI_STA_RANDOM_MAC_AUTO_RESET_INTERVAL` will only generate and set new random mac address when station is not connected to any AP. If the station is connected to any AP, the connection will not be interrupted and same random mac will be used. If the periodic auto-reset timer expires while the station is in the connected state, the timer will be armed/triggered at the next disconnect. - For every new connection request, new random mac will be generated and auto reset time interval will be reset if `CONFIG_ESP_WIFI_STA_RANDOM_MAC_ENABLED` is enabled. + For every new connection request, new random mac will be generated and auto reset time interval will be reset if :ref:`CONFIG_ESP_WIFI_STA_RANDOM_MAC_ENABLED` is enabled. PMK caching is not supported when MAC randomization is enabled, as the device's identity changes with each connection attempt. - MAC Address Randomization is not supported and will not work when Wi-Fi Mesh or ESP-NOW is enabled/used. + MAC address randomization is not supported and will not work when Wi-Fi Mesh or ESP-NOW is enabled. {IDF_TARGET_NAME} supports MAC randomization while scanning when @@ -201,7 +201,7 @@ To use this feature, enable configuration option :ref:`CONFIG_ESP_WIFI_STA_RANDO {IDF_TARGET_NAME} supports MAC randomization while connecting when - enable configuration option :ref:`CONFIG_ESP_WIFI_STA_RANDOM_MAC_ENABLED` from menuconfig - - new wifi configuration is set using esp_wifi_set_config() + - new wifi configuration is set using :cpp:func:`esp_wifi_set_config` -To get the mac address, please use API :cpp:func:`esp_err_t esp_wifi_get_mac(wifi_interface_t ifx, uint8_t mac[6]);` +To get the MAC address, please use API :cpp:func:`esp_wifi_get_mac`. diff --git a/docs/zh_CN/api-guides/wifi-security.rst b/docs/zh_CN/api-guides/wifi-security.rst index f27ed93be62..54f4de881d7 100644 --- a/docs/zh_CN/api-guides/wifi-security.rst +++ b/docs/zh_CN/api-guides/wifi-security.rst @@ -39,7 +39,6 @@ API 及用法 为最大限度地利用 PMF 的额外安全性优势,已弃用 ``pmf_cfg`` 中的 ``capable`` 标志,并在内部设置为 ``true``。 - 企业级 Wi-Fi ---------------------- @@ -164,8 +163,15 @@ API 及用法 在 {IDF_TARGET_NAME} 上设置 OWE ++++++++++++++++++++++++++++++++++++++ +station 模式: + 配置选项 :ref:`CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA` 和 :cpp:type:`wifi_sta_config_t` 中的配置参数 :cpp:type:`owe_enabled` 可以为 station 模式启用 OWE 支持。除上述配置外,请将 :cpp:type:`wifi_scan_threshold_t` 中的 `authmode` 设置为 ``WIFI_AUTH_OPEN`` 以使用 OWE 过渡模式。 + +SoftAP 模式: + +需通过 menuconfig 启用配置选项 :ref:`CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_SOFTAP`,并将 :cpp:type:`wifi_ap_config_t` 中的配置参数 `authmode` 设置为 ``WIFI_AUTH_OWE``。SoftAP 不支持 OWE 过渡模式,请仅配置 ``WIFI_AUTH_OWE``。 + MAC 地址随机化 -------------------------- @@ -173,26 +179,23 @@ MAC 地址用于设备连接 Wi-Fi 网络。由于 MAC 地址具有唯一且静 要使用此功能,请在 menuconfig 中启用配置选项 :ref:`CONFIG_ESP_WIFI_STA_RANDOM_MAC_ENABLED`。 -{IDF_TARGET_NAME} 还支持通过 menuconfig 选项 :ref:`CONFIG_ESP_WIFI_STA_RANDOM_MAC_AUTO_RESET_INTERVAL` 在一段时间后自动重置随机 MAC 地址。 - - 如果间隔时间 = 0,则禁用自动重置功能(同一随机 MAC 地址会一直使用到下次重启)。 - 如果间隔时间 > 24,则使用默认的 12 小时间隔。 +{IDF_TARGET_NAME} 还会在未连接网络时,定期自动重置 station 的随机 MAC 地址。重置周期通过 menuconfig 中的 :ref:`CONFIG_ESP_WIFI_STA_RANDOM_MAC_AUTO_RESET_INTERVAL` 选项配置(有效范围:1 至 24 小时,默认值为 12 小时)。 .. note:: - 仅当 station 未连接到任何 AP 时,`CONFIG_ESP_WIFI_STA_RANDOM_MAC_AUTO_RESET_INTERVAL` 才会生成并设置新的随机 MAC 地址。如果 station 已连接到 AP,则不会中断连接,并会继续使用相同的随机 MAC 地址。如果定期自动重置定时器在 station 处于连接状态时超时,定时器将在下一次断开连接时被重新装载/触发。 + 仅当 station 未连接到任何 AP 时,:ref:`CONFIG_ESP_WIFI_STA_RANDOM_MAC_AUTO_RESET_INTERVAL` 才会生成并设置新的随机 MAC 地址。如果 station 已连接到 AP,则不会中断连接,并会继续使用相同的随机 MAC 地址。如果定期自动重置定时器在 station 处于连接状态时超时,定时器将在下一次断开连接时被重新装载或触发。 - 如果启用了 `CONFIG_ESP_WIFI_STA_RANDOM_MAC_ENABLED`,每次发起新的连接请求时都会生成新的随机 MAC 地址,并重置自动重置时间间隔。 + 如果启用了 :ref:`CONFIG_ESP_WIFI_STA_RANDOM_MAC_ENABLED`,每次发起新的连接请求时都会生成新的随机 MAC 地址,并重置自动重置时间间隔。 启用 MAC 地址随机化后,不支持 PMK 缓存,因为设备身份会随每次连接尝试而变化。 - 在使用或启用 Wi-Fi Mesh 或 ESP-NOW 时,不支持且无法使用 MAC 地址随机化功能。 + 在启用 Wi-Fi Mesh 或 ESP-NOW 时,不支持且无法使用 MAC 地址随机化功能。 {IDF_TARGET_NAME} 在满足以下条件时支持扫描过程中的 MAC 地址随机化: - 在 menuconfig 中启用配置选项 :ref:`CONFIG_ESP_WIFI_STA_RANDOM_MAC_ENABLED` - - scan_type 为 :cpp:enumerator:`WIFI_SCAN_TYPE_ACTIVE` + - 扫描类型为 :cpp:enumerator:`WIFI_SCAN_TYPE_ACTIVE` - station 未连接到任何 AP {IDF_TARGET_NAME} 在满足以下条件时支持连接过程中的 MAC 地址随机化: