-->
Page 1 of 1

AP mode: constant disconnecting / reconnecting

PostPosted: Fri Dec 18, 2015 3:38 pm
by tiawild
Hi
I can't find a solution and for me it's strange because it seems a big issue.
I'm testing a board like this:

Image

I have a Lua Firmware ( nodemcu_integer_0.9.6-dev_20150704 ) and I can't use wifi configured as access point but only as a client.

Code: Select allwifi.ap.config({ssid="ESP8266",pwd="12345678"})
wifi.setmode(wifi.SOFTAP)

srv=net.createServer(net.TCP)
srv:listen(80,function(conn)
  conn:on("receive",function(conn, payload)
    print(payload)
    conn:send("Hello")
  end)
  conn:on("sent",function(conn)
    conn:close()
  end)
end)

In this case I can see in a loop the client (my smartphone) that acquires an IP address, is connected (1 second) then it loses connection.
I have seen an articol about this problem:
http://bbs.espressif.com/viewtopic.php?t=379
Is there a solution for a NodeMCU firmware?

Many thanks

Re: AP mode: constant disconnecting / reconnecting

PostPosted: Sun Jan 03, 2016 6:52 am
by tiawild
Does anybody have used LUA Firmware with Access Point function ?! :?

Re: AP mode: constant disconnecting / reconnecting

PostPosted: Sun Jan 03, 2016 7:49 pm
by TerryE
Yes, but you should really use a current build. Master is at SDK version 1.4 not 0.96.

Re: AP mode: constant disconnecting / reconnecting

PostPosted: Sat Jan 09, 2016 4:08 pm
by tiawild
OK, thank you!! I have tested it with 1.4 version and now AP function works well :D

I have used a compiled version from NodeMCU custom builds site (http://nodemcu-build.com/) but I have tried to make it myself reading forum (viewtopic.php?f=9&t=820&p=4639#p4639).
I can't make it because compiler tells me:

Code: Select alluser_exceptions.c:111:5: error: implicit declaration of function '__real__xtos_set_exception_handler' [-Werror=implicit-function-declaration]
     __real__xtos_set_exception_handler (cause, fn);


What is wrong ? :|