Wifi reconnect takes a long time
Moderators: grovkillen, Stuntteam, TD-er
-
- Normal user
- Posts: 10
- Joined: 21 Aug 2021, 12:54
Wifi reconnect takes a long time
Hi,
I'm a newbie to ESPEasy, and tried to search for common issues in this forum but couldn't find.
I installed ESP_Easy_mega_20210503_normal_alt_wifi_ESP8266_4M1M on my ESP8266 NodeMCU and everything is working perfectly, except for the fact that when ESPEasy looses wifi connection (e.g. upon router restart), it takes forever to reconnect. Sometime up until 1 hr or more. RSSI is ~-73dbm so not super strong but still valid.
Are there any ESPEasy settings I can play with to make wifi reconnect faster?
thanks!
I'm a newbie to ESPEasy, and tried to search for common issues in this forum but couldn't find.
I installed ESP_Easy_mega_20210503_normal_alt_wifi_ESP8266_4M1M on my ESP8266 NodeMCU and everything is working perfectly, except for the fact that when ESPEasy looses wifi connection (e.g. upon router restart), it takes forever to reconnect. Sometime up until 1 hr or more. RSSI is ~-73dbm so not super strong but still valid.
Are there any ESPEasy settings I can play with to make wifi reconnect faster?
thanks!
Re: Wifi reconnect takes a long time
You should start by updating to the latest release of ESPEasy, 20210802, available from the releases page, that will greatly improve your WiFi connection, because of the many fixes that have been done since that May release.
The alt_wifi release should *only* be used if the normal release-build isn't working as expected.
The alt_wifi release should *only* be used if the normal release-build isn't working as expected.
/Ton (PayPal.me)
-
- Normal user
- Posts: 10
- Joined: 21 Aug 2021, 12:54
Re: Wifi reconnect takes a long time
Thanks. Can I update OTA? Also, once updating, will I need to re-define all previous devices/events?Ath wrote: ↑21 Aug 2021, 13:10 You should start by updating to the latest release of ESPEasy, 20210802, available from the releases page, that will greatly improve your WiFi connection, because of the many fixes that have been done since that May release.
The alt_wifi release should *only* be used if the normal release-build isn't working as expected.
Re: Wifi reconnect takes a long time
Yes
No, if the Flash layout stays the same (4M1M) all settings will be preserved.lamama1234 wrote: ↑21 Aug 2021, 13:18 Also, once updating, will I need to re-define all previous devices/events?
/Ton (PayPal.me)
-
- Normal user
- Posts: 10
- Joined: 21 Aug 2021, 12:54
Re: Wifi reconnect takes a long time
Many thanks!Ath wrote: ↑21 Aug 2021, 13:37Yes
No, if the Flash layout stays the same (4M1M) all settings will be preserved.lamama1234 wrote: ↑21 Aug 2021, 13:18 Also, once updating, will I need to re-define all previous devices/events?
-
- Normal user
- Posts: 10
- Joined: 21 Aug 2021, 12:54
Re: Wifi reconnect takes a long time
Hi again. I installed the latest available firmware:Ath wrote: ↑21 Aug 2021, 13:10 You should start by updating to the latest release of ESPEasy, 20210802, available from the releases page, that will greatly improve your WiFi connection, because of the many fixes that have been done since that May release.
The alt_wifi release should *only* be used if the normal release-build isn't working as expected.
ESP_Easy_mega_20210802_normal_ESP8266_4M1M Aug 2 2021
but still, reconnecting to wifi take a lot of time (>1 hr if at all).
Any other settings I can play with to fix that?
Thanks
Re: Wifi reconnect takes a long time
Can you be a bit more specific about your WiFi setup?
For example, are you using hidden SSID?
Is your WiFi configured to be a WiFi mesh?
Do you have lots of hidden SSID access points in your area (easiest to see on the /setup page or when performing a WiFi scan)
What configuration do you use in ESPEasy? (almost all in the last section of the Tools->Advanced page)
For example, are you using hidden SSID?
Is your WiFi configured to be a WiFi mesh?
Do you have lots of hidden SSID access points in your area (easiest to see on the /setup page or when performing a WiFi scan)
What configuration do you use in ESPEasy? (almost all in the last section of the Tools->Advanced page)
-
- Normal user
- Posts: 10
- Joined: 21 Aug 2021, 12:54
Re: Wifi reconnect takes a long time
Sure. I'm not using a hidden SSID and no other hidden SSIDs in my proximity.TD-er wrote: ↑26 Aug 2021, 14:05 Can you be a bit more specific about your WiFi setup?
For example, are you using hidden SSID?
Is your WiFi configured to be a WiFi mesh?
Do you have lots of hidden SSID access points in your area (easiest to see on the /setup page or when performing a WiFi scan)
What configuration do you use in ESPEasy? (almost all in the last section of the Tools->Advanced page)
I am using a mesh based system (Asus AiMesh with main router and one other node).
I'm also attaching my settings last section configuration:
Re: Wifi reconnect takes a long time
OK, that looks OK to me.
At least nothing I would immediately suggest to try.
About the WiFi mesh setup of your APs.
Given it is a WiFi mesh setup, maybe you can try to set the "Extra WiFi scan loops" to 1 or 2.
What this does, is the ESP will loop 2 or 3 times over all channels when a scan is needed.
This usually results in more found APs in a scan.
Maybe the "best" AP is not always found in a single scan and then the ESP may try to connect to the least favorable AP.
Do you have any setting like an RSSI threshold in the mesh configuration?
For example a settings which only allows a unit to connect if its RSSI is above some level.
If the ESP then always tries to connect to the "wrong" AP, the RSSI of the WiFI signal from the ESP may be too low and the other AP may report it does receive the same unit with a stronger signal.
Other settings to look for:
- Beacon interval. (Typically this is 102.4 msec, so if it differs, please tell)
- Some timeout settings. (sometimes expressed as a "distance" value or "near"/"far")
At least nothing I would immediately suggest to try.
About the WiFi mesh setup of your APs.
Given it is a WiFi mesh setup, maybe you can try to set the "Extra WiFi scan loops" to 1 or 2.
What this does, is the ESP will loop 2 or 3 times over all channels when a scan is needed.
This usually results in more found APs in a scan.
Maybe the "best" AP is not always found in a single scan and then the ESP may try to connect to the least favorable AP.
Do you have any setting like an RSSI threshold in the mesh configuration?
For example a settings which only allows a unit to connect if its RSSI is above some level.
If the ESP then always tries to connect to the "wrong" AP, the RSSI of the WiFI signal from the ESP may be too low and the other AP may report it does receive the same unit with a stronger signal.
Other settings to look for:
- Beacon interval. (Typically this is 102.4 msec, so if it differs, please tell)
- Some timeout settings. (sometimes expressed as a "distance" value or "near"/"far")
Re: Wifi reconnect takes a long time
I also have a Asus mesh. Build a custom flash based on latest (202108) from TD, but use a static ip adress. This I find in previous test worked best to connect. I also include AP settings (prim+ Fallback) in the flash so it connects straight to the AP from a cold boot. This works most of the time. Indeed you have to check the db(RSSI) setting in the mess router that it doesn't disconnect if the strength falls below that value. It happen to me one time and than the only way to reconnect the ESP8266 is by cold reboot.lamama1234 wrote: ↑26 Aug 2021, 16:36Sure. I'm not using a hidden SSID and no other hidden SSIDs in my proximity.TD-er wrote: ↑26 Aug 2021, 14:05 Can you be a bit more specific about your WiFi setup?
For example, are you using hidden SSID?
Is your WiFi configured to be a WiFi mesh?
Do you have lots of hidden SSID access points in your area (easiest to see on the /setup page or when performing a WiFi scan)
What configuration do you use in ESPEasy? (almost all in the last section of the Tools->Advanced page)
I am using a mesh based system (Asus AiMesh with main router and one other node).
I'm also attaching my settings last section configuration:
IMG_20210826_173050.jpg
IMG_20210826_173013.jpg
-
- Normal user
- Posts: 10
- Joined: 21 Aug 2021, 12:54
Re: Wifi reconnect takes a long time
Thanks guys. I think I found a lead - it happens when my esp is changing connection from the main router (with better RSSI) to the other node. Through my mesh UI I am able to see my esp with the same ip as before, but it's web UI is unreachable and it doesn't communicate with my Domoticz server.Rini52 wrote: ↑27 Aug 2021, 15:46I also have a Asus mesh. Build a custom flash based on latest (202108) from TD, but use a static ip adress. This I find in previous test worked best to connect. I also include AP settings (prim+ Fallback) in the flash so it connects straight to the AP from a cold boot. This works most of the time. Indeed you have to check the db(RSSI) setting in the mess router that it doesn't disconnect if the strength falls below that value. It happen to me one time and than the only way to reconnect the ESP8266 is by cold reboot.lamama1234 wrote: ↑26 Aug 2021, 16:36Sure. I'm not using a hidden SSID and no other hidden SSIDs in my proximity.TD-er wrote: ↑26 Aug 2021, 14:05 Can you be a bit more specific about your WiFi setup?
For example, are you using hidden SSID?
Is your WiFi configured to be a WiFi mesh?
Do you have lots of hidden SSID access points in your area (easiest to see on the /setup page or when performing a WiFi scan)
What configuration do you use in ESPEasy? (almost all in the last section of the Tools->Advanced page)
I am using a mesh based system (Asus AiMesh with main router and one other node).
I'm also attaching my settings last section configuration:
IMG_20210826_173050.jpg
IMG_20210826_173013.jpg
I will try to assign a static IP (at client side or router?) and see if it helps.
Thanks
Re: Wifi reconnect takes a long time
You may also want to send Gratuituous ARP packets from the ESP.
This may help other devices in your network to be able to reach the ESP.
... at least if the ESP is considering itself as connected.
It is possible the ESP does not complete all connect stages and then it may stay for a long time in such a limbo state.
Typically this happens if an event is not received in ESPEasy (event from the wifi layer, not related to the rules).
I have seen that happen sometimes, but I find it hard to reproduce.
This may help other devices in your network to be able to reach the ESP.
... at least if the ESP is considering itself as connected.
It is possible the ESP does not complete all connect stages and then it may stay for a long time in such a limbo state.
Typically this happens if an event is not received in ESPEasy (event from the wifi layer, not related to the rules).
I have seen that happen sometimes, but I find it hard to reproduce.
Re: Wifi reconnect takes a long time
The static IP should be set at ESPEasy, on the Config tab. You should fill all 4 fields of WiFi IP Settings, usually the Gateway and DNS are the IP address of the router, and the subnet mask will most likely be 255.255.255.0
/Ton (PayPal.me)
-
- Normal user
- Posts: 10
- Joined: 21 Aug 2021, 12:54
Re: Wifi reconnect takes a long time
Thanks guys, seems to be working ok now.
Appreciate it!
Appreciate it!
-
- Normal user
- Posts: 10
- Joined: 21 Aug 2021, 12:54
Re: Wifi reconnect takes a long time
Gratuituous ARP has the function to tell the switches and APs in your network at what port one can reach the device with a specific MAC address.
So it will not fix (re)connecting to an AP, but it will help to find the node so other devices can communicate with it.
It may also fix reachability right after a node is connected to another AP.
But without Gratuituous ARP enabled, it will eventually appear reachable after some time.
The main problem with the ESP via WiFi is that it is not always receiving ARP requests, so it may not answer them.
Thus by proactively answering ARP requests, before they are even asked, you also tell the switches and APs in your network to store the MAC address in their MAC tables along with the port on which they heard the Gratuituous ARP (or normal ARP reply) packet
So it will not fix (re)connecting to an AP, but it will help to find the node so other devices can communicate with it.
It may also fix reachability right after a node is connected to another AP.
But without Gratuituous ARP enabled, it will eventually appear reachable after some time.
The main problem with the ESP via WiFi is that it is not always receiving ARP requests, so it may not answer them.
Thus by proactively answering ARP requests, before they are even asked, you also tell the switches and APs in your network to store the MAC address in their MAC tables along with the port on which they heard the Gratuituous ARP (or normal ARP reply) packet
-
- Normal user
- Posts: 10
- Joined: 21 Aug 2021, 12:54
Re: Wifi reconnect takes a long time
Got it. I mainly need my ESP to send out data so probably won't be affected much by cancelling Gratuituous ARP. I will give it a try and report back.TD-er wrote: ↑01 Sep 2021, 10:02 Gratuituous ARP has the function to tell the switches and APs in your network at what port one can reach the device with a specific MAC address.
So it will not fix (re)connecting to an AP, but it will help to find the node so other devices can communicate with it.
It may also fix reachability right after a node is connected to another AP.
But without Gratuituous ARP enabled, it will eventually appear reachable after some time.
The main problem with the ESP via WiFi is that it is not always receiving ARP requests, so it may not answer them.
Thus by proactively answering ARP requests, before they are even asked, you also tell the switches and APs in your network to store the MAC address in their MAC tables along with the port on which they heard the Gratuituous ARP (or normal ARP reply) packet
Tnx again
-
- Normal user
- Posts: 10
- Joined: 21 Aug 2021, 12:54
Re: Wifi reconnect takes a long time
Just as a follow-up, cancelling Gratuituous ARP didn't affect connectivity. Everything is working ok now. Thanks everybody!
Re: Wifi reconnect takes a long time
Thanks for the update
Who is online
Users browsing this forum: Google [Bot] and 30 guests