-->
Page 3 of 3

Re: wifi.ap.config() issue

PostPosted: Tue Dec 02, 2014 3:34 am
by gerardwr
Hi, that looks very nice, thanks for sharing.

rrezaii wrote:- When you power-cycle the module, it checks to see if has an AP IP address. If it doesn't, then it configures itself as an AP with a known SSID and password.


Brilliant, exactly what I had in mind. Intend to use your code into my webserver startupcode.

rrezaii wrote:- After the automatic reboot, we call another script: "onboardServer.lua". In this script, the module listen on port 80 and allows a browser (PC, iOS/Android device) to configure it by issuing the following http command
<snip>
This allows you to use your phone to configure your ESP module with your home WIFI credentials by just using a browser.
<snip>
I understand that you want the browser to configure you AP credentials. You should be able to modify this easily to do that.


I have a webserver running on the ESP now, serving several html pages. Now I can create another html page with a code similar to yours in it. This gives me nice headstart, thanks for that.

BTW : have a look at my webserver example. It (as always) "in progress", but is coming along nicely. Latest feature I added in is the execution of Lua code embedded in HTML pages, analog to PHP server-side code. The execution of a .lua file by clicking on a file.lua link also works. Last remaining issue to solve is getting the result of the Lua that is executed to be sent to the browser. The result is now printed to the serial console, but sending the string to the browser is giving me some headaches. It's probably "a little thing" for an experienced Lua programmer, not for me ;) . If you have a tip for that?

webserver currently looks like this:
Schermafbeelding 2014-12-02 om 09.25.14.png


If you're interested, have a look at this (now longish) topic:
http://www.esp8266.com/viewtopic.php?f=19&t=611&start=60#p3760

Re: wifi.ap.config() issue

PostPosted: Tue Dec 02, 2014 10:52 pm
by yes8s
zeroday wrote:modify wifi.ap.config(), remove the restart at the end of config.
in the build 20141202


Thank you.