Page 1 of 1
WiFi AP web page.
Posted: Fri Dec 04, 2020 9:38 pm
by filipESP
Hi,
Is it possible to force running the web page on the station connected to esp AP?
Re: WiFi AP web page.
Posted: Mon Dec 07, 2020 7:45 pm
by filipESP
This is what I would like to achive in 0:14
https://www.youtube.com/watch?v=PJUkRxL ... e=emb_logo
I was trying to use DNS server example from github but any of them doesn't force opening the captive page after connecting to AP.
Re: WiFi AP web page.
Posted: Mon Dec 07, 2020 10:05 pm
by PeterR
Is it possible to force running the web page on the station connected to esp AP?
Sure, just create/start the server on the IP of your interface. The server does not care if you are Wifi, Wired, Whatever. Just the IP.
So thinking ahead guess you just need to launch when you have an IP (& stop when loose etc). In which case you need to look at the event handlers.
Re: WiFi AP web page.
Posted: Wed Dec 09, 2020 2:31 pm
by filipESP
I tested this
https://github.com/cornelis-61/esp32_Captdns example, but it is not working such as I want.
DNS packets are sendings to server but, server don't force opening the captive page :/
Re: WiFi AP web page.
Posted: Wed Dec 09, 2020 9:38 pm
by filipESP
I also put this code after wifi AP init
Code: Select all
ip_addr_t dns_addr;
IP_ADDR4(&dns_addr, 192,168,1,2);
dns_setserver(0, &dns_addr);
dns_init();
xTaskCreate(&http_server, "http_server", 2048, NULL, 5, NULL);
Results is still the same. :/
Re: WiFi AP web page.
Posted: Thu Dec 10, 2020 2:00 pm
by filipESP
Also trying to send HTTP/1.1 302 Found Location: 192.168.1.2\r\n
What I need to do to see 'sign to wifi network' popup on my smartphone?
Re: WiFi AP web page.
Posted: Fri Dec 11, 2020 10:39 pm
by filipESP
I tested the Arduino example from:
https://github.com/espressif/arduino-es ... Portal.ino
and it is working perfectly.
How to start the DNS server in C, like in this arduino code?