From 054fdeb8c7a98bc3c98d11f7e312d3fc68878900 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Tue, 8 Nov 2022 10:59:40 +0800 Subject: [PATCH] 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 2dd5518035..e6aefa10e8 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 9be9ad0f10..81b842392a 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 ab4f79e5a9..aafd45bf76 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 连接 ----------------------------------------------------------------------