how to support the "captive Portal" on ESP8266

lijay910
Posts: 14
Joined: Fri Sep 29, 2017 8:27 pm

how to support the "captive Portal" on ESP8266

Postby lijay910 » Sat Jul 28, 2018 5:10 pm

HI
use the code,such as:
LOCAL void ICACHE_FLASH_ATTR
user_udp_recv(void *arg, char *pusrdata, unsigned short length)
{
char DeviceBuffer[40] = {0};
char Device_mac_buffer[60] = {0};
char hwaddr[6];
struct espconn *pesp_conn = arg;
struct ip_info ipconfig;
at_port_print("user_udp_recv\r\n");
//at_port_print(pusrdata);
//m_pespconn =pesp_conn;

remot_info *premot = NULL;
sint8 value = ESPCONN_OK;
char pbuf[100] = {0};
if (espconn_get_connection_info(pesp_conn,&premot,0) == ESPCONN_OK){
pesp_conn->proto.tcp->remote_port = premot->remote_port;
pesp_conn->proto.tcp->remote_ip[0] = premot->remote_ip[0];
pesp_conn->proto.tcp->remote_ip[1] = premot->remote_ip[1];
pesp_conn->proto.tcp->remote_ip[2] = premot->remote_ip[2];
pesp_conn->proto.tcp->remote_ip[3] = premot->remote_ip[3];

os_sprintf(pbuf,"DNS Remote[IP=" IPSTR "][Port=%d]",IP2STR(&pesp_conn->proto.udp->remote_ip), pesp_conn->proto.udp->remote_port);
at_port_print(pbuf);
//espconn_sent(pesp_conn, pusrdata, os_strlen(pusrdata));
espconn_sent(pesp_conn, html, strlen(html));
}
}

but it is never usefull.
after to connet to the EPS82666 AP, but cann't show the portal window on the phone.
how to suport the captive Portal on esp8266??

andrelewis

Re: how to support the "captive Portal" on ESP8266

Postby andrelewis » Wed Oct 02, 2019 10:43 am

Interested.

ankitsingh0012
Posts: 1
Joined: Wed May 04, 2022 7:16 pm

Re: how to support the "captive Portal" on ESP8266

Postby ankitsingh0012 » Wed May 04, 2022 7:18 pm

WiFi captive portal for the NodeMCU (ESP8266 Module) with DNS spoofing.

The built-in LED will blink 5 times when a password is posted.

Warning! Your saved passwords will not disappear when you restart/power off the ESP8266.

Note: If you want to see the stored passwords go to "172.0.0.1/pass". For changing the SSID, go to "172.0.0.1/ssid"

Who is online

Users browsing this forum: No registered users and 7 guests