esp_wifi_internal_reg_rxcb ret=0x3014
micropython: ESP-IDF v3.x GENERICv1.12
Can't Connect WiFi,REPL:
E (1999968) event: system_event_sta_disconnected_handle_default 294 esp_wifi_internal_reg_rxcb ret=0x3014
E (1999968) wifi: esp_wifi_connect 1134 wifi not start
esp32/modnetwork: Fixed wifi.isconnected() is always true, even disconn
I wonder why wlan.isconnected() always return "true" even when some AP gets reboot. And I found patch in commit 039f196c56b97d879b7ce731cd479395dd479c3d which redone logic "is connected" to support StaticIP. Unfortunately it break situation when you are successfully connected and later some AP lost.
This commit fix that, I tested it with static and with dynamic IP. Also in case new connect and also reconnect.
Explain why this idea does not work is: Code probably replied on situation when in reconnect part will esp_wifi_connect return something else than ESP_OK. But regarding to SDK documentation, ESP_OK is return whenever API success. Non OK will return just on some critical error (such out-of-mem...).
This way made code think every (even unsuccessful) attempt of reconnect considered was successful.
It's enough to have it like this, because after reconnect GOT_IP event is called and it will change wifi_sta_connected back to True