-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Wifi not connected to the esp32 module. #2144
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
Comments
I also have same issue when i dump the simple WiFi server code example to esp32 but it stuck to connect to the mobile hotspot. when i scan wifi network via the board , it shows the mobile wifi. |
same here |
|
please try latest master. I just pushed a possible fix. please report if all is good |
I solved (independently of any master fix) it was a router problem solved rebooting it (while most of other devices were connecting to it with no problems I noticed one laptop was also not able to connect anymore hence I suspected the router) |
Guys, Thanks for keeping it open. It looks like I am facing same issue with some access points Where does this happen?
Here is the test scenario and how to reproduct
Here are the logs:
Also I have gone through pretty much all issues ASSOC_EXPIRE and AUTH_EXPIRE. None help this |
I have exactly the same issue as @thehellmaker describes. It does not connect to some hotspots, with infinite auth expire loop. And exactly the same thing, if I restart the hotspot - all of the sudden it connects. Actually, it happened to completely different wifi networks similar way. I need a solution ASAP. @me-no-dev did you say you made some fixes that could be downloaded? Is it a new version of WiFi.h module? Where is it and how to update it? I am willing to test and report if it works. Thank you! |
I had the same symptoms at a friend's place. Turns out his router default
DHCP settings permitted only 10 devices at the same time.
… |
I've this problems after some time, lease time i think is problem, you can test with static address |
I have the same problem. I can scan the ssid, but cant connect. |
I had a similar issue. What helped: I updated the Arduino's ESP32 in board manager to version 1.0.2 and it fixed the WiFi module behavior! It appears like there was a bug in the previous one. The second thing that helped in my case was a good quality USB cable. It first sounds crazy that USB cable can affect something like that, but indeed it does! In bad quality USB cables, the voltage drop is very high due to high resistance. This can cause the voltage to be too low for ESP32 and its power-hungry WiFi module to function. In such case, it would generate "Brownout detector triggered" warnings in the serial monitor and WiFi may be unable to connect. Replacing it with good quality USB cable immediately resolves this. It is not only about the length (even though typically the shorter the better), but primarily about quality, I had even 3-meter quality cables behave better than 0.5-meter bad quality one. I hope this information helps! |
Still this same problem of AUTH_EXPIRE loop . I don't find a reliable way to face it :(. |
This issue is showed from many users also in some our devices not all , 5% on all. But I can't find any solution or bug alert on ESP , @me-no-dev |
there are some updates in the 3.2 branch of IDF. I will merge them and rerelease the libs. |
My issue:
Solution: ESP32 Arduino 1.0.3 Pre-Release |
Hey :D it fixed something. Could you all please test 1.0.3-rc1 from the development package manager link? |
I test with 2 different ESP32:
|
Yes also us seems some connection problems it resolves (sometimes with reboot), but we ve noticed about range is few with some AP, it's strange thing |
@me-no-dev There is a new release in ESP-IDF (v3.0.8), could you please build for this version? I will test it and report if this new version fix this issue or not. Thank you, |
arduino-esp32 is currently on esp-idf 3.2. When either 3.2.1 or 3.3 is released, the idf will be updated. |
hey @lbernstone @kuoyaoming93 |
I compiled the IDF v3.2.2 by myself and also the ESP-IDF Pre-release v3.3-rc. |
Is there any update about this bug? |
I experienced same. Have 2 esp32 modules and sometimes after flash one or other cannot connect ot wifi (I have WiFi.disconnect(true) and beginning of setup()). Is there some other workaround which can improve this @me-no-dev ? Thanks. |
I'm getting the same problem on Netgear CG3100D-2 router and an older Apple AirPort Express. I have tried flashing my current ESP32, bought a new device and got same problem straight away, etc. Any help on this? It's really holding up a project I wanted to release end of last month. Here is the end of the logs when trying to get ESP32 to connect to my wireless network 10:52:55.630 -> [W][WiFiGeneric.cpp:353] _eventCallback(): Reason: 2 - AUTH_EXPIRE Is there any more debug info I can add? |
None of that stuff worked. I searched for so long across so many resources. I ended up digging around in the ESP code base and happened upon this little nugget ESP_ERROR_CHECK(nvs_flash_erase()); This seems to have cleared my "AUTH_EXPIRE" credentials and got my WiFi working again. One caution is that it clears everything in flash. So if you are using preferences library, etc, it all gets wiped. |
Hello, I'm sorry, i do not understand your last message. Can you explain a little further please? |
I was experiencing the AUTH_EXPIRE problem when trying to re-connect to my WiFi. Nothing had changed, the ESP had been working for a month or so. All of a sudden, it refused to re-connect to the same WiFi. I don't really know what was causing the AUTH_EXPIRE exception, but perhaps an expired DHCP lease not being released, or something along those lines. I tried erasing the device as per instructions, but that did not work. I tried calling disconnect on the WiFi connection but it was never connected in the first place so couldn't disconnect, the AutoConnect library has no way to wipe all memorised WiFi networks. Or the std WiFi library I found the code snippet above which did exactly what I wanted: erased the flash memory where the WiFi details were saved by the AutoConnect library. Basically all the WiFi management libraries all save their config in flash. I forgot to mention above that you will also the the below include: |
Thank you for your response. Unfortunately that did not work for me: [WiFi-event] event: 5 Too sad! |
Hi, sohtamei and everybody - I stumbled upon the above solution after being at near wit's end on how to solve my ESP32 (its a Wemos D1 R32 dev board) WIFI issue. I am inexperienced in electronics, and would like to ask 2 questions:
Thanks so much! |
Hi dtmix,
Yes, you can use 3V3 pin but you have to keep the register during wifi connection. To do it, you have to connect both the register and your device to one 3V3 pin.
I also want it strongly, but I could not.. Could you try following solution ? |
Dear sohtamei, THANK YOU so much for the prompt response!! Yes, I see your point! I ended up with similar idea of bending the resistor to the side eventually (but its not pretty) :-) I do wish there can be a firmware upgrade for this issue, but I guess not .. Nvm, will conceal this inside the box for final display. Just to share info also, I think offloading sensor power requests to a breadboard with independent power supply can also make D1 R32 more stable ... Again thanks and have a good day!! |
It is a problem present on all wemos R32, because of the electronics design or only with some manufacturer ? |
It is a problem present on most of wemos R32 and compatible (clone) board of it, because of the PCB design. It is very easy to fix this issue, because CH340 supports both 5V I/O and 3.3V I/O. So I hope the PCB has been updated, but I have not found another version of PCB, yet. |
Since IO0 seems to be pull-up by default, it should be possible to connect 3V3 without resistor, isn't it ? (I'm a noob so sorry if I say something horrible xD) |
I was facing the same issue, which is that my DOIT ESP32 DEVKIT V1 connects to my home network, but it doesn't connect to my phone's mobile hotspot. And after searching for days for a good solution for my problem, the only one I found that worked for me was:
WiFi.begin(ssid, password);
This was the solution for my case, so I hope it helps someone else as well. |
I can confirm that the 330 ohm resistor on IO0-GND does the trick ! |
Yes, it worked for me also! Thank you very much! |
This issue has been found in M5Atom/M5StickC/TimerCAM/unitV, and we fixed it with FW update of CH552. https://sohtamei.github.io/docs/esp32AndUsbUartWith5V_IO_Issue2.html |
Designers of the D1 R32board did really terrible job interfacing the CH340(used in 5V I/O mode) to the 3.3V only ESP32. |
I just got my LOLIN esp32-c3 mini WIFI working by digging this piece of errata from their site. So ANNOYING!!!
|
I do not know the cause of the problem, but when I removed all the connections to my espe32 except the USB, It worked for me. |
I just wanted to verify that this fix seems to have worked for me! My Atom Lite was unusable with wifi and BLE enabled. Made a custom cable and flashed the CH552 with the provided bin and now I'm only getting 2% packet loss. |
@Tuckie : Wondering, was it only required to reflash the CH552 or did you also have to do the hardware mod? Also, would you know when your Atom Lite was manufactured? I have a bunch of ATOM MATRIX units & trying to figure if this reflash is required for those. Many thanks. |
Mine was probably manufactured a year ago. All I did was flash CH552. Packet loss is still fluctuating between 2-4%. |
Great info. Thanks.
On Oct 4, 2022, at 6:56 PM, Tuckie ***@***.***> wrote:
Mine was probably manufactured a year ago. All I did was flash CH552. Packet loss is still fluctuating between 2-4%.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.
|
Thanks for sharing this - while not directly applicable, with esphome I couldn't get my Wemos ESP32C3 connected without a similar setting:
So far, stable. Total guess, but a new theory for me is this might have something to do with the USB voltage supplied, because some power supplies (native USB-C) seem to work better than others (USB-A to C) |
[D][WiFiGeneric.cpp:345] _eventCallback(): Event: 5 - STA_DISCONNECTED
[W][WiFiGeneric.cpp:360] _eventCallback(): Reason: 2 - AUTH_EXPIRE
[D][WiFiGeneric.cpp:345] _eventCallback(): Event: 0 - WIFI_READY
[D][WiFiGeneric.cpp:345] _eventCallback(): Event: 2 - STA_START
[D][WiFiGeneric.cpp:345] _eventCallback(): Event: 2 - STA_START
[D][WiFiGeneric.cpp:345] _eventCallback(): Event: 5 - STA_DISCONNECTED
[W][WiFiGeneric.cpp:360] _eventCallback(): Reason: 2 - AUTH_EXPIRE
[D][WiFiGeneric.cpp:345] _eventCallback(): Event: 0 - WIFI_READY
[D][WiFiGeneric.cpp:345] _eventCallback(): Event: 2 - STA_START
[D][WiFiGeneric.cpp:345] _eventCallback(): Event: 2 - STA_START
[D][WiFiGeneric.cpp:345] _eventCallback(): Event: 5 - STA_DISCONNECTED
[W][WiFiGeneric.cpp:360] _eventCallback(): Reason: 2 - AUTH_EXPIRE
[D][WiFiGeneric.cpp:345] _eventCallback(): Event: 0 - WIFI_READY
[D][WiFiGeneric.cpp:345] _eventCallback(): Event: 2 - STA_START
Originally posted by @panther1 in #1829 (comment)
The text was updated successfully, but these errors were encountered: