Chat freely about anything...

User avatar
By xl97
#54077 Hello group-

I have successfully created a 'captive portal' app for my ESP-01 device.

Summary:

* Captive portal = no local network needed, wi-fi deices connect directly to my ESP device.

* HTML content is store on ESP module itself (no external SD card, although that might be nice to add later?) and server up by the module itself as well.

* My HTML/CSS 'gui' has several links/button on the page.. then when clicked or submitted, is parsed for the form submission data, and displayed out as serial data to serial monitor (eventually serial monitor will be replace by Pro-Micro, so parse/execute the serial commands sent from the ESP module)


I am on the last leg of my Arduino parsing portion of things... but want to expand on the capabilities a bit.

Knowing my current project status (above)..

I want to (also) be able to send this data (submitted from the local, captive portal served HTML page) send this info out to some .php script.

finding a live server and the php script portion is not a concern/focus here...


The question/foucs is:

Can I be running a captive portal 'app' (code).. and also reach out to save some data to MySQL table somehow? (behind the scenes, so to speak)

Is this a difficult task to add?
Is is a lot more code to 'reach out' to some IP (or even a locally connected WAMP server via USB/serial?) to save some data with all the captive portal stuff going on?

I guess what is the most 'MINIMAL' code needed to reach out to a .php script and dump some data to it?

(sorry, I'm at work currently and can not post my latest captive portal code, but wanted to get the discussion going before I got home from work and can post it)

thanks!
User avatar
By rudy
#54096 From my understanding what you want to do is possible. But there are limitations.

Both the WiFi channel numbers (rf frequencies) have to be the same. The client needs to connect to a server. It has to connect to the AP and therefore it needs to use that channel. The local AP (captive portal) will therefore have to use the same channel number as the client used to connect to the external AP.

I don't consider this a big problem. Just something you need to be aware of. But of course you need to evaluate it within your situation. And of course there are always details in the actual implementation that must be handled. I found the following that may be useful to you.

https://github.com/esp8266/Arduino/issues/1661

and maybe this

http://bbs.espressif.com/viewtopic.php?t=2336

I am not an expert on this. So do more research.