From 3f87a9824aeaf8917a0f5e6d4b96e1e8791aafc8 Mon Sep 17 00:00:00 2001 From: zhangyanjiao Date: Thu, 26 May 2022 15:02:14 +0800 Subject: [PATCH 1/4] update wifi reason code --- components/esp_wifi/include/esp_wifi_types.h | 91 ++++++++------ docs/en/api-guides/wifi.rst | 123 ++++++++++++++++++- docs/zh_CN/api-guides/wifi.rst | 123 ++++++++++++++++++- 3 files changed, 300 insertions(+), 37 deletions(-) diff --git a/components/esp_wifi/include/esp_wifi_types.h b/components/esp_wifi/include/esp_wifi_types.h index 3ce4ccfe735..239a66e1f61 100644 --- a/components/esp_wifi/include/esp_wifi_types.h +++ b/components/esp_wifi/include/esp_wifi_types.h @@ -64,41 +64,62 @@ typedef enum { } wifi_auth_mode_t; typedef enum { - WIFI_REASON_UNSPECIFIED = 1, - WIFI_REASON_AUTH_EXPIRE = 2, - WIFI_REASON_AUTH_LEAVE = 3, - WIFI_REASON_ASSOC_EXPIRE = 4, - WIFI_REASON_ASSOC_TOOMANY = 5, - WIFI_REASON_NOT_AUTHED = 6, - WIFI_REASON_NOT_ASSOCED = 7, - WIFI_REASON_ASSOC_LEAVE = 8, - WIFI_REASON_ASSOC_NOT_AUTHED = 9, - WIFI_REASON_DISASSOC_PWRCAP_BAD = 10, - WIFI_REASON_DISASSOC_SUPCHAN_BAD = 11, - WIFI_REASON_BSS_TRANSITION_DISASSOC = 12, - WIFI_REASON_IE_INVALID = 13, - WIFI_REASON_MIC_FAILURE = 14, - WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT = 15, - WIFI_REASON_GROUP_KEY_UPDATE_TIMEOUT = 16, - WIFI_REASON_IE_IN_4WAY_DIFFERS = 17, - WIFI_REASON_GROUP_CIPHER_INVALID = 18, - WIFI_REASON_PAIRWISE_CIPHER_INVALID = 19, - WIFI_REASON_AKMP_INVALID = 20, - WIFI_REASON_UNSUPP_RSN_IE_VERSION = 21, - WIFI_REASON_INVALID_RSN_IE_CAP = 22, - WIFI_REASON_802_1X_AUTH_FAILED = 23, - WIFI_REASON_CIPHER_SUITE_REJECTED = 24, - - WIFI_REASON_INVALID_PMKID = 53, - - WIFI_REASON_BEACON_TIMEOUT = 200, - WIFI_REASON_NO_AP_FOUND = 201, - WIFI_REASON_AUTH_FAIL = 202, - WIFI_REASON_ASSOC_FAIL = 203, - WIFI_REASON_HANDSHAKE_TIMEOUT = 204, - WIFI_REASON_CONNECTION_FAIL = 205, - WIFI_REASON_AP_TSF_RESET = 206, - WIFI_REASON_ROAMING = 207, + WIFI_REASON_UNSPECIFIED = 1, + WIFI_REASON_AUTH_EXPIRE = 2, + WIFI_REASON_AUTH_LEAVE = 3, + WIFI_REASON_ASSOC_EXPIRE = 4, + WIFI_REASON_ASSOC_TOOMANY = 5, + WIFI_REASON_NOT_AUTHED = 6, + WIFI_REASON_NOT_ASSOCED = 7, + WIFI_REASON_ASSOC_LEAVE = 8, + WIFI_REASON_ASSOC_NOT_AUTHED = 9, + WIFI_REASON_DISASSOC_PWRCAP_BAD = 10, + WIFI_REASON_DISASSOC_SUPCHAN_BAD = 11, + WIFI_REASON_BSS_TRANSITION_DISASSOC = 12, + WIFI_REASON_IE_INVALID = 13, + WIFI_REASON_MIC_FAILURE = 14, + WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT = 15, + WIFI_REASON_GROUP_KEY_UPDATE_TIMEOUT = 16, + WIFI_REASON_IE_IN_4WAY_DIFFERS = 17, + WIFI_REASON_GROUP_CIPHER_INVALID = 18, + WIFI_REASON_PAIRWISE_CIPHER_INVALID = 19, + WIFI_REASON_AKMP_INVALID = 20, + WIFI_REASON_UNSUPP_RSN_IE_VERSION = 21, + WIFI_REASON_INVALID_RSN_IE_CAP = 22, + WIFI_REASON_802_1X_AUTH_FAILED = 23, + WIFI_REASON_CIPHER_SUITE_REJECTED = 24, + WIFI_REASON_TDLS_PEER_UNREACHABLE = 25, + WIFI_REASON_TDLS_UNSPECIFIED = 26, + WIFI_REASON_SSP_REQUESTED_DISASSOC = 27, + WIFI_REASON_NO_SSP_ROAMING_AGREEMENT = 28, + WIFI_REASON_BAD_CIPHER_OR_AKM = 29, + WIFI_REASON_NOT_AUTHORIZED_THIS_LOCATION = 30, + WIFI_REASON_SERVICE_CHANGE_PERCLUDES_TS = 31, + WIFI_REASON_UNSPECIFIED_QOS = 32, + WIFI_REASON_NOT_ENOUGH_BANDWIDTH = 33, + WIFI_REASON_MISSING_ACKS = 34, + WIFI_REASON_EXCEEDED_TXOP = 35, + WIFI_REASON_STA_LEAVING = 36, + WIFI_REASON_END_BA = 37, + WIFI_REASON_UNKNOWN_BA = 38, + WIFI_REASON_TIMEOUT = 39, + WIFI_REASON_PEER_INITIATED = 46, + WIFI_REASON_AP_INITIATED = 47, + WIFI_REASON_INVALID_FT_ACTION_FRAME_COUNT = 48, + WIFI_REASON_INVALID_PMKID = 49, + WIFI_REASON_INVALID_MDE = 50, + WIFI_REASON_INVALID_FTE = 51, + WIFI_REASON_TRANSMISSION_LINK_ESTABLISH_FAILED = 67, + WIFI_REASON_ALTERATIVE_CHANNEL_OCCUPIED = 68, + + WIFI_REASON_BEACON_TIMEOUT = 200, + WIFI_REASON_NO_AP_FOUND = 201, + WIFI_REASON_AUTH_FAIL = 202, + WIFI_REASON_ASSOC_FAIL = 203, + WIFI_REASON_HANDSHAKE_TIMEOUT = 204, + WIFI_REASON_CONNECTION_FAIL = 205, + WIFI_REASON_AP_TSF_RESET = 206, + WIFI_REASON_ROAMING = 207, } wifi_err_reason_t; typedef enum { diff --git a/docs/en/api-guides/wifi.rst b/docs/en/api-guides/wifi.rst index 861a9b9e525..a597370688c 100644 --- a/docs/en/api-guides/wifi.rst +++ b/docs/en/api-guides/wifi.rst @@ -767,7 +767,7 @@ Four-way Handshake Phase Wi-Fi Reason Code +++++++++++++++++++++ -The table below shows the reason code defined in {IDF_TARGET_NAME}. The first column is the macro name defined in esp_wifi_types.h. The common prefix *WIFI_REASON* is removed, which means that *UNSPECIFIED* actually stands for *WIFI_REASON_UNSPECIFIED* and so on. The second column is the value of the reason. The third column is the standard value to which this reason is mapped in section 8.4.1.7 of IEEE 802.11-2012 (For more information, refer to the standard mentioned above). The last column describes the reason. +The table below shows the reason-code defined in {IDF_TARGET_NAME}. The first column is the macro name defined in esp_wifi_types.h. The common prefix *WIFI_REASON* is removed, which means that *UNSPECIFIED* actually stands for *WIFI_REASON_UNSPECIFIED* and so on. The second column is the value of the reason. The third column is the standard value to which this reason is mapped in section 9.4.1.7 of IEEE 802.11-2020. (For more information, refer to the standard mentioned above.) The last column describes the reason. .. list-table:: :header-rows: 1 @@ -996,6 +996,102 @@ The table below shows the reason code defined in {IDF_TARGET_NAME}. The first co For the ESP station, this reason is reported when: - it is received from the AP. + * - TDLS_PEER_UNREACHABLE + - 25 + - 25 + - TDLS direct-link teardown due to TDLS peer STA unreachable via the TDLS direct link. + * - TDLS_UNSPECIFIED + - 26 + - 26 + - TDLS direct-link teardown for unspecified reason. + * - SSP_REQUESTED_DISASSOC + - 27 + - 27 + - Disassociated because session terminated by SSP request. + * - NO_SSP_ROAMING_AGREEMENT + - 28 + - 28 + - Disassociated because of lack of SSP roaming agreement. + * - BAD_CIPHER_OR_AKM + - 29 + - 29 + - Requested service rejected because of SSP cipher suite or AKM requiremen. + * - NOT_AUTHORIZED_THIS_LO CATION + - 30 + - 30 + - Requested service not authorized in this location. + * - SERVICE_CHANGE_PRECLUDES_TS + - 31 + - 31 + - TS deleted because QoS AP lacks sufficient bandwidth for this QoS STA due to a change in BSS service characteristics or operational mode (e.g., an HT BSS change from 40 MHz channel to 20 MHz channel). + * - UNSPECIFIED_QOS + - 32 + - 32 + - Disassociated for unspecified, QoS-related reason. + * - NOT_ENOUGH_BANDWIDTH + - 33 + - 33 + - Disassociated because QoS AP lacks sufficient bandwidth for this QoS STA. + * - MISSING_ACKS + - 34 + - 34 + - Disassociated because excessive number of frames need to be acknowledged, but are not acknowledged due to AP transmissions and/or poor channel conditions. + * - EXCEEDED_TXOP + - 35 + - 35 + - Disassociated because STA is transmitting outside the limits of its TXOPs. + * - STA_LEAVING + - 36 + - 36 + - Requesting STA is leaving the BSS (or resetting). + * - END_BA + - 37 + - 37 + - Requesting STA is no longer using the stream or session. + * - UNKNOWN_BA + - 38 + - 38 + - Requesting STA received frames using a mechanism for which a setup has not been completed. + * - TIMEOUT + - 39 + - 39 + - Requested from peer STA due to timeout + * - Reserved + - 40 ~ 45 + - 40 ~ 45 + - + * - PEER_INITIATED + - 46 + - 46 + - In a Disassociation frame: Disassociated because authorized access limit reached. + * - AP_INITIATED + - 47 + - 47 + - In a Disassociation frame: Disassociated due to external service requirements. + * - INVALID_FT_ACTION_FRAME_COUNT + - 48 + - 48 + - Invalid FT Action frame count. + * - INVALID_PMKID + - 49 + - 49 + - Invalid pairwise master key identifier (PMKID). + * - INVALID_MDE + - 50 + - 50 + - Invalid MDE. + * - INVALID_FTE + - 51 + - 51 + - Invalid FTE + * - TRANSMISSION_LINK_ESTABLISHMENT_FAILED + - 67 + - 67 + - Transmission link establishment in alternative channel failed. + * - ALTERATIVE_CHANNEL_OCCUPIED + - 68 + - 68 + - The alternative channel is occupied. * - BEACON_TIMEOUT - 200 - reserved @@ -1022,6 +1118,31 @@ The table below shows the reason code defined in {IDF_TARGET_NAME}. The first co - Espressif-specific Wi-Fi reason code: the connection to the AP has failed. +Wi-Fi Reason code related to wrong password +++++++++++++++++++++++++++++++++++++++++++++++ + +The table below shows the Wi-Fi reason-code may related to wrong password. + +.. list-table:: + :header-rows: 1 + :widths: 5 10 40 + + * - Reason code + - Value + - Description + * - 4WAY_HANDSHAKE_TIMEOUT + - 15 + - Four-way handshake times out. + * - NO_AP_FOUND + - 201 + - This may related to wrong password in the two scenarios: + - Setting password when STA connecting to an unencrypted AP. + - Doesn't setting password when STA connecting to an encrpted AP. + * - HANDSHAKE_TIMEOUT + - 204 + - Four-way handshake fails. + + {IDF_TARGET_NAME} Wi-Fi Station Connecting When Multiple APs Are Found ---------------------------------------------------------------------- diff --git a/docs/zh_CN/api-guides/wifi.rst b/docs/zh_CN/api-guides/wifi.rst index d2388e03e54..cf64f7bb2b2 100644 --- a/docs/zh_CN/api-guides/wifi.rst +++ b/docs/zh_CN/api-guides/wifi.rst @@ -767,7 +767,7 @@ Wi-Fi 驱动程序内部扫描阶段 Wi-Fi 原因代码 +++++++++++++++++++++ -下表罗列了 {IDF_TARGET_NAME} 中定义的原因代码。其中,第一列为 esp_wifi_types.h 中定义的宏名称。名称中省去了前缀 *WIFI_REASON*,也就是说,名称 *UNSPECIFIED* 实际应为 *WIFI_REASON_UNSPECIFIED*,以此类推。第二列为原因代码的相应数值。第三列为该原因映射到 IEEE 802.11-2012 中 8.4.1.7 段的标准值。(更多详细信息,请参阅前文描述。)最后一列为这一原因的描述。 +下表罗列了 {IDF_TARGET_NAME} 中定义的原因代码。其中,第一列为 esp_wifi_types.h 中定义的宏名称。名称中省去了前缀 *WIFI_REASON*,也就是说,名称 *UNSPECIFIED* 实际应为 *WIFI_REASON_UNSPECIFIED*,以此类推。第二列为原因代码的相应数值。第三列为该原因映射到 IEEE 802.11-2020 中 9.4.1.7 段的标准值。(更多详细信息,请参阅前文描述。)最后一列为这一原因的描述。 .. list-table:: :header-rows: 1 @@ -996,6 +996,102 @@ Wi-Fi 原因代码 对于 ESP station,出现以下情况时报告该代码: - 从 AP 接收到该代码。 + * - TDLS_PEER_UNREACHABLE + - 25 + - 25 + - 通过 TDLS 直连无法到达TDLS 对端 STA,导致 TDLS 直连中断。 + * - TDLS_UNSPECIFIED + - 26 + - 26 + - 不明原因的 TDLS 直连中断。 + * - SSP_REQUESTED_DISASSOC + - 27 + - 27 + - association 取消,由于会话被 SSP request 终止。 + * - NO_SSP_ROAMING_AGREEMENT + - 28 + - 28 + - association 取消,由于缺乏 SSP 漫游认证。 + * - BAD_CIPHER_OR_AKM + - 29 + - 29 + - 请求的服务被拒绝,由于 SSP 密码套件或者 AKM 的需求。 + * - NOT_AUTHORIZED_THIS_LO CATION + - 30 + - 30 + - 请求的服务在此位置未得到授权。 + * - SERVICE_CHANGE_PRECLUDES_TS + - 31 + - 31 + - TS 被删除,原因是:BSS 服务特性或者运行模式改变导致 Qos AP 缺少足够的带宽给 Qos STA 使用(例如:一个HT BSS 从 40 MHz 的信道切换到 20 MHz 的信道)。 + * - UNSPECIFIED_QOS + - 32 + - 32 + - association 取消,由于不明确的 QoS 相关原因。 + * - NOT_ENOUGH_BANDWIDTH + - 33 + - 33 + - association 取消,由于QoS AP 缺少足够的带宽给该 QoS STA 使用。 + * - MISSING_ACKS + - 34 + - 34 + - association 取消,原因是:大量的帧需要被确认,但由于 AP 传输或者糟糕的信道条件而没有被确认。 + * - EXCEEDED_TXOP + - 35 + - 35 + - association 取消,由于 STA 的传输超过了 TXOPs 的限制。 + * - STA_LEAVING + - 36 + - 36 + - 请求 STA 离开了 BSS 或者重置了。 + * - END_BA + - 37 + - 37 + - 请求 STA 不再使用该流或者会话。 + * - UNKNOWN_BA + - 38 + - 38 + - 请求 STA 使用一种尚未完成的机制接收帧。 + * - TIMEOUT + - 39 + - 39 + - 对端 STA 的请求超时。 + * - Reserved + - 40 ~ 45 + - 40 ~ 45 + - 保留 + * - PEER_INITIATED + - 46 + - 46 + - 在 Disassociation 帧中:已达到授权访问限制。 + * - AP_INITIATED + - 47 + - 47 + - 在 Disassociation 帧中:外部服务需求。 + * - INVALID_FT_ACTION_FRAME_COUNT + - 48 + - 48 + - 无效的 FT Action 帧计数。 + * - INVALID_PMKID + - 49 + - 49 + - 无效的成对主密钥标识符(PMKID)。 + * - INVALID_MDE + - 50 + - 50 + - 无效的 MDE。 + * - INVALID_FTE + - 51 + - 51 + - 无效的 FTE。 + * - TRANSMISSION_LINK_ESTABLISHMENT_FAILED + - 67 + - 67 + - 在备用信道中建立传输链路失败。 + * - ALTERATIVE_CHANNEL_OCCUPIED + - 68 + - 68 + - 备用信道被占用。 * - BEACON_TIMEOUT - 200 - 保留 @@ -1022,6 +1118,31 @@ Wi-Fi 原因代码 - 乐鑫特有的 Wi-Fi 原因代码: AP 连接失败。 +与密码错误有关的 Wi-Fi 原因代码 ++++++++++++++++++++++++++++++++++ + +下表罗列了与密码错误相关的 Wi-Fi 原因代码。 + +.. list-table:: + :header-rows: 1 + :widths: 5 10 40 + + * - 原因代码 + - 数值 + - 描述 + * - 4WAY_HANDSHAKE_TIMEOUT + - 15 + - 四次握手超时。 + * - NO_AP_FOUND + - 201 + - 密码错误会出现这个原因代码的场景有如下两个: + - STA 在连接加密的 AP 的时候没有输入密码 + - STA 在连接非加密的 AP 的时候输入了密码 + * - HANDSHAKE_TIMEOUT + - 204 + - 握手超时。 + + 找到多个 AP 时的 {IDF_TARGET_NAME} Wi-Fi station 连接 ---------------------------------------------------------------------- From c8d0704f1c353e0a636bbb281498d17f97108f84 Mon Sep 17 00:00:00 2001 From: zhangyanjiao Date: Wed, 20 Jul 2022 17:45:10 +0800 Subject: [PATCH 2/4] update doc for set channel --- components/esp_wifi/include/esp_wifi.h | 3 +++ docs/en/api-guides/wifi.rst | 4 ++-- docs/zh_CN/api-guides/wifi.rst | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/components/esp_wifi/include/esp_wifi.h b/components/esp_wifi/include/esp_wifi.h index d20991cd6a5..1e610500425 100644 --- a/components/esp_wifi/include/esp_wifi.h +++ b/components/esp_wifi/include/esp_wifi.h @@ -580,6 +580,8 @@ esp_err_t esp_wifi_get_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t *bw); * @attention 2. When ESP32 is in STA mode, this API should not be called when STA is scanning or connecting to an external AP * @attention 3. When ESP32 is in softAP mode, this API should not be called when softAP has connected to external STAs * @attention 4. When ESP32 is in STA+softAP mode, this API should not be called when in the scenarios described above + * @attention 5. The channel info set by this API will not be stored in NVS. So If you want to remeber the channel used before wifi stop, + * you need to call this API again after wifi start, or you can call `esp_wifi_set_config()` to store the channel info in NVS. * * @param primary for HT20, primary is the channel number, for HT40, primary is the primary channel * @param second for HT20, second is ignored, for HT40, second is the second channel @@ -789,6 +791,7 @@ esp_err_t esp_wifi_get_promiscuous_ctrl_filter(wifi_promiscuous_filter_t *filter * @attention 2. For station configuration, bssid_set needs to be 0; and it needs to be 1 only when users need to check the MAC address of the AP. * @attention 3. ESP32 is limited to only one channel, so when in the soft-AP+station mode, the soft-AP will adjust its channel automatically to be the same as * the channel of the ESP32 station. + * @attention 4. The configuration will be stored in NVS * * @param interface interface * @param conf station or soft-AP configuration diff --git a/docs/en/api-guides/wifi.rst b/docs/en/api-guides/wifi.rst index a597370688c..da4461f3d1d 100644 --- a/docs/en/api-guides/wifi.rst +++ b/docs/en/api-guides/wifi.rst @@ -1197,7 +1197,7 @@ Call :cpp:func:`esp_wifi_set_mode()` to set the Wi-Fi mode. Station Basic Configuration +++++++++++++++++++++++++++++++++++++ -API esp_wifi_set_config() can be used to configure the station. The table below describes the fields in detail. +API :cpp:func:`esp_wifi_set_config()` can be used to configure the station. And the configuration will be stored in NVS. The table below describes the fields in detail. .. list-table:: :header-rows: 1 @@ -1236,7 +1236,7 @@ API esp_wifi_set_config() can be used to configure the station. The table below AP Basic Configuration +++++++++++++++++++++++++++++++++++++ -API esp_wifi_set_config() can be used to configure the AP. The table below describes the fields in detail. +API :cpp:func:`esp_wifi_set_config()` can be used to configure the AP. And the configuration will be stored in NVS. The table below describes the fields in detail. .. only:: esp32 or esp32s2 or esp32c3 or esp32s3 diff --git a/docs/zh_CN/api-guides/wifi.rst b/docs/zh_CN/api-guides/wifi.rst index cf64f7bb2b2..8b146955622 100644 --- a/docs/zh_CN/api-guides/wifi.rst +++ b/docs/zh_CN/api-guides/wifi.rst @@ -1197,7 +1197,7 @@ Wi-Fi 模式 station 基本配置 +++++++++++++++++++++++++++++++++++++ -API esp_wifi_set_config() 可用于配置 station。下表详细介绍了各个字段。 +API :cpp:func:`esp_wifi_set_config()` 可用于配置 station。配置的参数信息会保存到 NVS 中。下表详细介绍了各个字段。 .. list-table:: :header-rows: 1 @@ -1236,7 +1236,7 @@ API esp_wifi_set_config() 可用于配置 station。下表详细介绍了各个 AP 基本配置 +++++++++++++++++++++++++++++++++++++ -API esp_wifi_set_config() 可用于配置 AP。下表详细介绍了各个字段。 +API :cpp:func:`esp_wifi_set_config()` 可用于配置 AP。配置的参数信息会保存到 NVS 中。下表详细介绍了各个字段。 .. only:: esp32 or esp32s2 or esp32c3 or esp32s3 From e972161b7a24b202a9aeabccb9c6ebb86d96a8be Mon Sep 17 00:00:00 2001 From: muhaidong Date: Tue, 8 Nov 2022 10:59:40 +0800 Subject: [PATCH 3/4] esp_wifi: Modify wifi scan return value. 1. Modify wifi scan return value same to docs. 2. Change some logs' log level wo avoid misunderstanding. 3. Fix connect fail return wrong error code issue --- components/esp_wifi/lib | 2 +- docs/en/api-guides/wifi.rst | 20 +++++++++++++++++++- docs/zh_CN/api-guides/wifi.rst | 20 +++++++++++++++++++- 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 2dd55180350..e6aefa10e82 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 2dd55180350219f8722934b650dc56c2ac4f839a +Subproject commit e6aefa10e826c24a1361217b931121826ca5f829 diff --git a/docs/en/api-guides/wifi.rst b/docs/en/api-guides/wifi.rst index da4461f3d1d..9f38ae80432 100644 --- a/docs/en/api-guides/wifi.rst +++ b/docs/en/api-guides/wifi.rst @@ -1132,10 +1132,11 @@ The table below shows the Wi-Fi reason-code may related to wrong password. - Description * - 4WAY_HANDSHAKE_TIMEOUT - 15 - - Four-way handshake times out. + - Four-way handshake times out. Setting wrong password when STA connecting to an encrpted AP. * - NO_AP_FOUND - 201 - This may related to wrong password in the two scenarios: + - Setting password when STA connecting to an unencrypted AP. - Doesn't setting password when STA connecting to an encrpted AP. * - HANDSHAKE_TIMEOUT @@ -1143,6 +1144,23 @@ The table below shows the Wi-Fi reason-code may related to wrong password. - Four-way handshake fails. +The table below shows the Wi-Fi reason-code may related to low RSSI. + +.. list-table:: + :header-rows: 1 + :widths: 5 10 40 + + * - Reason code + - Value + - Description + * - NO_AP_FOUND + - 201 + - The station fails to scan the target AP due to low RSSI + * - HANDSHAKE_TIMEOUT + - 204 + - Four-way handshake fails. + + {IDF_TARGET_NAME} Wi-Fi Station Connecting When Multiple APs Are Found ---------------------------------------------------------------------- diff --git a/docs/zh_CN/api-guides/wifi.rst b/docs/zh_CN/api-guides/wifi.rst index 8b146955622..881c5c9cec5 100644 --- a/docs/zh_CN/api-guides/wifi.rst +++ b/docs/zh_CN/api-guides/wifi.rst @@ -1132,10 +1132,11 @@ Wi-Fi 原因代码 - 描述 * - 4WAY_HANDSHAKE_TIMEOUT - 15 - - 四次握手超时。 + - 四次握手超时。STA 在连接加密的 AP 的时候输入了错误的密码 * - NO_AP_FOUND - 201 - 密码错误会出现这个原因代码的场景有如下两个: + - STA 在连接加密的 AP 的时候没有输入密码 - STA 在连接非加密的 AP 的时候输入了密码 * - HANDSHAKE_TIMEOUT @@ -1143,6 +1144,23 @@ Wi-Fi 原因代码 - 握手超时。 +下表罗列了与低 RSSI 相关的 Wi-Fi 原因代码。 + +.. list-table:: + :header-rows: 1 + :widths: 5 10 40 + + * - 原因代码 + - 数值 + - 描述 + * - NO_AP_FOUND + - 201 + - 低 RSSI 导致 station 无法扫描到目标 AP + * - HANDSHAKE_TIMEOUT + - 204 + - 握手超时。 + + 找到多个 AP 时的 {IDF_TARGET_NAME} Wi-Fi station 连接 ---------------------------------------------------------------------- From c4644ddee51490c5db4a85c7825ff1aff03aff88 Mon Sep 17 00:00:00 2001 From: Marius Vikhammer Date: Wed, 9 Nov 2022 10:09:22 +0800 Subject: [PATCH 4/4] Apply suggestions to 2 files --- docs/en/api-guides/wifi.rst | 10 ++++++---- docs/zh_CN/api-guides/wifi.rst | 3 +++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/en/api-guides/wifi.rst b/docs/en/api-guides/wifi.rst index 9f38ae80432..ca3300c81e9 100644 --- a/docs/en/api-guides/wifi.rst +++ b/docs/en/api-guides/wifi.rst @@ -1015,8 +1015,8 @@ The table below shows the reason-code defined in {IDF_TARGET_NAME}. The first co * - BAD_CIPHER_OR_AKM - 29 - 29 - - Requested service rejected because of SSP cipher suite or AKM requiremen. - * - NOT_AUTHORIZED_THIS_LO CATION + - Requested service rejected because of SSP cipher suite or AKM requirement. + * - NOT_AUTHORIZED_THIS_LOCATION - 30 - 30 - Requested service not authorized in this location. @@ -1132,17 +1132,19 @@ The table below shows the Wi-Fi reason-code may related to wrong password. - Description * - 4WAY_HANDSHAKE_TIMEOUT - 15 - - Four-way handshake times out. Setting wrong password when STA connecting to an encrpted AP. + - Four-way handshake times out. Setting wrong password when STA connecting to an encrpyted AP. * - NO_AP_FOUND - 201 - This may related to wrong password in the two scenarios: - Setting password when STA connecting to an unencrypted AP. - - Doesn't setting password when STA connecting to an encrpted AP. + - Doesn't setting password when STA connecting to an encrypted AP. * - HANDSHAKE_TIMEOUT - 204 - Four-way handshake fails. +Wi-Fi Reason code related to low RSSI +++++++++++++++++++++++++++++++++++++++++++++++ The table below shows the Wi-Fi reason-code may related to low RSSI. diff --git a/docs/zh_CN/api-guides/wifi.rst b/docs/zh_CN/api-guides/wifi.rst index 881c5c9cec5..c1cab9fce9e 100644 --- a/docs/zh_CN/api-guides/wifi.rst +++ b/docs/zh_CN/api-guides/wifi.rst @@ -1144,6 +1144,9 @@ Wi-Fi 原因代码 - 握手超时。 +与低 RSSI 有关的 Wi-Fi 原因代码 ++++++++++++++++++++++++++++++++++ + 下表罗列了与低 RSSI 相关的 Wi-Fi 原因代码。 .. list-table::