Repository navigation
Without autoreconnect, forcibly stop station connection manager - #8607
Conversation
Sketches will most likely use `WiFi.status()`, which uses its status Since the SDK itself does not track the event when autoreconnect is disabled, force it into some other state
|
When this event is received while reconnect policy is not set, does it change the connection status after the event ? (right after - or a short while after the event) When the reconnect policy is set, and when ssid has vanished, same question: does status eventually change from "got ip" ? (/me should try it, maybe @TD-er could too) |
Change is immediate and any user event handler (loop down below) will see status() as disconnected
It does. SDK default is auto-reconnect, it will attempt a new connection when disconnected from AP. afaik it will attempt connections indefinitely, unless disconnect() is called from our side. |
|
This is what I also do in ESPEasy, I explicitly call the disconnect before attempting to reconnect. |
No difference. You mean got-IP status from the connection manager? It is set right after assoc happens. Disconnect is handled the same way. |
fix #7432
Sketches are most likely to use
WiFi.status(), which in turn useswifi_station_get_connect_status()return value to determine current STA status.SDK does not seem to track the event when autoreconnect is disabled and does not even change from
STATION_GOT_IP, so we force it into some other stateLooking at RTOS SDK, it does not have autoreconnect like the NONOS does. Instead, it is expected to handle 'DISCONNECTED' event, where
wifi_station_connect();is called to restart the connection cycle. Which also could be used to update some internal 'status' variable... Seems like a lot of changes, though, and does not really fit well with the class approach we have currently.