← index #11625Issue #11149
Related · high · value 0.580
QUERY · ISSUE

ESP32C3 Connecting to wifi with wrong password will not feedback STAT_WRONG_PASSWORD status

openby walklinewangopened 2023-05-25updated 2023-11-10
bug

I'm building firmware with idf v4.4.4 and master branch pulled yesterday, in my issue I given a wrong password to connect to wifi, but checking network.status() will print logs like below instead of STAT_WRONG_PASSWORD

I (15944) wifi: STA_DISCONNECTED, reason:15
I (18354) wifi: STA_DISCONNECTED, reason:205

According to the document Wi-Fi Reason Code, the reason:205 description is Espressif-specific Wi-Fi reason code: the connection to the AP has failed. and code name is CONNECTION_FAIL

In MicroPython documentation we can find a constant named STAT_CONNECT_FAIL, but it's definition only can found in esp8266 port, I think there must be a connection between CONNECTION_FAIL and STAT_CONNECT_FAIL

CANDIDATE · ISSUE

docs: WLAN.status- Decription of enum value

closedby hasenradballopened 2023-03-29updated 2025-02-04
proposed-close

Dear Support Team,

where can I find the implementation of the wlan.status() documented here:
https://docs.micropython.org/en/latest/library/network.WLAN.html#network.WLAN.status

WLAN.status([param])

    Return the current status of the wireless connection.

    When called with no argument the return value describes the network link status. The possible statuses are defined as constants:
            STAT_IDLE – no connection and no activity,
            STAT_CONNECTING – connecting in progress,
            STAT_WRONG_PASSWORD – failed due to incorrect password,
            STAT_NO_AP_FOUND – failed because no access point replied,
            STAT_CONNECT_FAIL – failed due to other problems,
            STAT_GOT_IP – connection successful.

Because the assumption, that the list is ordered in ascending order of the status value seems not the case, right?
Or where can I look up the values of the enums?

The point is at my Pi zero W, I got status == 3 if wlan is connected. It seems not to be the right value.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied