-
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
WPS fails with most new (802.11ac) access points #3941
Comments
Also fails with the example in 2.4.0 documentation (https://arduino-esp8266.readthedocs.io/en/latest/esp8266wifi/station-class.html#wps) (never gets past the while ! WL_CONNECTED loop)
The output rapidly repeats the wps discover...cnt sequence, so fast that I don't think it could actually do the key exchange. It does this until the AP WPS mode expires at which point the ESP8266 just tries to reconnect (unsuccessfully) every few seconds.
|
Another data-point: WPS works fine with an Asus TM-AC1900 access point, but fails with the Belkin AC1900 |
Can the esp connect to the Belkin with normal pw? |
Yes, this is strictly a WPS problem. The ESP receives the SSID but fails
to process the key.
The same code works perfectly for WPS connection with an Asus TM-AC1900
and for every 802.11b/g/n AP I've tried. I had hoped it was a
free-memory issue (the source of my original WPS problems with
802.11ac), but I've freed up a lot of RAM (more than 20K) and it still
does not work with the Belkin access point. Any ideas?
Regards,
Dave
…On 12/11/2017 4:02 PM, Rotzbua wrote:
Can the esp connect to the Belkin with normal pw?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3941 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFEbugIOL4sMRI1koXC9rTcGCBxnrTrZks5s_ZhqgaJpZM4Q8M4g>.
--
David Albert
301-728-0718 (cell)
|
The esp do not support 802.11ac. Both router have a backwards compatibility for n-standard. It seems that the Belkin maybe have a different behaviour or implementation than the Asus. First I would eliminate all link connections. So try to force the Beklin into 802.11n and 20 MHz mode, because the esp8266 do not support n-standard with 40Mhz and may have a problem with mixed mode of Belkin. |
I should have been clearer. The issue is that the ESP cannot connect to
the router on 2.4GHz (I know the ESP does not support 5GHz). I have
tried every setting on the Belkin AP including turning off the 5GHz
radio entirely and forcing g, n, 20MHz, and 20/40MHz modes. When the
ESP attempts a WPS pairing, it sees the Belkin SSID and attempts a
connection but does not receive the key and the WPS process immediately
fails. Other devices (e.g. my cell phone) are able to pair with the
Belkin router using WPS.
…On 12/12/2017 4:29 AM, Rotzbua wrote:
The esp do not support 802.11ac. Both router have a backwards
compatibility for n-standard. It seems that the Belkin maybe have a
different behaviour or implementation than the Asus.
First I would eliminate all link connections. So try to force the
Beklin into 802.11n and 20 MHz mode, because the esp8266 do not
support n-standard with 40Mhz and may have a problem with mixed mode
of Belkin.
Best
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3941 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFEbusBr9dBMV8TmWx1zbaKeFqoT-l35ks5s_kdsgaJpZM4Q8M4g>.
--
David Albert
301-728-0718 (cell)
|
You mentioned trying every setting, but I did not see security mode noted directly. Most new routers default to WPA2 only and I often have to set the 2.4 to WPA/WPA2 for "older" devices. Again, you likely tried this, but I am curious if this has been addressed. Thank you for noting this problem and sharing your results with this. |
Actually there a two WPS versions available. WPS 1.0 and 2.0. The esp doc do not mention which version or compatibility is given... Maybe this is the source of problem? |
It might help if we had more information about which access points work
and which don't. So far, the Belkin AC1900 is the only AP I have not
been able to get it to work with. If anyone else is having WPS issues,
I'd be grateful if you would add to this list which APs you have tested
and which worked and which didn't.
|
Keeping this issue open since it can help collect more data, but please be advised that WPS is fully implemented in ESP8266 non-OS SDK. As such, it is unlikely that anything will be done to solve this issue in this project. |
@dalbert2 I think the core has migrated to a new SDK since this was opened, and I think the new SDK includes some fixes for WPS. Please retry with latest git. |
Hi devyte, I can't seem to figure out where that menu option is to disable the 4K memory optimization. I use PlatformIO with VSCode, but I've also tried with the standard Arduino IDE and I don't see any menu option to enable WPS vs. the 4KB memory optimization. Any guidance would be much appreciated! I am building for the NodeMcu 1.0 (ESP12E) target and the linker chokes with error: |
With latest git the option was removed, because the optimization is disabled automagically (#5018 ) when the core wps api is used. |
OK, I'll try to figure out how to work with the latest git. FWIW, I'd like to offer some feedback to the devs who often make the very reasonable suggestion of doing things like rebuilding the boards with different options or using git latest. The documentation, while wonderful, often lacks sufficient detail for someone not involved in the development of the tools to actually use it. For example (and to help the next person who finds this thread), the 2.4.2 FAQ indicates that to use WPS, you must use the board generator and suggests the command "./tools/boards.txt.py --allowWPS --boardsgen" which is great, except you don't know where that file is (e.g. when using platformio, it's in your home directory/.platformio/packages/framework-arduinoesspressif8266/tools for the Arduino platform it is even better hidden in AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\tools) - these may be obvious to someone developing this framework, but it's not obvious to users (since the devs have done such a great job insulating us from all of this). Once you find it, it's still not obvious is how to make this work. Running the command from the Windows or cygwin CLI yields no output, but does create a new boards.txt and a boards.txt.orig with the added build option (e.g. nodemcuv2.build.noextra4kheap=-DNO_EXTRA_4K_HEAP. Unfortunately, this doesn't do anything to solve the WPS failure to link. Taking a guess, I added the build flag -D NO_EXTRA_4K_HEAP to my platformio.ini file and it linked! Sorry for all of the whining, I've submitted the suggested details to the documentation on github under branch dalbert2/Arduino - perhaps you can merge them into the HEAD if you agree with them? |
@dalbert2 I wrote this tool and the doc. Thank you for your suggestions I will try to update the doc accordingly. I am using linux and the arduino IDE (only, or makefiles with the arduino builder), and we are, in the documentation, referring to the root directory of this arduino core. I have little knowledge with windows, and none with platformio. I was guessing users would use a locate/find/search tool to reach those files, but you prove me wrong. All combinations (linux, windows, arduino-IDE, platformio, VSCode, future arduino cli) cannot be listed everywhere in documentation when it comes to reach a particular file. About the boards generator not beeing talkative, you are right and some verbosity would help. About the define you had to add by hand, you need to ask a platformio/esp8266/arduino maintainer (although if you are working with the git version you don't need it anymore like @devyte said above).
You need to push the branch to github, open github and press the PR button so we can see them. |
@d-a-v Thank you for writing both tool and doc! The problem with this sort of thing is that it always seems obvious when you already know how to do it :-) I did the pull requests so you can see the proposed documentation changes. The problem with find tools is that modern hard drives are so big that searching the entire drive can take a very long time (even on SSDs) so giving the user a hint about what they're looking for may be useful. Unfortunately I also understand the problem with supporting a virtually unlimited number of build environments. I think a common concession is to support popular windows environments because Windows users tend to be least sophisticated and most common (windows still owns 40-60% of developer desktops and probably more if you're only considering Arduino). I use linux, windows, and cygwin depending on what I'm developing. Arduino hides the core in a particularly ugly way, so documenting how to do things for Arduino IDE might be a reasonable minimal solution. Examples are usually worth their weight in gold. BTW, PlatformIO is cross-platform and very nice...you won't keep using Arduino IDE once you've tried it. |
@dalbert2 when you find something that isn't clear, or needs fixing, making a PR with improvements as you did is exactly what you're supposed to do. Thanks! |
@d-a-v you self assigned this. Please keep in mind that the original issue here isn't about the tool, or even about the stack placement for the 4K heap optim, but that wps has problems with newer ac routers. I suspect compatibility problems with specific router vendors, which would mean the problem is either in the sdk or in the router firmware, but that's just my opinion from following several threads about it over an extended period of time. |
This rather epic issue seems to have been fixed a while back including add'l work by @d-a-v on the boards generator. Nothing to do here. |
Basic Infos
WPS connection fails with most newer access points but work fine with older b/g/n APs.
UPDATE: the main WPS issue turned out to be lack of free memory. It turns out that a substantial (>16K) amount of free RAM is needed for WPS to succeed. I never got it working with the Belkin .ac router but it seems to work with most .ac access points as long as there's enough free RAM.
Hardware
Hardware: ESP-12F
Core Version: 2.1.0-rc2
Description
The same code works perfectly to connect via WPS with older (802.11b/g/n) access points but fails on newer (ac1900) access points even when the 5GHz radio is disabled. WPS finds the access point SSID but the negotiation to get the PSK fails. 100% failure rate with Belkin AC1900 DB (Model F9K1124V1)
Settings in IDE
Module: Generic ESP8266 Module
Flash Size: 4MB
CPU Frequency: 80Mhz
Flash Mode: qio
Flash Frequency: 40Mhz
Upload Using: SERIAL
Reset Method: nodemcu
Sketch
Debug Messages
The text was updated successfully, but these errors were encountered: