SYSTEM_EVENT_STA_DISCONNECTED reason 201 after powerup

bitrot
Posts: 1
Joined: Sat Oct 20, 2018 7:59 pm

SYSTEM_EVENT_STA_DISCONNECTED reason 201 after powerup

Postby bitrot » Sat Oct 20, 2018 8:28 pm

Others have seen this when reconnecting, I get it all the time, after powerup: SYSTEM_EVENT_STA_DISCONNECTED with reason 201 directly after esp_wifi_connect(). I am totally running out of things to test, any help is greatly appreciated!

Tested with the simple_wifi example in the SDK and also with my own code; and with an SDK git-cloned on 20 Oct 2018. Tried four different APs that work with other clients, with WPA2/PSK and also open network (ie. no password needed), using various distances to the AP. Checked supply voltage with a scope, looks great. Got another ESP32 that gets SYSTEM_EVENT_STA_DISCONNECTED periodically: might be good for 12 hours, then continuously fails for six hours, then good again. Got another that works with three APs, but always fails with a fourth, even though the failing AP is identical (hw, sw, local network) to a good one.

The connection attempts fail quickly, after about 2.3 seconds. Seems short for association negotiation. Some overly enthusiastic timeout perhaps? But the SDK doesn't let me tweak any settings. Unfortunately I have no way to watch packets in the air.

Here's the relevant section of the verbose log output (I added the "...event %d" line at the beginning of the callback, 5 is SYSTEM_EVENT_STA_DISCONNECTED; full log in https://bitrot.de/esp32log.txt).

I (679) wifi: mode : sta (30:ae:a4:02:a6:24)
D (679) event: SYSTEM_EVENT_STA_START
V (679) event: enter default callback
I (679) simple wifi: wifi_init_sta finished.
V (679) tcpip_adapter: check: local, if=0 fn=0x400e454c
V (699) tcpip_adapter: call api in lwip: ret=0x0, give sem
V (699) tcpip_adapter: check: remote, if=0 fn=0x400e454c
V (709) event: exit default callback
I (709) simple wifi: ...event 2
I (719) simple wifi: connect to ap SSID:myssid password:mypassword

D (3129) event: SYSTEM_EVENT_STA_DISCONNECTED, ssid:myssid, ssid_len:6, bssid:00:00:00:00:00:00, reason:201

V (3129) event: enter default callback
V (3129) tcpip_adapter: check: local, if=0 fn=0x400e4b58
D (3139) tcpip_adapter: if0 start ip lost tmr: enter
D (3139) tcpip_adapter: if0 start ip lost tmr: no need start because netif=0x3ffc5b60 interval=120 ip=0
V (3149) tcpip_adapter: call api in lwip: ret=0x0, give sem
V (3159) tcpip_adapter: check: remote, if=0 fn=0x400e4b58
V (3159) event: exit default callback
I (3159) simple wifi: ...event 5

D (5579) event: SYSTEM_EVENT_STA_DISCONNECTED, ssid:myssid, ssid_len:6, bssid:00:00:00:00:00:00, reason:201

V (5579) event: enter default callback

Thanks for your help!

Return to “ESP32 IDF”

Who is online

Users browsing this forum: loboris and 9 guests