-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
ESP32C3 stopped connecting to home wifi after commit 5940d89 #6379
Comments
More info: I've narrowed it down to the router having TKIP checked as an available algorithm. Btw, router has DD-WRT installed. If I uncheck TKIP but leave all others checked, ESP32 and ESP32C3 connect with latest build. These settings in the router cause the ESP's (32) and (C3) to not find the AP following 5940d89 Authentications Checked WPA Algorithms Using latest release. If I remove TKIP, connections are made: If I remove TKIP and WPA Personal: I believe this isssue, #6348, may be related? Shouldn't it connect anyway to the strongest available mode, even if TKIP is checked? |
WiFiSTA.cpp Changing the threshhold mode in: Fixed my connection issues. But I noticed it's connecting as AUTH: PSK , as it was in previous releases. Shouldn't it be connecting as WPA2_PSK because it's available? My phone connects to this router on 2.4ghz as WPA/WPA2-Personal so I think the router software is working right. Checked my laptop and it also connects to the router's 2.4 band as WPA2-Personal even though all the settings, including TKIP and WPA Personal, are both checked. |
Doing a scan, encryption type is coming up zero That's with these on: If I turn off WPA2 Personal and only leave WPA2 Personal with SHA256 checked That's with router firmware DD-WRT v3.0 (04/06/2020) All other clients, laptop's, phones, etc see the band as encrypted and connect as WPA2-Personal |
You should (for security reasons) always disable TKIP. It is cracked. |
Yep, it's off now. Just WPA & WPA2. It's still returning OPEN encryption on a scan but connecting returns correctly AUTH at WPA_WPA2_PSK. I have a couple of these AC1750 routers, I'm going to put the latest factory firmware on one and do some more testing. There must be some kind of handshaking or beacon info the router puts out that the ESP just isn't picking up correctly... or the DD-WRT software isn't sending out correctly. I have an old Netgear N300 wnr2000v3 I'm going to dig out too. Currently if I only have WPA2 checked in the router, it scans the encryption correctly and connects at WPA2 but with WPA checked as well, it returns OPEN while all other clients see it as encrypted. |
Putting the stock firmware on the C7, the scan results are correct with every security & encryption change. It doesn't give the options like dd-wrt or possibly openwrt as it's mostly drop down or one or the other so it's hard to select certain conditions. Options are [Auto] [WPA] [WPA2] for dropdown WPA/WPA2 Personal The only thing is the WiFiSTA.cpp change in threshold, if I keep it at WIFI_AUTH_WPA2_PSK it will not connect to the stock tp-link with WPA selected as the security mode. Result is: [ 33578][V][WiFiGeneric.cpp:96] set_esp_interface_ip(): Configuring Station static IP: 0.0.0.0, MASK: 0.0.0.0, GW: 0.0.0.0 But running a scan shows this: Which may be confusing to some who attempt a WiFi manager type of configuration only to reboot and never connect. WiFiSTA.cpp - changing the default to Result |
@Sys64736 - Thanks for the detailed report and investigation. I have tested WiFi connection with different Encryption modes using the ESP32-C3-DevkitM-1 v1.0 board and Arduino Core v2.0.3-RC1. Unfortunately, I don't have any C3-devkitc-02 to test it. It seems that some C3 issues have been solved with latest IDF version used in the new Arduino Core RC version we released. Thanks! |
@SuGlider Sorry for the delay. The issue is with the scan result and connection attempt to the results. If the router has these settings. (Archer TP-Link C7) - stock firmware The scan results see the TP-link below as Encryption type 2 But you are not able to connect because the threshold to connect if a pw is provided is set to WPA2 in WiFiSTA.cpp (line: 102) Changing either the threshold to WPA in WiFiSTA.cpp or increasing the encryption to WPA2 in the router, a connection is made. The issue that I see is that the scan results do not omit the WPA routers so when selected and providing a password, the threshold in WiFiSTA does not 'see' the router because of the higher threshold of WPA2_PSK. Knowing this limitation I can change either WiFiSTA.cpp threshold to WPA_PSK myself or disallow the connection attempt to a WPA router. .. but not knowing this scenario could cause some issues for people who develop WiFi manager type applications. I don't think we can assume there are no longer routers with WPA set. |
Thanks @Sys64736 for the detailed information! I'll check it and propose a PR or something else to fix it. |
Thanks! Btw, this happens with ESP32's also along with C3's and I would imagine any other model. |
Hello @Sys64736, are you please able to retest this with 2.0.3 stable? Thanks for your help. |
seems similar to #6430 which was solved on IDF side. |
Thanks. Tested and working great. Fxed with #6651 |
Board
esp32-c3-devkitc-02
Device Description
Only the dev board
Hardware Configuration
Nothing connect to GPIO's
Version
v2.0.2
IDE Name
Platformio
Operating System
Win10
Flash frequency
40Mhz
PSRAM enabled
no
Upload speed
115200
Description
Was connecting to home router (Tplink AC1750) in version 2.0.0, 2.0.1 but stopped in v2.02
Last commit that works for me is bb09615
Commit that stops my C3's, I have a couple, from connecting is:
5940d89
They do connect to cell phone hotspot (which I believe only uses WPA2_PSK)
but router has multiple authorization modes available and they usually connect with AUTH: PSK but after update to commit 5940d8 they will not connect.
Further info:
STA Connected: SSID: Router1, BSSID: d8:0d:17:48:77:34, Channel: 5, Auth: PSK <--- C3's will connect in v2.0.2 (bb09615)
STA Disconnected: SSID: Router1, BSSID: 00:00:00:00:00:00, Reason: 201 (NO_AP_FOUND) <--- C3's won't connect in v2.0.2 (5940d89)
STA Connected: SSID: HotSpot1, BSSID: b6:58:fa:2b:33:b3, Channel: 11, Auth: WPA2_PSK <--- C3's will connect in v2.0.2 (5940d89)
Sketch
Debug Message
Other Steps to Reproduce
No other steps, except a router with multiple authentication types?
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: