As the title says... Chat on...

User avatar
By startimeahmet
#65125 Hi,
I am working on a project in which I need to connect esp8266 to ASUS RP-N14 repeater using WPS button on the ASUS device. However I am having some problems.
I am using the example code snippet given in docs for WPS connection.

Code: Select allwifi.setmode(wifi.STATION)
wps.enable()
wps.start(function(status)
  if status == wps.SUCCESS then
    print("SUCCESS!")
  elseif status == wps.FAILED then
    print("Failed")
  elseif status == wps.TIMEOUT then
    print("Timeout")
  elseif status == wps.WEP then
    print("WEP not supported")
  elseif status == wps.SCAN_ERR then
    print("WPS AP not found")
  else
    print(status)
  end
  wps.disable()
end)


I am seeing SUCCESS! on the terminal but the problem is no IP is being assigned to the ESP. When I run =wifi.sta.getip(), I get nil
This is very weird. When I try to connect the Wi-Fi that is shared from the ASUS device using wifi.sta.config({ssid="",pwd=""}) there is no problem though. ESP is assigned an IP.

I hope someone can find out what is wrong.
Thanks in advance!