Chapter 4. API Guides
Reason code Value Mapped To Description
UNSPECIFIED 1 1 Generally, it means an
internal failure, e.g., the
memory runs out, the in-
ternal TX fails, or the rea-
son is received from the
remote side, etc.
AUTH_EXPIRE 2 2 The previous authentica-
tion is no longer valid.
For the ESP Station, this
reason is reported when:
• auth is timed out.
• the reason is re-
ceived from the
AP.
For the ESP AP, this rea-
son is reported when:
• the AP has not re-
ceived any packets
from the station in
the past five min-
utes.
• the AP is
stopped by calling
esp_wifi_stop().
• the station is de-
authed by calling
esp_wifi_deauth_sta().
AUTH_LEAVE 3 3 De-authenticated, be-
cause 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 inac-
tivity.
For the ESP Station, this
reason is reported when:
• it is received from
the AP.
For the ESP AP, this rea-
son is reported when:
• the AP has not re-
ceived any packets
from the station in
the past five min-
utes.
• the AP is
stopped by calling
esp_wifi_stop()
• the station is de-
authed by calling
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 rea-
son is reported when:
• the stations as-
sociated 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 rea-
son 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 rea-
son 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
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 rea-
son is reported when:
• the AP receives
packets with data
from an asso-
ciated, yet not
authenticated,
station.
DISASSOC_PWRCAP_BAD10 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_BAD11 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 el-
ement whose content does
not meet the specifica-
tions 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 rea-
son 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_TIMEOUT15 15 Four-way handshake
times out. For legacy rea-
sons, 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_TIMEOUT16 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 Re-
quest/Probe and Re-
sponse/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_INVALID18 18 Invalid group cipher.
For the ESP Station, this
reason is reported when:
• it is received from
the AP.
PAIRWISE_CIPHER_INVALID19 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_VERSION21 21 Unsupported RSNE ver-
sion.
For the ESP Station, this
reason is reported when:
• it is received from
the AP.
INVALID_RSN_IE_CAP 22 22 Invalid RSNE capabili-
ties.
For the ESP Station, this
reason is reported when:
• it is received from
the AP.
802_1X_AUTH_FAILED 23 23 IEEE 802.1X. authentica-
tion failed.
For the ESP Station, this
reason is reported when:
• it is received from
the AP.
For the ESP AP, this rea-
son is reported when:
• 802.1 x authentica-
tion fails.
CIPHER_SUITE_REJECTED24 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 authen-
tication fails, but not
because of a timeout.
ASSOC_FAIL 203 reserved Espressif-specific Wi-Fi
reason-code: the associa-
tion 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 con-
nection to the AP has
failed.
Espressif Systems 1531
Submit Document Feedback
Release v4.4