-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32 WiFi.begin works only every second time - workaround #2501
Comments
Also I confirm it , i use check every 5 seconds if is not connect, also sometimes passing char[] ssid and pass not work, i ve said many times but i never get a reply |
From my experience, it seems that a
Seems to reset the configurations. To be clear, while closing a connection/disconnecting you need to clear the configurations to enable a clean connect the second time around. I've used this to ensure solid connects and reconnects with any network. Although this seems to fail regardless of settings when connecting to a Mobile Hotspot. I feel it has something to do with the mobile hotspots, though. |
I trying to solve the exact same problem here - Is there something I can do to help fix this problem? |
Facing the same issue here. If I capture the events via WiFi.on, i get the When I keep resetting the board, this event is occuring every other time. |
Also experiencing this issue. NodeMCU board with ESP-WROOM-32. Calling WiFi.disconnect did not help. |
with library 1.0.3 rc connection 1 of 3 go , with 1.0.2 at 2 of 3 connect |
I can confirm the issue with latest GIT. |
I'm new to GitHub so please keep the flames low. I have duplicated the aforementioned "every other reset" issue on several ESP32 Wroom. I have also found a permanent solution to my problem. Not to suggest that this will address others problems but certainly worth the effort. I my case; ESP32 connected with RSSI levels of -70 or higher (even lower signal strength). After moving my project to final destination, RSSI levels of -50 or lower (higher signal strength) have been the expected normal. My ESP32 is connecting after every reset without any problem. So, signal quality appears to have EVERYTHING to do with my issue. I have not verified at what signal levels do things again become marginal. Just to be clear: Followed after reset by: Results after every reset with RSSI at -50 or lower Hope this helps someone. |
Well, that may help pinpoint the bugs source code location. I did a different approach: RTC_DATA_ATTR int bootCount;
void setup() {
// ...
// Reset Boot counter if reason was brownout or first power-on
if (rtc_get_reset_reason(0) == 1 || rtc_get_reset_reason(0) == 15 || rtc_get_reset_reason(1) == 1 || rtc_get_reset_reason(1) == 15) { bootCount = 0; }
bootCount++;
// [Try to connect to WIFI here]
if (WiFi.status() == WL_CONNECTED) {
Serial.print("...WIFI is connected, local IP: ");
Serial.println(WiFi.localIP());
} else {
if (bootCount < 3) {
Serial.println("...failed, REBOOT!");
// Do not use ESP.restart! This would reset the RTC memory.
esp_sleep_enable_timer_wakeup(10);
esp_deep_sleep_start();
} else {
Serial.println("...finally failed.");
Serial.println("Opening unprotected access point...");
// Code to open WIFI AP
}
}
// ...
} |
I had the same problem, the ESP.reboot() or esp_deep_sleep_start(); cannot proper reset the WiFi-Hardware, so every sencond time I got no Wifi connection. else if (wifi_state == WL_DISCONNECTED) // WiFi.disconnect was done or Router.WiFi got out of range |
Same here... Its pretty annoying...
|
By the way another Solution:
|
I had the same issue and it was fixed with calling |
How come this problem is still present?!?! EPS32 is a mess like this. |
Another possibility is using wifimulti. But it takes longer.
|
wifiMulti.run() works only at second time after reset
result:
|
Yes. But it doesnt reboot the ESP ;) |
Use WiFiMulti, (bug in ESP32 release 1.0.2 and 1.0.3) Reason: 202 - AUTH_FAIL after reset, see espressif/arduino-esp32#2501
Are there any news on this? |
Not fine, but this seems to work for me:
|
|
I'm also facing this annoying issue. The WiFi issue seems to depend on the router or AP the ESP32 connects to. I really hope someone will find the reason for this bug and find a solution ! |
* do not launch a ble scan if mqtt client is disconnected * add wifi.begin when disconnected espressif/arduino-esp32#2501
I too have this issue - but I am having much more difficult luck than most. It seems as though some combination of the disconnect, and deep-sleep reboot work - but sometimes it takes several reboots for that to happen. My AP is usually -70 to -50 dB. I can't believe that this has gone on for SO LONG with so many people having connection issues... BTW - BLE works flawlessly. |
Hi everyone, this could be a little OT, but I have a very similar problem with an ESP32 Heltec Wifi Kit 32. |
Yes
I have a user with a Fritz 7390 who has a similar issue, connects then
drops. A 4 way handshake error was reported yet unable to recreate locally.
Another router works fine...
…On Mon, 7 Mar 2022, 10:24 pm SofaSurfer76, ***@***.***> wrote:
Hi everyone, this could be a little OT, but I have a very similar problem
with an ESP32 Heltec Wifi Kit 32.
My router is a Fritz Box 7530, and I have problem to connect to it ONLY
with this ESP32. after a few seconds after gettin IP of the ESP, the
connection drops. I have tried both with Arduino IDE (not in multi
connection), forcing reconnection with no results, and I have the same
issue with ESPHOME,
I thik it's a problem only with FRITZ routers. I am solving this issue by
using a repeater non-Fritz, in this way it works fine and the connection is
stable.
Did someone have the same or a comparable issue?
—
Reply to this email directly, view it on GitHub
<#2501 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG6NZGKM55QWNGAHHY7KIHLU6XRPVANCNFSM4GZZ3XNA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Sorry, correction. User has a 7590, not 7390.
…On Tue, 8 Mar 2022, 5:11 am Ray Jones, ***@***.***> wrote:
Yes
I have a user with a Fritz 7390 who has a similar issue, connects then
drops. A 4 way handshake error was reported yet unable to recreate locally.
Another router works fine...
On Mon, 7 Mar 2022, 10:24 pm SofaSurfer76, ***@***.***>
wrote:
> Hi everyone, this could be a little OT, but I have a very similar problem
> with an ESP32 Heltec Wifi Kit 32.
> My router is a Fritz Box 7530, and I have problem to connect to it ONLY
> with this ESP32. after a few seconds after gettin IP of the ESP, the
> connection drops. I have tried both with Arduino IDE (not in multi
> connection), forcing reconnection with no results, and I have the same
> issue with ESPHOME,
> I thik it's a problem only with FRITZ routers. I am solving this issue by
> using a repeater non-Fritz, in this way it works fine and the connection is
> stable.
> Did someone have the same or a comparable issue?
>
> —
> Reply to this email directly, view it on GitHub
> <#2501 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AG6NZGKM55QWNGAHHY7KIHLU6XRPVANCNFSM4GZZ3XNA>
> .
> Triage notifications on the go with GitHub Mobile for iOS
> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> or Android
> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
|
Yes, I saw as well the "handshake error" with another Heltec wifi kit 32, the first I have bought. Defo it's not a matter of device.. I will check fritz setting and if I can find something I will post it, maybe I will open another thread. In my case I can avoid the problem with the extender (out of my mesh network). |
Post esp32 debug serial output please so we can confirm its the same or similar issue, another bugfix (workarounds) was posted recently for this by p-r-o-c-h-y |
Hi, Tonight I was able to connect with Arduino ide running the Factory test, if connected directly to Fritz router the connection drops after a few minutes and never connect; if I am connected to my extender non-mesh the connection is stable and I can ping for hours.
|
A bit different logs here , but same gist
*WM: [1] connectTimeout not set, ESP waitForConnectResult...
[D][WiFiGeneric.cpp:374] _eventCallback(): Event: 1 - SCAN_DONE
*WM: [2] [EVENT] 1
*WM: [3] event handler - Wifi SCAN completed
*WM: [1] Home
*WM: [1] Besucher
1 Wifi networks found
1 : [44:4E:6D:FF:B2:B2] Home (-86) - Known!
*WM: [3] WiFi_enableSTA enable
*WM: [3] Mode after delay: STA
Connecting to Wifi Network: [44:4E:6D:FF:B2:B2] Home
Using DHCP
[D][WiFiGeneric.cpp:374] _eventCallback(): Event: 5 - STA_DISCONNECTED
[W][WiFiGeneric.cpp:391] _eventCallback(): Reason: 15 -
4WAY_HANDSHAKE_TIMEOUT
[2] [EVENT] 5
STA disconnected event, STA scan=0, holdoff=33543
*WM: [2] [EVENT] STA_DISCONNEC\ED WIFI_REASON: 15
*WM: [2] Connection result: WL_DISCONNECTED
*WM: [3] lastconxresulttmp: WL_DISCONNECTED
*WM: [3] lastconxreswlt: WL_DISCONNECTED
*WM: [1] AutoConnect: FAILED
…On Tue, 8 Mar 2022 at 09:04, SofaSurfer76 ***@***.***> wrote:
Hi,
below the log from serial output, the code is from Esphome, at the end
there are the "4 handshake..."
Tonight I was able to connect with Arduino ide running the Factory test,
if connected directly to Fritz router the connection drops after a few
minutes and never connect; if I am connected to my extender non-mesh the
connection is stable and I can ping for hours.
�[0;32m[I][app:062]: setup() finished successfully!�[0m
�[0;32m[I][app:102]: ESPHome version 2022.2.1 compiled on Mar 7 2022, 21:03:38�[0m
�[0;35m[C][wifi:491]: WiFi:�[0m
�[0;35m[C][wifi:353]: Local MAC: 24:6F:28:79:14:00�[0m
�[0;35m[C][wifi:354]: SSID: �[5m'Livello_pozzo'�[6m�[0m
�[0;35m[C][wifi:355]: IP Address: 20.20.1.109�[0m
�[0;35m[C][wifi:357]: BSSID: �[5m14:59:C0:9B:2D:DB�[6m�[0m
�[0;35m[C][wifi:358]: Hostname: 'livello-pozzo-old'�[0m
�[0;35m[C][wifi:360]: Signal strength: -75 dB �[0;33m▂▄�[0;37m▆█�[0m�[0m
�[0;37m[V][wifi:362]: Priority: 0.0�[0m
�[0;35m[C][wifi:364]: Channel: 1�[0m
�[0;35m[C][wifi:365]: Subnet: 255.255.255.0�[0m
�[0;35m[C][wifi:366]: Gateway: 20.20.1.1�[0m
�[0;35m[C][wifi:367]: DNS1: 0.0.0.0�[0m
�[0;35m[C][wifi:368]: DNS2: 0.0.0.0�[0m
�[0;35m[C][logger:233]: Logger:�[0m
�[0;35m[C][logger:234]: Level: VERBOSE�[0m
�[0;35m[C][logger:235]: Log Baud Rate: 115200�[0m
�[0;35m[C][logger:236]: Hardware UART: UART0�[0m
�[0;35m[C][captive_portal:144]: Captive Portal:�[0m
�[0;35m[C][web_server:179]: Web Server:�[0m
�[0;35m[C][web_server:180]: Address: 20.20.1.109:80�[0m
�[0;35m[C][mdns:084]: mDNS:�[0m
�[0;35m[C][mdns:085]: Hostname: livello-pozzo-old�[0m
�[0;37m[V][mdns:086]: Services:�[0m
�[0;37m[V][mdns:088]: - _esphomelib, _tcp, 6053�[0m
�[0;37m[V][mdns:090]: TXT: version = 2022.2.1�[0m
�[0;37m[V][mdns:090]: TXT: mac = 246f28791400�[0m
�[0;37m[V][mdns:090]: TXT: platform = ESP32�[0m
�[0;37m[V][mdns:090]: TXT: board = heltec_wifi_kit_32_v2�[0m
�[0;35m[C][ota:085]: Over-The-Air Updates:�[0m
�[0;35m[C][ota:086]: Address: 20.20.1.109:3232�[0m
�[0;35m[C][ota:089]: Using Password.�[0m
�[0;33m[W][ota:095]: Last Boot was an unhandled reset, will proceed to safe mode in 5 restarts�[0m
�[0;35m[C][api:138]: API Server:�[0m
�[0;35m[C][api:139]: Address: 20.20.1.109:6053�[0m
�[0;35m[C][api:143]: Using noise encryption: NO�[0m
�[0;37m[V][esp-idf:000]: I (7568) wifi:�[0m
�[0;37m[V][esp-idf:000]: state: run -> init (fc0)�[0m
�[0;37m[V][esp-idf:000]:
�[0m
�[0;37m[V][esp-idf:000]: I (7570) wifi:�[0m
�[0;37m[V][esp-idf:000]: pm stop, total sleep time: 0 us / 2960062 us
�[0m
�[0;37m[V][esp-idf:000]:
�[0m
�[0;37m[V][esp-idf:000]: I (7583) wifi:�[0m
�[0;37m[V][esp-idf:000]: new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1�[0m
�[0;37m[V][esp-idf:000]:
�[0m
[D][WiFiGeneric.cpp:374] _eventCallback(): Event: 5 - STA_DISCONNECTED
[W][WiFiGeneric.cpp:391] _eventCallback(): Reason: 15 - 4WAY_HANDSHAKE_TIMEOUT
�[0;33m[W][wifi_esp32:495]: Event: Disconnected ssid='Livello_pozzo' bssid=�[5m14:59:C0:9B:2D:DB�[6m reason='4-Way Handshake Timeout'�[0m
�[0;33m[W][wifi:120]: WiFi Connection lost... Reconnecting...�[0m
�[0;32m[I][wifi:248]: WiFi Connecting to 'Livello_pozzo'...�[0m
�[0;37m[V][wifi:250]: Connection Params:�[0m
�[0;37m[V][wifi:251]: SSID: 'Livello_pozzo'�[0m
�[0;37m[V][wifi:254]: BSSID: 14:59:C0:9B:2D:DB�[0m
�[0;37m[V][wifi:274]: Password: �[5mxxxxxxxxxxxxxxxx'�[6m�[0m
�[0;37m[V][wifi:279]: Channel: 1�[0m
�[0;37m[V][wifi:286]: Manual IP: Static IP=20.20.1.109 Gateway=20.20.1.1 Subnet=255.255.255.0 DNS1=0.0.0.0 DNS2=0.0.0.0�[0m
�[0;37m[V][wifi:290]: Hidden: NO�[0m
�[0;37m[V][component:199]: Component wifi took a long time for an operation (0.05 s).�[0m
�[0;37m[V][component:200]: Components should block for at most 20-30ms.�[0m
�[0;37m[V][esp-idf:000]: I (7688) wifi:�[0m
�[0;37m[V][esp-idf:000]: state: auth -> assoc (0)�[0m
�[0;37m[V][esp-idf:000]:
�[0m
�[0;37m[V][esp-idf:000]: I (7702) wifi:�[0m
�[0;37m[V][esp-idf:000]: state: assoc -> run (10)�[0m
�[0;37m[V][esp-idf:000]:
�[0m
�[0;37m[V][esp-idf:000]: I (10005) wifi:�[0m
�[0;37m[V][esp-idf:000]: connected with Livello_pozzo, aid = 1, channel 1, BW20, bssid = 14:59:c0:9b:2d:db�[0m
�[0;37m[V][esp-idf:000]:
�[0m
�[0;37m[V][esp-idf:000]: I (10011) wifi:�[0m
�[0;37m[V][esp-idf:000]: security type: 3, phy: bgn, rssi: -73�[0m
�[0;37m[V][esp-idf:000]:
�[0m
�[0;37m[V][esp-idf:000]: I (10024) wifi:�[0m
�[0;37m[V][esp-idf:000]: pm start, type: 0
�[0m
�[0;37m[V][esp-idf:000]:
�[0m
[D][WiFiGeneric.cpp:374] _eventCallback(): Event: 7 - STA_GOT_IP
[D][WiFiGeneric.cpp:419] _eventCallback(): STA IP: 20.20.1.109, MASK: 255.255.255.0, GW: 20.20.1.1
�[0;37m[V][wifi_esp32:537]: Event: Got IP static_ip=20.20.1.109 gateway=20.20.1.1�[0m
[D][WiFiGeneric.cpp:374] _eventCallback(): Event: 7 - STA_GOT_IP
[D][WiFiGeneric.cpp:419] _eventCallback(): STA IP: 20.20.1.109, MASK: 255.255.255.0, GW: 20.20.1.1
�[0;37m[V][esp-idf:000]: AP's beacon interval = 102400 us, DTIM period = 2�[0m
�[0;37m[V][esp-idf:000]:
�[0m
�[0;32m[I][wifi:505]: WiFi Connected!�[0m
�[0;35m[C][wifi:353]: Local MAC: 24:6F:28:79:14:00�[0m
�[0;35m[C][wifi:354]: SSID: �[5m'Livello_pozzo'�[6m�[0m
�[0;35m[C][wifi:355]: IP Address: 20.20.1.109�[0m
�[0;35m[C][wifi:357]: BSSID: �[5m14:59:C0:9B:2D:DB�[6m�[0m
�[0;35m[C][wifi:358]: Hostname: 'livello-pozzo-old'�[0m
�[0;35m[C][wifi:360]: Signal strength: -73 dB �[0;33m▂▄�[0;37m▆█�[0m�[0m
�[0;37m[V][wifi:362]: Priority: -1.0�[0m
�[0;35m[C][wifi:364]: Channel: 1�[0m
�[0;35m[C][wifi:365]: Subnet: 255.255.255.0�[0m
�[0;35m[C][wifi:366]: Gateway: 20.20.1.1�[0m
�[0;35m[C][wifi:367]: DNS1: 0.0.0.0�[0m
�[0;35m[C][wifi:368]: DNS2: 0.0.0.0�[0m
�[0;36m[D][wifi:514]: Disabling AP...�[0m
�[0;37m[V][component:199]: Component wifi took a long time for an operation (0.07 s).�[0m
�[0;37m[V][component:200]: Components should block for at most 20-30ms.�[0m
�[0;37m[V][esp-idf:000]: I (12992) wifi:�[0m
�[0;37m[V][esp-idf:000]: state: run -> init (fc0)�[0m
�[0;37m[V][esp-idf:000]:
�[0m
�[0;37m[V][esp-idf:000]: I (12994) wifi:�[0m
�[0;37m[V][esp-idf:000]: pm stop, total sleep time: 0 us / 2959625 us
�[0m
�[0;37m[V][esp-idf:000]:
�[0m
�[0;37m[V][esp-idf:000]: I (13007) wifi:�[0m
�[0;37m[V][esp-idf:000]: new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1�[0m
�[0;37m[V][esp-idf:000]:
�[0m
[D][WiFiGeneric.cpp:374] _eventCallback(): Event: 5 - STA_DISCONNECTED
[W][WiFiGeneric.cpp:391] _eventCallback(): Reason: 15 - 4WAY_HANDSHAKE_TIMEOUT
�[0;33m[W][wifi_esp32:495]: Event: Disconnected ssid='Livello_pozzo' bssid=�[5m14:59:C0:9B:2D:DB�[6m reason='4-Way Handshake Timeout'�[0m
�[0;33m[W][wifi:120]: WiFi Connection lost... Reconnecting...�[0m
�[0;32m[I][wifi:248]: WiFi Connecting to 'Livello_pozzo'...�[0m
�[0;37m[V][wifi:250]: Connection Params:�[0m
�[0;37m[V][wifi:251]: SSID: 'Livello_pozzo'�[0m
�[0;37m[V][wifi:254]: BSSID: 14:59:C0:9B:2D:DB�[0m
�[0;37m[V][wifi:274]: Password: �[5m'xxxxxxxxxxxxxxxxxx'�[6m�[0m
�[0;37m[V][wifi:279]: Channel: 1�[0m
�[0;37m[V][wifi:286]: Manual IP: Static IP=20.20.1.109 Gateway=20.20.1.1 Subnet=255.255.255.0 DNS1=0.0.0.0 DNS2=0.0.0.0�[0m
�[0;37m[V][wifi:290]: Hidden: NO�[0m
�[0;37m[V][component:199]: Component wifi took a long time for an operation (0.05 s).�[0m
�[0;37m[V][component:200]: Components should block for at most 20-30ms.�[0m
�[0;37m[V][esp-idf:000]: I (13115) wifi:�[0m
�[0;37m[V][esp-idf:000]: state: auth -> assoc (0)�[0m
�[0;37m[V][esp-idf:000]:
�[0m
�[0;37m[V][esp-idf:000]: I (13128) wifi:�[0m
�[0;37m[V][esp-idf:000]: state: assoc -> run (10)�[0m
�[0;37m[V][esp-idf:000]:
�[0m
�[0;37m[V][esp-idf:000]: I (13436) wifi:�[0m
�[0;37m[V][esp-idf:000]: connected with Livello_pozzo, aid = 1, channel 1, BW20, bssid = 14:59:c0:9b:2d:db�[0m
�[0;37m[V][esp-idf:000]:
�[0m
�[0;37m[V][esp-idf:000]: I (13442) wifi:�[0m
�[0;37m[V][esp-idf:000]: security type: 3, phy: bgn, rssi: -73�[0m
�[0;37m[V][esp-idf:000]:
�[0m
�[0;37m[V][esp-idf:000]: I (13455) wifi:�[0m
�[0;37m[V][esp-idf:000]: pm start, type: 0
�[0m
�[0;37m[V][esp-idf:000]:
�[0m
�[0;37m[V][esp-idf:000]: I (13467) wifi:�[0m
�[0;37m[V][esp-idf:000]: AP's beacon interval = 102400 us, DTIM period = 2�[0m
�[0;37m[V][esp-idf:000]:
�[0m
[D][WiFiGeneric.cpp:374] _eventCallback(): Event: 7 - STA_GOT_IP
[D][WiFiGeneric.cpp:419] _eventCallback(): STA IP: 20.20.1.109, MASK: 255.255.255.0, GW: 20.20.1.1
�[0;37m[V][wifi_esp32:537]: Event: Got IP static_ip=20.20.1.109 gateway=20.20.1.1�[0m
[D][WiFiGeneric.cpp:374] _eventCallback(): Event: 7 - STA_GOT_IP
[D][WiFiGeneric.cpp:419] _eventCallback(): STA IP: 20.20.1.109, MASK: 255.255.255.0, GW: 20.20.1.1
�[0;37m[V][wifi_esp32:537]: Event: Got IP static_ip=20.20.1.109 gateway=20.20.1.1�[0m
�[0;32m[I][wifi:505]: WiFi Connected!�[0m
�[0;35m[C][wifi:353]: Local MAC: 24:6F:28:79:14:00�[0m
�[0;35m[C][wifi:354]: SSID: �[5m'Livello_pozzo'�[6m�[0m
�[0;35m[C][wifi:355]: IP Address: 20.20.1.109�[0m
�[0;35m[C][wifi:357]: BSSID: �[5m14:59:C0:9B:2D:DB�[6m�[0m
�[0;35m[C][wifi:358]: Hostname: 'livello-pozzo-old'�[0m
�[0;35m[C][wifi:360]: Signal strength: -74 dB �[0;33m▂▄�[0;37m▆█�[0m�[0m
�[0;37m[V][wifi:362]: Priority: -2.0�[0m
�[0;35m[C][wifi:364]: Channel: 1�[0m
�[0;35m[C][wifi:365]: Subnet: 255.255.255.0�[0m
�[0;35m[C][wifi:366]: Gateway: 20.20.1.1�[0m
�[0;35m[C][wifi:367]: DNS1: 0.0.0.0�[0m
�[0;35m[C][wifi:368]: DNS2: 0.0.0.0�[0m
�[0;36m[D][wifi:514]: Disabling AP...�[0m
�[0;37m[V][component:199]: Component wifi took a long time for an operation (0.06 s).�[0m
�[0;37m[V][component:200]: Components should block for at most 20-30ms.�[0m
�[0;37m[V][esp-idf:000]: I (16426) wifi:�[0m
�[0;37m[V][esp-idf:000]: state: run -> init (fc0)�[0m
�[0;37m[V][esp-idf:000]:
�[0m
�[0;37m[V][esp-idf:000]: I (16428) wifi:�[0m
�[0;37m[V][esp-idf:000]: pm stop, total sleep time: 0 us / 2961869 us
�[0m
�[0;37m[V][esp-idf:000]:
�[0m
�[0;37m[V][esp-idf:000]: I (16441) wifi:�[0m
�[0;37m[V][esp-idf:000]: new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1�[0m
�[0;37m[V][esp-idf:000]:
�[0m
[D][WiFiGeneric.cpp:374] _eventCallback(): Event: 5 - STA_DISCONNECTED
[W][WiFiGeneric.cpp:391] _eventCallback(): Reason: 15 - 4WAY_HANDSHAKE_TIMEOUT
�[0;33m[W][wifi_esp32:495]: Event: Disconnected ssid='Livello_pozzo' bssid=�[5m14:59:C0:9B:2D:DB�[6m reason='4-Way Handshake Timeout'�[0m
�[0;33m[W][wifi:120]: WiFi Connection lost... Reconnecting...�[0m
�[0;32m[I][wifi:248]: WiFi Connecting to 'Livello_pozzo'...�[0m
�[0;37m[V][wifi:250]: Connection Params:�[0m
�[0;37m[V][wifi:251]: SSID: 'Livello_pozzo'�[0m
�[0;37m[V][wifi:254]: BSSID: 14:59:C0:9B:2D:DB�[0m
�[0;37m[V][wifi:274]: Password: �[5m'xxxxxxxxxxxxxxxxxx'�[6m�[0m
�[0;37m[V][wifi:279]: Channel: 1�[0m
�[0;37m[V][wifi:286]: Manual IP: Static IP=20.20.1.109 Gateway=20.20.1.1 Subnet=255.255.255.0 DNS1=0.0.0.0 DNS2=0.0.0.0�[0m
�[0;37m[V][wifi:290]: Hidden: NO�[0m
�[0;37m[V][component:199]: Component wifi took a long time for an operation (0.05 s).�[0m
�[0;37m[V][component:200]: Components should block for at most 20-30ms.�[0m
�[0;37m[V][esp-idf:000]: I (16545) wifi:�[0m
�[0;37m[V][esp-idf:000]: state: auth -> assoc (0)�[0m
�[0;37m[V][esp-idf:000]:
�[0m
�[0;37m[V][esp-idf:000]: I (16560) wifi:�[0m
�[0;37m[V][esp-idf:000]: state: assoc -> run (10)�[0m
�[0;37m[V][esp-idf:000]:
�[0m
�[0;37m[V][esp-idf:000]: I (19780) wifi:�[0m
�[0;37m[V][esp-idf:000]: state: run -> init (fc0)�[0m
�[0;37m[V][esp-idf:000]:
�[0m
�[0;37m[V][esp-idf:000]: I (19782) wifi:�[0m
�[0;37m[V][esp-idf:000]: new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1�[0m
�[0;37m[V][esp-idf:000]:
�[0m
[D][WiFiGeneric.cpp:374] _eventCallback(): Event: 5 - STA_DISCONNECTED
[W][WiFiGeneric.cpp:391] _eventCallback(): Reason: 15 - 4WAY_HANDSHAKE_TIMEOUT
�[0;33m[W][wifi_esp32:495]: Event: Disconnected ssid='Livello_pozzo' bssid=�[5m14:59:C0:9B:2D:DB�[6m reason='4-Way Handshake Timeout'�[0m
�[0;33m[W][wifi:557]: WiFi Unknown connection status 0�[0m
�[0;33m[W][wifi:557]: WiFi Unknown connection status 0�[0m
�[0;33m[W][wifi:557]: WiFi Unknown connection status 0�[0m
�[0;33m[W][wifi:557]: WiFi Unknown connection status 0�[0m
�[0;33m[W][wifi:557]: WiFi Unknown connection status 0�[0m
�[0;33m[W][wifi:557]: WiFi Unknown connection status 0�[0m
�[0;33m[W][wifi:557]: WiFi Unknown connection status 0�[0m
�[0;33m[W][wifi:557]: WiFi Unknown connection status 0�[0m
�[0;33m[W][wifi:557]: WiFi Unknown connection status 0�[0m
�[0;33m[W][wifi:557]: WiFi Unknown connection status 0�[0m
�[0;33m[W][wifi:557]: WiFi Unknown connection status 0�[0m
```
—
Reply to this email directly, view it on GitHub
<#2501 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG6NZGNVZ4U7IMFWOKAZYZTU6Z4NHANCNFSM4GZZ3XNA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Thanks, yes I wonder what causes this one, probably similar cause different software handling on the ap side. Are these both fritzboxs? Anyone know what Also what IDF ver if its not in your logs |
Yes a Fritz 7590.
I'm not able to replicate it, which is a disappointment, and the customer
is on the other side of the globe.
My log snippets were from them.
Maybe of significance is the term "mesh".
I only have a sole Fritz box I bought to try and replicate the problem
(Fail!), but the customer did say they use mesh mode, so perhaps that's a
contributing factor...
At $300 a pop (at best!) I'm not inclined to buy another one and achieve
the same result. :-/
Cheers, Ray
…On Tue, 8 Mar 2022 at 12:09, Shawn A ***@***.***> wrote:
Thanks, yes 4WAY_HANDSHAKE_TIMEOUT seems to not be covered here,
interesting that there is also an regular handshake timeout, perhaps adding
this to the first_connect patch above will help..
I wonder what causes this one, probably similar cause different software
handling on the ap side.
Are these both fritzboxs?
—
Reply to this email directly, view it on GitHub
<#2501 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG6NZGKE5KXKWUD34Y6I3TDU62SD7ANCNFSM4GZZ3XNA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hi, I've just found those, maybe could be useful to someone: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/wifi.html#wi-fi-reason-code https://randomnerdtutorials.com/solved-reconnect-esp32-to-wifi/ |
Yeah without wireshark logs, its best guess, sometimes band steering and mesh. Best workaround for now is to disconnect, delay a few seconds for the router to drop its negotiation queue and try again.. other wise you will have to turn stuff off and test, PMF off, band steering off, wpa2 not 3 etc.. could just be a bug in the router software all these linux boxes uses the same stuff |
Wireshark is great for tracing IP traffic over established transport
layers, but does it also work for the STA/AP setup?
I also already have a 30 second pause before retrying a failed STA
connection.
…On Wed, 9 Mar 2022, 3:46 am Shawn A, ***@***.***> wrote:
Yeah without wireshark logs, its best guess, sometimes band steering and
mesh. Best workaround for now is to disconnect, delay a few seconds for the
router to drop its negotiation queue and try again..
—
Reply to this email directly, view it on GitHub
<#2501 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG6NZGKILVCRZCM54OR4U43U6575NANCNFSM4GZZ3XNA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Yes, Wireshark can capture 802.11 frames when used with a wifi phy that lets you put it into monitor mode. Some hardware does, some doesn't and you also need the capability to lock it to a specific channel. hmm are you sure you are disconnecting fully ? |
This seems to work for me on every restart, working on mobile hotspot as well.. (Without restarting ESP)
|
I realize this issue is closed, but I felt I had to document my $0.02 somewhere and this seemed as an appropriate place as any. My current project requires 4 separate ESP32 in close proximity to each other. I didn't start having issues with wifi until I started dealing with 2 or more going online at the same time. My r&d with a single ESP32 would connect to my router without any issue and work fine. As soon as I attempted to power up additional microcontrollers, the exact issues described here started making a grand entrance - issues connecting galore, but once it did connect (i.e. a second press of the reset button, but not the first) it was rock solid stable. This leads me to believe the onboard pcb antenna is noisy, especially with the initial connect sequence. However, without being armed with any SnR meters or equipment to prove or disprove this, I may as well be shaking my fist at the clouds. My google-fu eventually lead me here. I did want to create an account after finding this thread and trying the code from bhupiister. This the only code that would work for me and connect all 4 ESP32s to my wifi. It's actually quite interesting to watch them connect up on power up - It will take 10 seconds for ONE esp32 to connect, and then another 10 seconds for only ONE more to connect. Another 10 seconds, ... well, you get the idea. Eventually all 4 ESPs will connect.... I just find it strange that they would exhibit this kind of behavior. Hopefully this info helps some wayward intrepid future troubleshooter. (Huge thank you to bhupiister - if no one has told you this yet today, allow me to be the first - you are awesome!) |
Sounds unrelated, try making sure you have WiFi.mode(STA) in your setup if using arduino, aka make sure you are not starting up softaps, as they will certainly cause issues if they are in range of each other. This issue is very specific to access points sending/responding to deauths |
Hi, |
I am getting 4 way handshake timeouts also now. |
Hardware:
Board: ESP32-WROOM-32 Dev Module
Core Installation version: 1.0.1 (installed using board manager feb/23)
IDE name: Arduino IDE 1.88
CPU Frequency: 80MHz
Flash Frequency: 40Mhz
Flash Mode: QIO
Flash Size: 2MB (16MB)
Partition Scheme: Standard
PSRAM enabled: no
Upload Speed: 921600
Computer OS: Windows 10
Description:
With a portable device I need to ensure that WiFi connection is beeing established as soon as the router is in range. Also I need to do some stuff as soon the connection is established or lost (in my sketch below just a serial output).
I have the problem that "WiFi.begin(ssid, pass)" works only every second time. If it doesn't work, I have to press the reset button and then it works. If I press reset again it won't work. Pressing reset again and it works, and so on.
If it doesn't work I get the following output with Debug Level set to verbose:
[W][WiFiGeneric.cpp:357] _eventCallback(): Reason: 202 - AUTH_FAIL
My router is a Fritz! Box 6490 cable and even though I've checked the router's options I can't find anything wrong. Regarding to familiar posts I even have tried with a regulated power supply at 5V (current limit 2.5A) - but no change.
I came up with a workaround with a task checking the connection and that works pretty well. In case of "WiFi.status" turns to "WL_CONNECT_FAILED" I need to call "WiFi.disconnect(true)" and a bit later "WiFi.begin" again.
About the whole working sketch below I have several questions:
Please advise! Thank's!
Sketch:
Debug Messages:
The text was updated successfully, but these errors were encountered: