update wifi reason code

This commit is contained in:
zhangyanjiao
2022-05-26 15:02:14 +08:00
committed by jack
parent cf3e45deef
commit c227cbea3f
3 changed files with 798 additions and 485 deletions

View File

@ -61,41 +61,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_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_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_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 {

View File

@ -778,254 +778,381 @@ 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 is a description of 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
:widths: 5 10 12 40
* - Reason code
- Value
- Mapped To
- Description
* - UNSPECIFIED
- 1
- 1
- Generally, it means an internal failure, e.g., the memory runs out, the internal TX fails, or the reason is received from the remote side.
* - AUTH_EXPIRE
- 2
- 2
- The previous authentication is no longer valid.
For the ESP station, this reason is reported when:
- auth is timed out.
- the reason is received from the AP.
For the ESP AP, this reason is reported when:
- the AP has not received any packets from the station in the past five minutes.
- the AP is stopped by calling :cpp:func:`esp_wifi_stop()`.
- the station is de-authed by calling :cpp:func:`esp_wifi_deauth_sta()`.
* - AUTH_LEAVE
- 3
- 3
- De-authenticated, because the sending station is leaving (or has left).
For the ESP station, this reason is reported when:
- it is received from the AP.
* - ASSOC_EXPIRE
- 4
- 4
- Disassociated due to inactivity.
For the ESP station, this reason is reported when:
- it is received from the AP.
For the ESP AP, this reason is reported when:
- the AP has not received any packets from the station in the past five minutes.
- the AP is stopped by calling :cpp:func:`esp_wifi_stop()`.
- the station is de-authed by calling :cpp:func:`esp_wifi_deauth_sta()`.
* - ASSOC_TOOMANY
- 5
- 5
- Disassociated, because the AP is unable to handle all currently associated STAs at the same time.
For the ESP station, this reason is reported when:
- it is received from the AP.
For the ESP AP, this reason is reported when:
- the stations associated with the AP reach the maximum number that the AP can support.
* - NOT_AUTHED
- 6
- 6
- Class-2 frame received from a non-authenticated STA.
For the ESP station, this reason is reported when:
- it is received from the AP.
For the ESP AP, this reason is reported when:
- the AP receives a packet with data from a non-authenticated station.
* - NOT_ASSOCED
- 7
- 7
- Class-3 frame received from a non-associated STA.
For the ESP station, this reason is reported when:
- it is received from the AP.
For the ESP AP, this reason is reported when:
- the AP receives a packet with data from a non-associated station.
* - ASSOC_LEAVE
- 8
- 8
- Disassociated, because the sending station is leaving (or has left) BSS.
For the ESP station, this reason is reported when:
- it is received from the AP.
- the station is disconnected by :cpp:func:`esp_wifi_disconnect()` and other APIs.
* - ASSOC_NOT_AUTHED
- 9
- 9
- station requesting (re)association is not authenticated by the responding STA.
For the ESP station, this reason is reported when:
- it is received from the AP.
For the ESP AP, this reason is reported when:
- the AP receives packets with data from an associated, yet not authenticated, station.
* - DISASSOC_PWRCAP_BAD
- 10
- 10
- Disassociated, because the information in the Power Capability element is unacceptable.
For the ESP station, this reason is reported when:
- it is received from the AP.
* - DISASSOC_SUPCHAN_BAD
- 11
- 11
- Disassociated, because the information in the Supported Channels element is unacceptable.
For the ESP station, this reason is reported when:
- it is received from the AP.
* - IE_INVALID
- 13
- 13
- Invalid element, i.e., an element whose content does not meet the specifications of the Standard in frame formats clause.
For the ESP station, this reason is reported when:
- it is received from the AP.
For the ESP AP, this reason is reported when:
- the AP parses a wrong WPA or RSN IE.
* - MIC_FAILURE
- 14
- 14
- Message integrity code (MIC) failure.
For the ESP station, this reason is reported when:
- it is received from the AP.
* - 4WAY_HANDSHAKE_TIMEOUT
- 15
- 15
- Four-way handshake times out. For legacy reasons, in ESP this reason code is replaced with WIFI_REASON_HANDSHAKE_TIMEOUT.
For the ESP station, this reason is reported when:
- the handshake times out.
- it is received from the AP.
* - GROUP_KEY_UPDATE_TIMEOUT
- 16
- 16
- Group-Key Handshake times out.
For the ESP station, this reason is reported when:
- it is received from the AP.
* - IE_IN_4WAY_DIFFERS
- 17
- 17
- The element in the four-way handshake is different from the (Re-)Association Request/Probe and Response/Beacon frame.
For the ESP station, this reason is reported when:
- it is received from the AP.
- the station finds that the four-way handshake IE differs from the IE in the (Re-)Association Request/Probe and Response/Beacon frame.
* - GROUP_CIPHER_INVALID
- 18
- 18
- Invalid group cipher.
For the ESP station, this reason is reported when:
- it is received from the AP.
* - PAIRWISE_CIPHER_INVALID
- 19
- 19
- Invalid pairwise cipher.
For the ESP station, this reason is reported when:
- it is received from the AP.
* - AKMP_INVALID
- 20
- 20
- Invalid AKMP.
For the ESP station, this reason is reported when:
- it is received from the AP.
* - UNSUPP_RSN_IE_VERSION
- 21
- 21
- Unsupported RSNE version.
For the ESP station, this reason is reported when:
- it is received from the AP.
* - INVALID_RSN_IE_CAP
- 22
- 22
- Invalid RSNE capabilities.
For the ESP station, this reason is reported when:
- it is received from the AP.
* - 802_1X_AUTH_FAILED
- 23
- 23
- IEEE 802.1X. authentication failed.
For the ESP station, this reason is reported when:
- it is received from the AP.
For the ESP AP, this reason is reported when:
- IEEE 802.1X. authentication fails.
* - CIPHER_SUITE_REJECTED
- 24
- 24
- Cipher suite rejected due to security policies.
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
- Espressif-specific Wi-Fi reason code: when the station loses N beacons continuously, it will disrupt the connection and report this reason.
* - NO_AP_FOUND
- 201
- reserved
- Espressif-specific Wi-Fi reason code: when the station fails to scan the target AP, this reason code will be reported.
* - AUTH_FAIL
- 202
- reserved
- Espressif-specific Wi-Fi reason code: the authentication fails, but not because of a timeout.
* - ASSOC_FAIL
- 203
- reserved
- Espressif-specific Wi-Fi reason code: the association fails, but not because of ASSOC_EXPIRE or ASSOC_TOOMANY.
* - HANDSHAKE_TIMEOUT
- 204
- reserved
- Espressif-specific Wi-Fi reason code: the handshake fails for the same reason as that in WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT.
* - CONNECTION_FAIL
- 205
- reserved
- 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.
+---------------------------+-------+---------+-------------------------------------------------------------+
| Reason code | Value |Mapped To| Description |
+===========================+=======+=========+=============================================================+
| UNSPECIFIED | 1 | 1 | Generally, it means an internal failure, e.g., the memory |
| | | | runs out, the internal TX fails, or the reason is received |
| | | | from the remote side, etc. |
+---------------------------+-------+---------+-------------------------------------------------------------+
| AUTH_EXPIRE | 2 | 2 | The previous authentication is no longer valid. |
| | | | |
| | | | For the ESP Station, this reason is reported when: |
| | | | |
| | | | - auth is timed out. |
| | | | - the reason is received from the AP. |
| | | | |
| | | | For the ESP AP, this reason is reported when: |
| | | | |
| | | | - the AP has not received any packets from the station |
| | | | in the past five minutes. |
| | | | - the AP is stopped by calling :cpp:func:`esp_wifi_stop()`.|
| | | | - the station is de-authed by calling |
| | | | :cpp:func:`esp_wifi_deauth_sta()`. |
+---------------------------+-------+---------+-------------------------------------------------------------+
| AUTH_LEAVE | 3 | 3 | De-authenticated, because the sending STA is |
| | | | leaving (or has left). |
| | | | |
| | | | For the ESP Station, this reason is reported when: |
| | | | |
| | | | - it is received from the AP. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
| ASSOC_EXPIRE | 4 | 4 | Disassociated due to inactivity. |
| | | | |
| | | | For the ESP Station, this reason is reported when: |
| | | | |
| | | | - it is received from the AP. |
| | | | |
| | | | For the ESP AP, this reason is reported when: |
| | | | |
| | | | - the AP has not received any packets from the |
| | | | station in the past five minutes. |
| | | | - the AP is stopped by calling :cpp:func:`esp_wifi_stop()` |
| | | | - the station is de-authed by calling |
| | | | :cpp:func:`esp_wifi_deauth_sta()` |
+---------------------------+-------+---------+-------------------------------------------------------------+
| ASSOC_TOOMANY | 5 | 5 | Disassociated, because the AP is unable to handle |
| | | | all currently associated STAs at the same time. |
| | | | |
| | | | For the ESP Station, this reason is reported when: |
| | | | |
| | | | - it is received from the AP. |
| | | | |
| | | | For the ESP AP, this reason is reported when: |
| | | | |
| | | | - the stations associated with the AP reach the |
| | | | maximum number that the AP can support. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
| NOT_AUTHED | 6 | 6 | Class-2 frame received from a non-authenticated STA. |
| | | | |
| | | | For the ESP Station, this reason is reported when: |
| | | | |
| | | | - it is received from the AP. |
| | | | |
| | | | For the ESP AP, this reason is reported when: |
| | | | |
| | | | - the AP receives a packet with data from a |
| | | | non-authenticated station. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
| NOT_ASSOCED | 7 | 7 | Class-3 frame received from a non-associated STA. |
| | | | |
| | | | For the ESP Station, this reason is reported when: |
| | | | |
| | | | - it is received from the AP. |
| | | | |
| | | | For the ESP AP, this reason is reported when: |
| | | | |
| | | | - the AP receives a packet with data from a |
| | | | non-associated station. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
| ASSOC_LEAVE | 8 | 8 | Disassociated, because the sending STA is leaving (or has |
| | | | left) BSS. |
| | | | |
| | | | For the ESP Station, this reason is reported when: |
| | | | |
| | | | - it is received from the AP. |
| | | | - the station is disconnected by |
| | | | :cpp:func:`esp_wifi_disconnect()` and other APIs. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
| ASSOC_NOT_AUTHED | 9 | 9 | STA requesting (re)association is not authenticated by the |
| | | | responding STA. |
| | | | |
| | | | For the ESP Station, this reason is reported when: |
| | | | |
| | | | - it is received from the AP. |
| | | | |
| | | | For the ESP AP, this reason is reported when: |
| | | | |
| | | | - the AP receives packets with data from an |
| | | | associated, yet not authenticated, station. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
| DISASSOC_PWRCAP_BAD | 10 | 10 | Disassociated, because the information in the Power |
| | | | Capability element is unacceptable. |
| | | | |
| | | | For the ESP Station, this reason is reported when: |
| | | | |
| | | | - it is received from the AP. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
| DISASSOC_SUPCHAN_BAD | 11 | 11 | Disassociated, because the information in the Supported |
| | | | Channels element is unacceptable. |
| | | | |
| | | | For the ESP Station, this reason is reported when: |
| | | | |
| | | | - it is received from the AP. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
| IE_INVALID | 13 | 13 | Invalid element, i.e. an element whose content does not meet|
| | | | the specifications of the Standard in frame formats clause. |
| | | | |
| | | | For the ESP Station, this reason is reported when: |
| | | | |
| | | | - it is received from the AP. |
| | | | |
| | | | For the ESP AP, this reason is reported when: |
| | | | |
| | | | - the AP parses a wrong WPA or RSN IE. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
| MIC_FAILURE | 14 | 14 | Message integrity code (MIC) failure. |
| | | | |
| | | | For the ESP Station, this reason is reported when: |
| | | | |
| | | | - it is received from the AP. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
| 4WAY_HANDSHAKE_TIMEOUT | 15 | 15 | Four-way handshake times out. For legacy reasons, in ESP |
| | | | this reason-code is replaced with |
| | | | WIFI_REASON_HANDSHAKE_TIMEOUT. |
| | | | |
| | | | For the ESP Station, this reason is reported when: |
| | | | |
| | | | - the handshake times out. |
| | | | - it is received from the AP. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
| GROUP_KEY_UPDATE_TIMEOUT | 16 | 16 | Group-Key Handshake times out. |
| | | | |
| | | | For the ESP station, this reason is reported when: |
| | | | |
| | | | - it is received from the AP. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
| IE_IN_4WAY_DIFFERS | 17 | 17 | The element in the four-way handshake is different from the |
| | | | (Re-)Association Request/Probe and Response/Beacon frame. |
| | | | |
| | | | For the ESP station, this reason is reported when: |
| | | | |
| | | | - it is received from the AP. |
| | | | - the station finds that the four-way handshake IE differs |
| | | | from the IE in the (Re-)Association Request/Probe and |
| | | | Response/Beacon frame. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
| GROUP_CIPHER_INVALID | 18 | 18 | Invalid group cipher. |
| | | | |
| | | | For the ESP Station, this reason is reported when: |
| | | | |
| | | | - it is received from the AP. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
| PAIRWISE_CIPHER_INVALID | 19 | 19 | Invalid pairwise cipher. |
| | | | |
| | | | For the ESP Station, this reason is reported when: |
| | | | |
| | | | - it is received from the AP. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
| AKMP_INVALID | 20 | 20 | Invalid AKMP. |
| | | | |
| | | | For the ESP Station, this reason is reported when: |
| | | | |
| | | | - it is received from the AP. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
| UNSUPP_RSN_IE_VERSION | 21 | 21 | Unsupported RSNE version. |
| | | | |
| | | | For the ESP Station, this reason is reported when: |
| | | | |
| | | | - it is received from the AP. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
| INVALID_RSN_IE_CAP | 22 | 22 | Invalid RSNE capabilities. |
| | | | |
| | | | For the ESP Station, this reason is reported when: |
| | | | |
| | | | - it is received from the AP. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
| 802_1X_AUTH_FAILED | 23 | 23 | IEEE 802.1X. authentication failed. |
| | | | |
| | | | For the ESP Station, this reason is reported when: |
| | | | |
| | | | - it is received from the AP. |
| | | | |
| | | | For the ESP AP, this reason is reported when: |
| | | | |
| | | | - 802.1 x authentication fails. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
| CIPHER_SUITE_REJECTED | 24 | 24 | Cipher suite rejected due to security policies. |
| | | | |
| | | | For the ESP Station, this reason is reported when: |
| | | | |
| | | | - it is received from the AP. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
| BEACON_TIMEOUT | 200 |reserved | Espressif-specific Wi-Fi reason-code: when the station |
| | | | loses N beacons continuously, it will disrupt the connection|
| | | | and report this reason. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
| NO_AP_FOUND | 201 |reserved | Espressif-specific Wi-Fi reason-code: when the station |
| | | | fails to scan the target AP, this reason code will be |
| | | | reported. |
+---------------------------+-------+---------+-------------------------------------------------------------+
| AUTH_FAIL | 202 |reserved | Espressif-specific Wi-Fi reason-code: the |
| | | | authentication fails, but not because of a timeout. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
| ASSOC_FAIL | 203 |reserved | Espressif-specific Wi-Fi reason-code: the association |
| | | | fails, but not because of ASSOC_EXPIRE or ASSOC_TOOMANY. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
| HANDSHAKE_TIMEOUT | 204 |reserved | Espressif-specific Wi-Fi reason-code: the |
| | | | handshake fails for the same reason as that in |
| | | | WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
| CONNECTION_FAIL | 205 |reserved | Espressif-specific Wi-Fi reason-code: the |
| | | | connection to the AP has failed. |
| | | | |
+---------------------------+-------+---------+-------------------------------------------------------------+
{IDF_TARGET_NAME} Wi-Fi Station Connecting When Multiple APs Are Found
----------------------------------------------------------------------

View File

@ -750,213 +750,378 @@ 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-20209.4.1.7 段的标准值。(更多详细信息,请参阅前文描述。)最后一列为这一原因的描述。
.. list-table::
:header-rows: 1
:widths: 5 10 12 40
* - 原因代码
- 数值
- 映射值
- 描述
* - UNSPECIFIED
- 1
- 1
- 出现内部错误,例如:内存已满,内部发送失败,或该原因已被远端接收等。
* - AUTH_EXPIRE
- 2
- 2
- 先前的 authentication 已失效。
对于 ESP station出现以下情况时将报告该代码
- authentication 超时;
- 从 AP 接收到该代码。
对于 ESP AP出现以下情况时将报告该代码
- 在过去五分钟之内AP 未从 station 接收到任何数据包;
- 由于调用了函数 :cpp:func:`esp_wifi_stop()` 导致 AP 终止;
- 由于调用了函数 :cpp:func:`esp_wifi_deauth_sta()` 导致 station 的 authentication 取消。
* - AUTH_LEAVE
- 3
- 3
- authentication 取消,因为发送 station 正在离开(或已经离开)。
对于 ESP station出现以下情况时报告该代码
- 从 AP 接收到该代码。
* - ASSOC_EXPIRE
- 4
- 4
- 因为 AP 不活跃association 取消。
对于 ESP station出现以下情况时报告该代码
- 从 AP 接收到该代码。
对于 ESP AP出现以下情况时将报告该代码
- 在过去五分钟之内, AP 未从 station 接收到任何数据包;
- 由于调用了函数 :cpp:func:`esp_wifi_stop()` 导致 AP 终止;
- 由于调用了函数 :cpp:func:`esp_wifi_deauth_sta()` 导致 station 的 authentication 取消。
* - ASSOC_TOOMANY
- 5
- 5
- association 取消,因为 AP 无法同时处理所有当前已关联的 STA。
对于 ESP station出现以下情况时报告该代码
- 从 AP 接收到该代码。
对于 ESP AP出现以下情况时将报告该代码
- 与 AP 相关联的 station 数量已到达 AP 可支持的最大值。
* - NOT_AUTHED
- 6
- 6
- 从一个未认证 station 接收到 class-2 frame。
对于 ESP station出现以下情况时报告该代码
- 从 AP 接收到该代码。
对于 ESP AP出现以下情况时将报告该代码
- AP 从一个未认证 station 接收到数据包。
* - NOT_ASSOCED
- 7
- 7
- 从一个未关联 station 接收到的 class-3 frame。
对于 ESP station出现以下情况时报告该代码
- 从 AP 接收到该代码。
对于 ESP AP出现以下情况时将报告该代码
- AP 从未关联 station 接收到数据包。
* - ASSOC_LEAVE
- 8
- 8
- association 取消,因为发送 station 正在离开或已经离开BSS。
对于 ESP station出现以下情况时报告该代码
- 从 AP 接收到该代码。
- 由于调用 :cpp:func:`esp_wifi_disconnect()` 和其它 APIstation 断开连接。
* - ASSOC_NOT_AUTHED
- 9
- 9
- station 的 re(association) 请求未被响应 station 认证。
对于 ESP station出现以下情况时报告该代码
- 从 AP 接收到该代码。
对于 ESP AP出现以下情况时将报告该代码
- AP 从一个已关联,但未认证的 station 接收到数据包。
* - DISASSOC_PWRCAP_BAD
- 10
- 10
- association 取消,因为无法接收功率能力 (Power Capability) 元素中的信息。
对于 ESP station出现以下情况时报告该代码
- 从 AP 接收到该代码。
* - DISASSOC_SUPCHAN_BAD
- 11
- 11
- association 取消,因为无法接收支持的信道 (Supported Channels) 元素中的信息。
对于 ESP station出现以下情况时报告该代码
- 从 AP 接收到该代码。
* - IE_INVALID
- 13
- 13
- 无效元素,即内容不符合 Wi-Fi 协议中帧格式 (Frame formats) 章节所描述标准的元素。
对于 ESP station出现以下情况时报告该代码
- 从 AP 接收到该代码。
对于 ESP AP出现以下情况时将报告该代码
- AP 解析了一个错误的 WPA 或 RSN IE。
* - MIC_FAILURE
- 14
- 14
- 消息完整性代码 (MIC) 出错。
对于 ESP station出现以下情况时报告该代码
- 从 AP 接收到该代码。
* - 4WAY_HANDSHAKE_TIMEOUT
- 15
- 15
- 四次握手超时。由于某些历史原因,在 ESP 中该原因代码实为 WIFI_REASON_HANDSHAKE_TIMEOUT。
对于 ESP station出现以下情况时报告该代码
- 握手超时。
- 从 AP 接收到该代码。
* - GROUP_KEY_UPDATE_TIMEOUT
- 16
- 16
- 组密钥 (Group-Key) 握手超时。
对于 ESP station出现以下情况时报告该代码
- 从 AP 接收到该代码。
* - IE_IN_4WAY_DIFFERS
- 17
- 17
- 四次握手中产生的元素与 (re-)association 后的 request/probe 以及 response/beacon frame 中的信息不同。
对于 ESP station出现以下情况时报告该代码
- 从 AP 接收到该代码。
- station 发现四次握手的 IE 与 (re-)association 后的 request/probe 以及 response/beacon frame 中的 IE 不同。
* - GROUP_CIPHER_INVALID
- 18
- 18
- 无效组密文。
对于 ESP station出现以下情况时报告该代码
- 从 AP 接收到该代码。
* - PAIRWISE_CIPHER_INVALID
- 19
- 19
- 无效成对密文。
对于 ESP station出现以下情况时报告该代码
- 从 AP 接收到该代码。
* - AKMP_INVALID
- 20
- 20
- 无效 AKMP。
对于 ESP station出现以下情况时报告该代码
- 从 AP 接收到该代码。
* - UNSUPP_RSN_IE_VERSION
- 21
- 21
- 不支持的 RSNE 版本。
对于 ESP station出现以下情况时报告该代码
- 从 AP 接收到该代码。
* - INVALID_RSN_IE_CAP
- 22
- 22
- 无效的 RSNE 性能。
对于 ESP station出现以下情况时报告该代码
- 从 AP 接收到该代码。
* - 802_1X_AUTH_FAILED
- 23
- 23
- IEEE 802.1X. authentication 失败。
对于 ESP station出现以下情况时报告该代码
- 从 AP 接收到该代码。
对于 ESP AP出现以下情况时将报告该代码
- IEEE 802.1X. authentication 失败。
* - CIPHER_SUITE_REJECTED
- 24
- 24
- 因安全策略,安全密钥算法套件 (cipher suite) 被拒。
对于 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
- 保留
- 乐鑫特有的 Wi-Fi 原因代码: 当 station 连续失去 N 个 beacon将中断连接并报告该代码。
* - NO_AP_FOUND
- 201
- 保留
- 乐鑫特有的 Wi-Fi 原因代码: 当 station 未扫描到目标 AP 时,将报告该代码。
* - AUTH_FAIL
- 202
- 保留
- 乐鑫特有的 Wi-Fi 原因代码: authentication 失败,但并非由超时而引发。
* - ASSOC_FAIL
- 203
- 保留
- 乐鑫特有的 Wi-Fi 原因代码: association 失败,但并非由 ASSOC_EXPIRE 或 ASSOC_TOOMANY 引发。
* - HANDSHAKE_TIMEOUT
- 204
- 保留
- 乐鑫特有的 Wi-Fi 原因代码: 握手失败,与 WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT 中失败原因相同。
* - CONNECTION_FAIL
- 205
- 保留
- 乐鑫特有的 Wi-Fi 原因代码: AP 连接失败。
+--------------------------+------+----------+-------------------------------------------------------------------------+
| 原因代码 | 数值 | 映射值 | 描述 |
+==========================+======+==========+=========================================================================+
| UNSPECIFIED | 1 | 1 | 出现内部错误,例如:存储器已满,内部发送失败,或该原因已 被远端接收等。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| AUTH_EXPIRE | 2 | 2 | 先前的 authentication 已失效。 |
| | | | |
| | | | 对于 ESP station出现以下情况时将报告该代码 |
| | | | |
| | | | - authentication 超时; |
| | | | - 从 AP 接收到该代码。 |
| | | | |
| | | | 对于 ESP AP出现以下情况时将报告该代码 |
| | | | |
| | | | - 在过去五分钟之内AP 未从 station 接收到任何数据包; |
| | | | - 由于调用了函数 :cpp:func:`esp_wifi_stop()` 导致 AP 终止; |
| | | | - 由于调用了函数 :cpp:func:`esp_wifi_deauth_sta()` 导致 station 的 auth |
| | | | 取消。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| AUTH_LEAVE | 3 | 3 | authentication 取消,因为发送 STA 正在离开(或已经离开)。 |
| | | | |
| | | | 对于 ESP station出现以下情况时报告该代码 |
| | | | |
| | | | - 从 AP 接收到该代码。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| ASSOC_EXPIRE | 4 | 4 | association 取消,因为 AP 不活跃。 |
| | | | |
| | | | 对于 ESP station出现以下情况时报告该代码 |
| | | | |
| | | | - 从 AP 接收到该代码。 |
| | | | |
| | | | 对于 ESP AP出现以下情况时报告该代码 |
| | | | |
| | | | - 在过去五分钟之内, AP 未从 station 接收到任何数据包; |
| | | | - 由于调用了函数 :cpp:func:`esp_wifi_stop()` 导致 AP 终止; |
| | | | - 由于调用了函数 :cpp:func:`esp_wifi_deauth_sta()` 导致 station 的 auth |
| | | | 取消。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| ASSOC_TOOMANY | 5 | 5 | association 取消,因为 AP 无法同时处理所有当前已关联的 STA。 |
| | | | |
| | | | 对于 ESP station出现以下情况时报告该代码 |
| | | | |
| | | | - 从 AP 接收到该代码。 |
| | | | |
| | | | 对于 ESP AP出现以下情况时报告该代码 |
| | | | |
| | | | - 与 AP 相关联的 station 数量已到达 AP 可支持的最大值。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| NOT_AUTHED | 6 | 6 | 从一个未认证 STA 接收到 class-2 frame。 |
| | | | |
| | | | 对于 ESP station出现以下情况时报告该代码 |
| | | | |
| | | | - 从 AP 接收到该代码。 |
| | | | |
| | | | 对于 ESP AP出现以下情况时报告该代码 |
| | | | |
| | | | - AP 从一个未认证 station 接收到数据包。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| NOT_ASSOCED | 7 | 7 | 从一个未关联 STA 接收到的 class-3 frame。 |
| | | | |
| | | | 对于 ESP station出现以下情况时报告该代码 |
| | | | |
| | | | - 从 AP 接收到该代码。 |
| | | | |
| | | | 对于 ESP AP出现以下情况时报告该代码 |
| | | | |
| | | | - AP 从未关联 station 接收到数据包。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| ASSOC_LEAVE | 8 | 8 | association 取消,因为发送 STA 正在离开或已经离开BSS。 |
| | | | |
| | | | 对于 ESP station出现以下情况时报告该代码 |
| | | | |
| | | | - 从 AP 接收到该代码; |
| | | | - 由于调用 :cpp:func:`esp_wifi_disconnect()` 其它 API |
| | | | station 断开连接。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| ASSOC_NOT_AUTHED | 9 | 9 | STA 的 re(association) 请求未被响应 STA 认证。 |
| | | | |
| | | | 对于 ESP station出现以下情况时报告该代码 |
| | | | |
| | | | - 从 AP 接收到该代码。 |
| | | | |
| | | | 对于 ESP AP出现以下情况时报告该代码 |
| | | | |
| | | | - AP 从一个已关联,但未认证的 station 接收到数据包。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| DISASSOC_PWRCAP_BAD | 10 | 10 | association 取消,因为无法接收功率能力 (Power Capability) |
| | | | 元素中的信息。 |
| | | | |
| | | | 对于 ESP station出现以下情况时报告该代码 |
| | | | |
| | | | - 从 AP 接收到该代码。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| DISASSOC_SUPCHAN_BAD | 11 | 11 | association 取消,因为无法接收支持的信道 (Supported Channels) |
| | | | 元素中的信息。 |
| | | | |
| | | | 对于 ESP station出现以下情况时报告该代码 |
| | | | |
| | | | - 从 AP 接收到该代码。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| IE_INVALID | 13 | 13 | 无效元素,即内容不符合 Wi-Fi 协议中帧格式 (Frame formats) |
| | | | 章节所描述标准的元素。 |
| | | | |
| | | | 对于 ESP station出现以下情况时报告该代码 |
| | | | |
| | | | - 从 AP 接收到该代码。 |
| | | | |
| | | | 对于 ESP AP出现以下情况时报告该代码 |
| | | | |
| | | | - AP 解析了一个错误的 WPA 或 RSN IE。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| MIC_FAILURE | 14 | 14 | 消息完整性代码 (MIC) 出错。 |
| | | | |
| | | | 对于 ESP station出现以下情况时报告该代码 |
| | | | |
| | | | - 从 AP 接收到该代码。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| 4WAY_HANDSHAKE_TIMEOUT | 15 | 15 | 四次握手超时。由于某些历史原因,在 ESP 中该原因代码实为 |
| | | | WIFI_REASON_HANDSHAKE_TIMEOUT。 |
| | | | |
| | | | 对于 ESP station出现以下情况时报告该代码 |
| | | | |
| | | | - 握手超时; |
| | | | - 从 AP 接收到该代码。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| GROUP_KEY_UPDATE_TIMEOUT | 16 | 16 | 组密钥 (Group-Key) 握手超时。 |
| | | | |
| | | | 对于 ESP station出现以下情况时报告该代码 |
| | | | |
| | | | - 从 AP 接收到该代码。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| IE_IN_4WAY_DIFFERS | 17 | 17 | 四次握手中产生的元素与 (re-)association 后的 request/probe 以及 |
| | | | response/beacon frame 中的信息不同。 |
| | | | |
| | | | 对于 ESP station出现以下情况时报告该代码 |
| | | | |
| | | | - 从 AP 接收到该代码; |
| | | | - station 发现四次握手的 IE 与 (re-)association 后的 request/probe |
| | | | 以及 response/beacon frame 中的 IE 不同。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| GROUP_CIPHER_INVALID | 18 | 18 | 无效组密文。 |
| | | | |
| | | | 对于 ESP station出现以下情况时报告该代码 |
| | | | |
| | | | - 从 AP 接收到该代码。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| PAIRWISE_CIPHER_INVALID | 19 | 19 | 无效成对密文。 |
| | | | |
| | | | 对于 ESP station出现以下情况时报告该代码 |
| | | | |
| | | | - 从 AP 接收到该代码。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| AKMP_INVALID | 20 | 20 | 无效 AKMP。 |
| | | | |
| | | | 对于 ESP station出现以下情况时报告该代码 |
| | | | |
| | | | - 从 AP 接收到该代码。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| UNSUPP_RSN_IE_VERSION | 21 | 21 | RSNE 版本不支持。 |
| | | | |
| | | | 对于 ESP station出现以下情况时报告该代码 |
| | | | |
| | | | - 从 AP 接收到该代码。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| INVALID_RSN_IE_CAP | 22 | 22 | 无效的 RSNE 性能。 |
| | | | |
| | | | 对于 ESP station出现以下情况时报告该代码 |
| | | | |
| | | | - 从 AP 接收到该代码。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| 802_1X_AUTH_FAILED | 23 | 23 | IEEE 802.1X. authentication 失败。 |
| | | | |
| | | | 对于 ESP station出现以下情况时报告该代码 |
| | | | |
| | | | - 从 AP 接收到该代码。 |
| | | | |
| | | | 对于 ESP AP出现以下情况时报告该代码 |
| | | | |
| | | | - IEEE 802.1X. authentication 失败。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| CIPHER_SUITE_REJECTED | 24 | 24 | 因安全策略,安全密钥算法套件 (cipher suite) 被拒。 |
| | | | |
| | | | 对于 ESP station出现以下情况时报告该代码 |
| | | | |
| | | | - 从 AP 接收到该代码。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| BEACON_TIMEOUT | 200 | reserved | 乐鑫特有的 Wi-Fi 原因代码: 当 station 连续失去 N 个 beacon |
| | | | 将中断连接并报告该代码。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| NO_AP_FOUND | 201 | reserved | 乐鑫特有的 Wi-Fi 原因代码: 当 station 未扫描到目标 AP 时, |
| | | | 将报告该代码。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| AUTH_FAIL | 202 | reserved | 乐鑫特有的 Wi-Fi 原因代码: authentication 失败, |
| | | | 但并非由超时而引发。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| ASSOC_FAIL | 203 | reserved | 乐鑫特有的 Wi-Fi 原因代码: association 失败,但并非由 |
| | | | ASSOC_EXPIRE 或 ASSOC_TOOMANY 引发。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| HANDSHAKE_TIMEOUT | 204 | reserved | 乐鑫特有的 Wi-Fi 原因代码: 握手失败,与 |
| | | | WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT 中失败原因相同。 |
+--------------------------+------+----------+-------------------------------------------------------------------------+
| CONNECTION_FAIL | 205 | reserved | 乐鑫特有的 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 连接