nodemcu-firmware: Cant connect with STATION mode in my home router

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:

wifi.setmode(wifi.STATION)
wifi.sta.config("my ssid", "my pwd")

cont=1
tmr.alarm(1, 2000, 1, function()
   if wifi.sta.getip()==nil then
      print("Wait for IP "..cont.."--> "..wifi.sta.status())
      cont=cont+1
      if cont>20 then tmr.stop(1) end
   else
      print("New IP address is "..wifi.sta.getip())
      tmr.stop(1)
   end
end)

NodeMCU version

NodeMCU custom build by frightanic.com branch: master commit: ec265a6c21db22640795f190bdcb8a4f014cdced 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.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 27 (9 by maintainers)

Most upvoted comments

Tagging @dnc40085 as the WiFi expert 😃

@yuraj11 you never heard back from espressif? Maybe you can ping them again on that forum?

@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

code 802.11 definition Explanation
203(0xCB) Invalid Parameters. The request has not been successful as one or more TSPEC parameters in the request have invalid values. A TSPEC SHALL be present in the response as a suggestion. Not defined in IEEE, defined in CCXv4 This happens in cases such as PHY rate mismatch. If the TSRS IE contains a phy rate not supported by the controller, for example. Other examples include sending a TSPEC with bad parameters, such as sending a date rate of 85K for a narrowband TSPEC.

Maybe your router’s configuration is incompatible… Can you provide the make / model of your router? I would like to take a look at the router’s user manual.