-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Unable to connect to some Wi-Fi access points #2795
Comments
I am also Interested in this. I have had the same issue. I use ESP12, and it fails to connect to some APs. Works fine with 95% of the routers I guess. |
I saw another issue posted where connections were dropping out, and it was due to bad beacons, maybe related? |
@tablatronix do you mean this one? #1997 |
Oh yeah thats it, my bad. Hmm yeah not sure if the exception is related or a side effect i did find it strange that there was a problem or incompatibility that went away when the router was changed. |
I raised a similar issue. I rolled back the IDE to version 2.0.0 and the problem went away. Not the idea solution but I have lost no other functionality in what I am doing. |
@sixbacon thanks for the pointer. Do you mean version 2.0.0 of this project (i.e. https://github.com/esp8266/Arduino/releases/tag/2.0.0) or something else? I might've done something wrong though since I'm using platformio and I'm not 100% sure how to replace the framework with an older version, though after some fiddling it compiled fine. |
Hi, |
OK, thanks for the extra info! I'll give that a try this week. |
Just tried the above code using v2.0.0 from this project using the Arduino IDE, I had to comment out a couple of lines because the functions didn't exist ( |
Ran into this problem as well today. Interestingly enough, the esp8266 could connect to the router until I uploaded a sketch including the setPhyMode(WIFI_PHY_MODE_11B) function. After that, it would no longer connect to the router, but would still connect to a different hotspot created by my phone. I flashed another chip with the same sketch, and it has no issues connecting to the router. So far I have tried flashing the factory AT firmware on the chip and factory resetting the router- neither have worked. Please let me know if anyone else has made any progress. |
i have exactly the same issue, when trying to connect to any HotSpot (created from my phone or using portable hotspot) the module connect to the hotSpot, acquire an IP but don't have any connection to Internet, using my router at home i don't have any problem... Any ideas ? i am using #include <ESP8266WiFi.h> |
For a more stable connection, I use fixed parameters for IP, GATEWAY and NETMASK. Getting them via DHCP seems not to work with every Router reliable and stable. |
@simonvanderveldt is this still an issue with latest git? there is also #3215 . Did you ever erase the entire flash before flashing your sketch? |
@devyte I tried pretty much everything, using multiple devices, entirely nuking them, etc. Nothing worked.
That could very well be the case. Is it somehow possible to identify if this is really and SDK issue? |
So here's what I did to allow the esp8266 to reconnect to the router: Reflash stock firmware using the nodeMCU flashing software and ESP8266_NONOS_SDK-2.1.0 .bin files Under 'Config' in the flash software, set these files to their corresponding memory locations
Now, plug in the ESP8266 via FTDI, and hit flash. Once completed, you can unplug the ESP, exit the flash software, and plug it back in. Open Putty or some other serial comm software and set your Serial address. For me, the baud rate was 115200 but you may have to experiment. Start by typing in If you get a response, you can type in Next, I don't know if this is necessary, but I changed the device's hard ip and mac address. This is supposed to stick after a reboot but didn't for me. Regardless, it may have had an effect on letting the chip reconnect to the router.
Further commands are documented here After all this is done, flash a normal arduino sketch and see if you can connect! |
@simonvanderveldt are you sure you tried with latest git? your original post said 2.3.0, which is ancient.
|
I had same problem to connect to a specific Access Point (a Chinese D-LINK!), while my ESP connects normally to other APs. In my case the problem solved by changing AP security settings, this AP was set on WPA2-PSK (AES) security mode (that I could connect to it by my PC), in this mode my ESP was unable to connect to AP. By changing this to WPA-PSK (TKIP) (or set in open mode) the ESP connected to AP. I have to mention that my ESP connects to other APs in WPA2 mode and this problem is for just this kind of AP. In summary I could say:
|
Hello guys, I am facing the same problem. I have two APs at home - both are Asus wl500-gP. One has stock firmware, the second one was flashed with alternative "oleg's firmware". My iphone can connect to both of them without any problem. Some android phones refuse to connect to the AP with alternative firmware, as well as the wemos D1 board equipped with ESP-12 module. So it is probably related to the wifi configuration in your router. Update: I did a small research on the wifi settings in router web interface and found out that following setup works with ESP8266 (use WPA-Personal with AES encryption): |
@simonvanderveldt we're now on SDK 2.2+. Does this still happen? |
@devyte I've long ago left the esp behind because it didn't work, maybe someone that also experienced the issues can verify if it still happens? |
@gabonator @electrosaeed any feedback from you? |
@devyte I am using 2.3.0 and recently had issues with Ruckus ZoneDirector 3000 Series and Ruckus R500 WAPs. Could not get it to connect. Had to giveup. |
I cannot verify it right now, will try new SDK during weekend and report whether it works |
Changed my WiFi AP to WPA2-Auto (AES+TKIP) and it works now! |
I had the same problem using UBNT-APs. AES Only won't work, Auto (AES/TKIP) works. But I don't think TKIP should be used anymore. |
I had been facing the issue that my ESP12E module would connect to some routers and not connect to others, I really don't know whether this works for others or not, I tried with all 4 of the stand alone ESP12E modules that I have and through trial and error figured out that none of them would connect if the SSID was 4 characters or less, the moment I changed the SSID to 5 or more characters, the same ESP12E Modules would connect to the same routers without a hitch. If any body has any knowledge about this, kindly share your information |
I had problems connecting to my Linksys WRT3200acm running OpenWRT (SNAPSHOT r7925-b6adfde). My code looks like this:
My Wifi settings are
Thanks for the great work! |
Hi, I have the same configuration: Linksys WRT3200acm, running OpenWRT (LEDE 17.01.4, distrib revision r3560-79f57e422d), and multiple clones of ESP8622 claiming to be ESP12E. All the ESP8622 clones worked well with other routers, but with this version of the router, no packet would be received by the router after the (successful) connection to the WiFi network. Disabling WMM mode on the interface solves the problem. I don't know if it is a bug of ESP8622 or of OpenWRT. I couldn't test if WMM was enabled on the other routers I tested. |
reading kaloz/mwlwifi#278 seems ESP's have an issue connecting to some (in this case Marvell 88W8x64 based) routers one (not very satisfactory) solution is to turn WMM off, thus disabling 802.11n - which I can confirm does improve things, though I can't say if it solves them another (not very safe) solution is to turn wifi encryption off - I didn't try this one for obvious reasons Although the issue I linked to is with the current OpenWrt firmware, I can confirm, at least with the Linksys WRT32X, that the issue is also present in the factory firmware (which is based on an older OpenWrt anyway) The debate continues if this is a bug in ESP or Marvell driver |
**seinecle ** commented on 7 Nov 2018>
This worked fine for me... thank you very much.... |
I am fairly certain there is a new bug causing connect issues. I have not been able to nail it down but the fix is as above to disconnect and begin, there seems to be a problem with the wifi station status sync, it imagine it could also be a race condition. I will post more details later or somewhere else |
Hi All: Note: I have 12 000 devices in stock with that code. :) |
@Khalid7777777 what wifi router did you use? Did you tried disabling WMM? |
@Khalid7777777 you do not mention the last lib version you tested with or are running on these devices. |
The current dev branch seems to "hold" the wifi connection much better than when I last commented 23 days ago - however, OTA updates take 5+ minutes compared to tens of seconds - so there's still something odd going on |
Hi Thanks for responding: the bellow fix made no change. |
to save the day I put a retry if the connection fails with bt hub however the failure is still current but more reliable. As for the root cause we are still waiting :) |
The problem is with DHCP. IPAddress ip(192, 168, 29, 15); |
I can connect my nodemcu ESP 12E dev board to my android device access point but not to my (new) home router (I belive the old router worked).
|
check the mode your ESP is set to and make sure it is using n,g or b modes. hope that helps |
WiFi.setPhyMode( WIFI_PHY_MODE_11B ); // WIFI_PHY_MODE_11G / WIFI_PHY_MODE_11N / So i assume it sets the mode correctly, but I does not help. |
So, what is the new router? There's some that have an issue with ESP's and the like (see my previous comments) None of the fixes here have any effect if you have one of the routers mentioned |
Please ignore my previous post. Now Wifi client code works, without any changes to the helloserver sketch, and on my new Arris router. 👍 |
I have ASUS router. i changed every setting mentioned above still couldn't connect to it. while i can connect to TP-LInk and netgear router. is there any new trick or setting i can use? |
I was having the same symptoms. I believe my issue may have been a simpler one to fix, but I haven't seen anyone comment on this potential cause here. I will add this in hopes that it may help someone else coming across this thread as I had. Some routers are setup to take hexadecimal values as the "password" and others are setup to take a password of characters. https://www.arduino.cc/en/Reference/WiFiBegin shows that the begin function is overloaded. You call different versions of it depending upon what type of security settings are configured on your router. All of the examples I have seen online only use one version of this function call making it appear, at a cursory glance, that there is only one version of the function. Syntax Parameters My ESP8266 could see my router and my phone's hotspot with the scan code above, but could only connect to the phone until I used a different version of the begin function. Now I have gotten everything to work! |
What version do you now use? |
This seems like a very specific result, and probably not related to most of this issue. |
Each version of the begin function is used to connect to different WiFi Access Point configurations. I use different versions of the function depending upon what I am trying to connect to. You have to change your code and re-flash the ESP8266 each time you want to change your ESP8266 to connect to a different Access Point using the begin function. You use You use You use |
This issue is old and the thread wandered off topic. If you're still affected, I suggest retesting with latest git, because there have been reports that boards that couldn't connect now work after #6484 . |
Thanks to your reply I searched for security settings on my router (Xiaomi 4a with OpenWrt) and configured it to use Encryption: mixed WPA/WPA2 PSK (CCMP) instead of no encryption. This fixed the issue I was not able to connect to that router with esp-01 |
Hardware
Hardware: ESP-01
Flash Size: 512KB
CPU Frequency: 80Mhz
Core Version: 2.3.0 (assuming this is the version of the Arduino framework for the esp8266)
Description
I'm just doing a simple thing, namely connection to an access point, which used to work fine when using lua/nodemcu with this access point, but refuses to work using this framework.
The strange thing is, it does work when I connect to my phone's Wi-Fi hotspot, but doesn't work when connecting to my regular access point (a Asus WL-500gP running Tomato).
I tried everything I could think of on the access point:
But none of them fixed the problem
Sketch
I've simplified it to just the basic steps/example code. Added the network scan so it shows that the SSID does exist and is found by the esp8266. So at the very least the debug message
no SimonAP found, reconnect after 1s
is wrong.Debug Messages
The text was updated successfully, but these errors were encountered: