WiFi AP web page.

filipESP
Posts: 74
Joined: Tue Nov 06, 2018 12:42 pm

WiFi AP web page.

Postby filipESP » Fri Dec 04, 2020 9:38 pm

Hi,
Is it possible to force running the web page on the station connected to esp AP?

filipESP
Posts: 74
Joined: Tue Nov 06, 2018 12:42 pm

Re: WiFi AP web page.

Postby filipESP » Mon Dec 07, 2020 7:45 pm

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.

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: WiFi AP web page.

Postby PeterR » Mon Dec 07, 2020 10:05 pm

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.
& I also believe that IDF CAN should be fixed.

filipESP
Posts: 74
Joined: Tue Nov 06, 2018 12:42 pm

Re: WiFi AP web page.

Postby filipESP » Wed Dec 09, 2020 2:31 pm

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 :/

filipESP
Posts: 74
Joined: Tue Nov 06, 2018 12:42 pm

Re: WiFi AP web page.

Postby filipESP » Wed Dec 09, 2020 9:38 pm

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. :/

filipESP
Posts: 74
Joined: Tue Nov 06, 2018 12:42 pm

Re: WiFi AP web page.

Postby filipESP » Thu Dec 10, 2020 2:00 pm

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?

filipESP
Posts: 74
Joined: Tue Nov 06, 2018 12:42 pm

Re: WiFi AP web page.

Postby filipESP » Fri Dec 11, 2020 10:39 pm

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?

Who is online

Users browsing this forum: Bing [Bot], Eshwar487 and 62 guests