-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Cant connect with STATION mode in my home router #1630
Comments
Tagging @dnc40085 as the WiFi expert :) |
Please add the code below to your init.lua, make sure it is before the call to wifi.sta.config(). if wifi.eventmon.register(wifi.eventmon.STA_DISCONNECTED, function(T)
print("\n\tSTA - DISCONNECTED".."\n\tSSID: "..T.SSID.."\n\tBSSID: "..
T.BSSID.."\n\treason: "..T.reason.."\n")
end) |
Hi @dnc40085 , first of all: thanks for the help. This is the disconnect reason: |
@rsabin You're welcome, I hope I will be able to help you solve this issue. I found the following info about reason 203 on supportforums.cisco.com
Maybe your router's configuration is incompatible... Can you provide the make / model of your router? |
Hi, its a "thing"called Power Box. Some of the allowed configs are (bold are my current choices):
Shoul I add that my current ssid and pwd are using just letters an numbers. I read somewhere that special characters may cause trouble. |
Thank you for the info. Maybe the channel bandwidth option being set to 40 is causing this issue.
Could you try changing |
No use... same thing. |
Unfortunately my knowledge of the inner workings of WiFi is a work in progress. |
I'd guess that you'd need to capture the association phase between ESP and router with a separate PC in wifi promiscuous/monitoring mode. Can probably be done with Wireshark, but I don't have experience with this. |
The problem is that you need to get a wifi device that can run in monitor mode. If you have linux or OSX then there is a chance. Run the latest version of wireshark and capture in monitor mode. I'm on a macbook pro and I could do it -- but you have to use the capture/options window and scroll over to the right where you will find the monitor mode checkbox. This will show you all the 802.11 frames.... |
Can you attach the pcap file -- so I can look at the frames.... |
cap.zip |
I compared against my setup, and the only difference that I could see was that the Probe Response packet from your router was large (391 bytes). My AP's response varies by requesting device -- and is never more than 258 bytes. I wonder if there is a fixed size buffer in the espressif code and your router sends an overlong response which gets dropped. |
@rsabin you're not alone ;) When adding the logging/debugging code from #1630 (comment) it outputs the same issue, being "reason: 203". Is the only thing we can do get a pcap and compare between connecting to my phone's AP and my main AP? (original issue reported here, but I thought I'd switch back to nodemcu to see if it would work there) |
Anyone with news on the topic? |
I got a new router from my ISP. It is a Sagemcom Fast 2764. @simonvanderveldt, my only guess is that your router got a new firmware or update and then you have the same problem. Until someone in the nodemcu-firmware team with the same issue handle the problem, I suggest you to work with a wifi repeater. |
@rsabin check this: "I've seen some AP where the probe response became too long (it was in 11n-mode with WPS enabled) for the client to associate but when disabling WPS solved it." Could you test it? |
Sorry @andrebstv, but my ISP take the old router and give me this new one... I can't test anymore. But this is a good try for people still with errors. |
Tomato doesn't support WPS, so that's definitely not the cause of the problem for me |
@simonvanderveldt have you tried disabling it and the 802.11n ? |
@andrebstv sorry, I don't understand what you mean with the above message. |
Disable 802.11n and/or allow only allow 802.11g. Then also disable WPS |
Same problem here: http://bbs.espressif.com/viewtopic.php?t=2140 |
@yuraj11 you never heard back from espressif? Maybe you can ping them again on that forum? |
@simonvanderveldt, I have a ZTE router and encountered the same problem. I could however circumvent the problem such a way that I enabled also 802.11b mode (previously I have set 802.11g+802.11n only, and esp could not connect). Now it could connect perfectly -- despite the fact that I instructed in the sketch to use 802.11n with |
Expected behavior
I am trying to connect to my router. Simple and easy.
Actual behavior
I can't connect and don't know the reason.
The issue only happen with my home router. If I create a Personal Hotspot with my iPhone, for example, it works fine.
I should add that my router is very simple, no blacklists, everyone can connect providing the correct ssid and pwd. All my computers, TVs and cellphones are connecting ok. The problem is the nodemcu devkit only.
Test code
Nothing exceptional, I am just calling wifi.sta.config() with correct credentials.
This is my program:
NodeMCU version
NodeMCU custom build by frightanic.com
branch: master
commit: ec265a6
SSL: false
modules: file,gpio,net,node,tmr,uart,wifi
build built on: 2016-12-01 22:57
powered by Lua 5.1.4 on SDK 1.5.4.1(39cb9a32)
Hardware
It's an NodeMCU devkit.
More info
If this help, I made a custom build with debug on and this is the results on ESPlorer:
wifi_event_monitor_handle_event_cb is called
reconnect
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 0 (19)
Also, I can try any code you send to help testing.
The text was updated successfully, but these errors were encountered: