Commit Graph
6 Commits
Author SHA1 Message Date
TD-er 1ccf500b45 [ESP32] Fix ECO mode on ESP32
The option to force WiFi no sleep was unavailable on ESP32.
This effectively made the ECO mode useless on ESP32.
Now this is available again, the current consumption will reduce when enabling ECO mode.
However the current consumption can be lowered even more by switching the ESP32 to 80 MHz.
This will only be set at boot, as dynamic frequency switching is a bit funky.
However Espressif's dynamic frequency scaling does seem to work well, so this is also enabled at boot when ECO mode is set.

The WiFi TX power settings, which are present on ESP8266, are still disabled on ESP32 as it does result in less reliable WiFi connection and higher current consumption compared to the dynamic wifi light sleep mode.
2022-12-15 11:41:06 +01:00
TD-er 3c46f92c85 [Docs] Document WiFi ECO mode 2020-11-23 10:03:21 +01:00
Gijs Noorlander 8c52881d54 [WiFi] Use last known BSSID & channel from RTC + MQTT fixes
Store the last used BSSID and channel in the RTC and use it for initial WiFi connect attempt.
This does speed up the WiFI connection to about 1.8 sec after boot.
Old situation was connected at about 3.9 sec after boot.

When booting from cold boot, the strongest known RSSI is chosen first.

MQTT controller queue handling is now more aggressive in trying to get rid of buffered packets.
It also now accepts the MQTT messages before it is connected to WiFi (or when not yet reconnected)
2019-12-01 23:26:20 +01:00
Gijs Noorlander 07e30ff616 [WiFi] Only reset wifi connect attempt on stable connection (#2650)
See #2650
The counter wifi_connect_attempt is being used to determine whether the fallback SSID should be tried.
It is also used to determine whether a "quick reconnect" is possible using the BSSID and channel of the last successful connection.
If the connection is unstable, (last connection was active for over 5 minutes) then the connect attempt counter can be reset.
2019-10-25 17:32:19 +02:00
Gijs Noorlander 88735f532b [WiFi] Move functions to separate files and document
Move WiFi/Network related functions into separate files to keep them organized and easier to locate.
Also added lots of comments and some documentation on the state machine handling WiFi connect and reconnects.
2019-08-23 18:32:04 +02:00
TD-er 9d0f741e84 [Docs] Add some WiFi related information to docs
Last week I added this text in a discussion on an issue.
It is also useful in the documentation so keep a copy there.
2018-10-23 01:48:26 +02:00