From f12debf4f563c63969884a1910dcd9dec956ffc7 Mon Sep 17 00:00:00 2001 From: Kapil Gupta Date: Thu, 25 Sep 2025 10:40:22 +0530 Subject: [PATCH] fix(esp_wifi): Updated some documentation --- .../en/migration-guides/release-6.x/6.0/wifi.rst | 2 ++ docs/zh_CN/api-reference/network/esp_now.rst | 14 ++------------ .../migration-guides/release-6.x/6.0/wifi.rst | 2 ++ tools/idf_py_actions/hints.yml | 16 +++++++++++++++- 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/docs/en/migration-guides/release-6.x/6.0/wifi.rst b/docs/en/migration-guides/release-6.x/6.0/wifi.rst index 4c97bfa034..9ac822cbcc 100644 --- a/docs/en/migration-guides/release-6.x/6.0/wifi.rst +++ b/docs/en/migration-guides/release-6.x/6.0/wifi.rst @@ -27,6 +27,8 @@ Removed Variables, Macros and Enum Values - **Wi-Fi Interface:** The header file :project_file:`components/esp_wifi/include/esp_interface.h` has been removed. The ``wifi_interface_t`` enum is now defined in :project_file:`components/esp_wifi/include/esp_wifi_types_generic.h`. The enum values (e.g. ``WIFI_IF_STA``, ``WIFI_IF_AP``) are no longer defined based on ``ESP_IF_WIFI_STA``, ``ESP_IF_WIFI_AP``, etc. +- **Wi-Fi Disconnection Reasons:** The disconnection reason codes ``WIFI_REASON_ASSOC_EXPIRE``, ``WIFI_REASON_NOT_AUTHED``, and ``WIFI_REASON_NOT_ASSOCED`` have been removed. Please use ``WIFI_REASON_AUTH_EXPIRE``, ``WIFI_REASON_CLASS2_FRAME_FROM_NONAUTH_STA``, and ``WIFI_REASON_CLASS3_FRAME_FROM_NONASSOC_STA`` respectively. + - **NAN:** - Field ``svc_info`` from structures ``wifi_nan_publish_cfg_t``, ``wifi_nan_subscribe_cfg_t``, ``wifi_nan_followup_params_t``, ``wifi_event_ndp_indication_t``, ``wifi_event_ndp_confirm_t`` has been removed. Please use the equivalent fields ``ssi`` and ``ssi_len`` instead. - Field ``peer_svc_info`` from structure ``wifi_event_nan_receive_t`` has been removed. Please use the equivalent fields ``ssi`` and ``ssi_len`` instead. diff --git a/docs/zh_CN/api-reference/network/esp_now.rst b/docs/zh_CN/api-reference/network/esp_now.rst index 35348adf6e..0d1c0d6023 100644 --- a/docs/zh_CN/api-reference/network/esp_now.rst +++ b/docs/zh_CN/api-reference/network/esp_now.rst @@ -126,19 +126,9 @@ ESP-NOW 数据可以从 Station 或 SoftAP 接口发送。确保在发送 ESP-NO 相反,将必要的数据发布到队列,并交给优先级较低的任务处理。 配置 ESP-NOW 速率 ----------------------- +------------------- -.. only:: esp32 or esp32s2 or esp32s3 or esp32c2 or esp32c3 - - 调用 :cpp:func:`esp_wifi_config_espnow_rate()` 配置指定接口的 ESP-NOW 速率。确保在配置速率之前启用接口。这个 API 应该在 :cpp:func:`esp_wifi_start()` 之后调用。 - -.. only:: esp32c5 or esp32c6 - - 调用 :cpp:func:`esp_now_set_peer_rate_config()` 配置指定 peer 的 ESP-NOW 速率。确保在配置速率之前添加 peer。这个 API 应该在 :cpp:func:`esp_wifi_start()` 和 :cpp:func:`esp_now_add_peer()` 之后调用。 - - .. note:: - - :cpp:func:`esp_wifi_config_espnow_rate()` 已弃用,请使用 :cpp:func:`esp_now_set_peer_rate_config()` +调用 :cpp:func:`esp_now_set_peer_rate_config()` 配置每个 peer 的 ESP-NOW 速率。请确保在配置速率之前添加 peer。此 API 应在 :cpp:func:`esp_wifi_start()` 和 :cpp:func:`esp_now_add_peer()` 之后调用。 配置 ESP-NOW 功耗参数 ---------------------- diff --git a/docs/zh_CN/migration-guides/release-6.x/6.0/wifi.rst b/docs/zh_CN/migration-guides/release-6.x/6.0/wifi.rst index 57ab9eaeee..2cdb265657 100644 --- a/docs/zh_CN/migration-guides/release-6.x/6.0/wifi.rst +++ b/docs/zh_CN/migration-guides/release-6.x/6.0/wifi.rst @@ -27,6 +27,8 @@ Wi-Fi - **Wi-Fi 接口:** 头文件 :project_file:`components/esp_wifi/include/esp_interface.h` 已被移除。``wifi_interface_t`` 枚举现在定义在 :project_file:`components/esp_wifi/include/esp_wifi_types_generic.h` 中。枚举值(例如 ``WIFI_IF_STA``、``WIFI_IF_AP``)不再基于 ``ESP_IF_WIFI_STA``、``ESP_IF_WIFI_AP`` 等定义。 +- **Wi-Fi 断开连接原因:** 断开连接原因代码 ``WIFI_REASON_ASSOC_EXPIRE``、``WIFI_REASON_NOT_AUTHED`` 和 ``WIFI_REASON_NOT_ASSOCED`` 已被移除。请改用 ``WIFI_REASON_AUTH_EXPIRE``、``WIFI_REASON_CLASS2_FRAME_FROM_NONAUTH_STA`` 和 ``WIFI_REASON_CLASS3_FRAME_FROM_NONASSOC_STA``。 + - **NAN:** - 结构体 ``wifi_nan_publish_cfg_t``、``wifi_nan_subscribe_cfg_t``、``wifi_nan_followup_params_t``、``wifi_event_ndp_indication_t``、``wifi_event_ndp_confirm_t`` 中的字段 ``svc_info`` 已被移除。请改用等效字段 ``ssi`` 和 ``ssi_len``。 - 结构体 ``wifi_event_nan_receive_t`` 中的字段 ``peer_svc_info`` 已被移除。请改用等效字段 ``ssi`` 和 ``ssi_len``。 diff --git a/tools/idf_py_actions/hints.yml b/tools/idf_py_actions/hints.yml index bebab3f71c..c249e201dd 100644 --- a/tools/idf_py_actions/hints.yml +++ b/tools/idf_py_actions/hints.yml @@ -628,7 +628,7 @@ - re: "fatal error: esp_interface.h: No such file or directory" - hint: "The header file 'esp_interface.h' has been removed. The 'wifi_interface_t' enum is now defined in 'esp_wifi_types_generic.h'." + hint: "The header file 'esp_interface.h' has been removed. The 'wifi_interface_t' enum is now defined in 'esp_wifi_types_generic.h'. The enum values (e.g. 'WIFI_IF_STA', 'WIFI_IF_AP') are no longer defined based on 'ESP_IF_WIFI_STA', 'ESP_IF_WIFI_AP', etc." - re: "error: 'use_get_report_api' undeclared" @@ -649,3 +649,17 @@ - re: "error: too few arguments to function 'esp_wifi_nan_publish_service'" hint: "The function argument 'ndp_resp_needed' of 'esp_wifi_nan_publish_service' has been moved to structure 'wifi_nan_publish_cfg_t'." + +- + re: "error: '(WIFI_REASON_ASSOC_EXPIRE|WIFI_REASON_NOT_AUTHED|WIFI_REASON_NOT_ASSOCED)' undeclared" + hint: "The Wi-Fi disconnection reason codes '{0}' have been removed. Please use '{1}', '{2}', and '{3}' respectively." + variables: + - + re_variables: ['WIFI_REASON_ASSOC_EXPIRE'] + hint_variables: ['WIFI_REASON_ASSOC_EXPIRE', 'WIFI_REASON_AUTH_EXPIRE'] + - + re_variables: ['WIFI_REASON_NOT_AUTHED'] + hint_variables: ['WIFI_REASON_NOT_AUTHED', 'WIFI_REASON_CLASS2_FRAME_FROM_NONAUTH_STA'] + - + re_variables: ['WIFI_REASON_NOT_ASSOCED'] + hint_variables: ['WIFI_REASON_NOT_ASSOCED', 'WIFI_REASON_CLASS3_FRAME_FROM_NONASSOC_STA']