Can anyone help convert makefile from default linux to compile on windows?
Thanks.
Explore... Chat... Share...
Moderator: Sprite_tm
int ICACHE_FLASH_ATTR cgiRedirectApClientToIP(HttpdConnData *connData) {
uint32 *remadr;
struct ip_info apip;
char buff[1024];
char ipaddstr[16];
int x=wifi_get_opmode();
//Check if we have an softap interface; bail out if not
if (x!=2 && x!=3) return HTTPD_CGI_NOTFOUND;
remadr=(uint32 *)connData->conn->proto.tcp->remote_ip;
wifi_get_ip_info(SOFTAP_IF, &apip);
if ((*remadr & apip.netmask.addr) == (apip.ip.addr & apip.netmask.addr)) {
if (connData->conn==NULL) {
//Connection aborted. Clean up.
return HTTPD_CGI_DONE;
}
os_sprintf(ipaddstr, "%d.%d.%d.%d", IP2STR(&apip.ip));
//check if hostname is already the http SoftAP IP address
if (connData->hostName==NULL || os_strcmp(connData->hostName, ipaddstr)==0) return HTTPD_CGI_NOTFOUND;
//if not, redirect to SoftAP IP address
os_sprintf(buff, "http://%s/", ipaddstr);
os_printf("Hostname received is: %s\n", connData->hostName);
os_printf("Redirecting to hostname url %s\n", buff);
httpdRedirect(connData, buff);
return HTTPD_CGI_DONE;
} else {
return HTTPD_CGI_NOTFOUND;
}
}
metalphreak wrote:The hostname redirection doesn't work for me when connecting via the SoftAP, presumably because my devices aren't getting an ip response for the default esp8266.local hostname.
It takes about 20-25 seconds for home assistant c[…]
I tried to upgrade tof my sonoff basic R2 with the[…]
a problem Perhaps you want to define "Probl[…]
Rebooting your router will not give you a faster I[…]
There are no other notifications from esptool.py i[…]
Using the Arduino IDE, you'll learn how to set up […]
In this project, you will post to Twitter using an[…]
In this project, we will build a water level contr[…]
I guess I'm late, but I had the same problem and f[…]
Last night I received my first D1 Minis for a lear[…]
Although I am aware that this is an old post, I fe[…]