Chat freely about anything...

User avatar
By cyberswordman
#8870 Hello everybody.
I'm pretty new here, I was lurking around the site for a couple of days to get my ideas more clear.
I'm thinking about an autonomous WiFi node, made with an ESP8266 unit and an external microcontroller (could be an arduino to begin with, obviously with logic level adaptation). The node expose a webserver and it is configured as AP.
Now the tricky part... a mobile device would ideally connect straight to it and access an offered web interface WITHOUT specifying the IP address. During test could even be that every single page asked to the node is redirected to the web interface exposed...
I think this sound like the normal proxy you find in the public places where they just require the registration for legal reason.
The question is: is this possible in any way?
I'm really new to these modules
Thanks in advance for the help! :D
User avatar
By Bomb3rman
#8900 Hi,
I have a similar problem. I want to have a Web interface for setting up my esp (in soft AP mode) and I would want to avoid that the user has to enter the ip address of the esp8266 in his webbrowser. I think this could be handled by exposing a dns server when in softap mode and then pointing every dns request to the ip address of the esp. But so far I did not find a way to do that :(
User avatar
By Bomb3rman
#8912 Ok, there is a bug in in the "add_offer_options" of the dhcpserver.c in lwip.

This
Code: Select all   
*optptr++ = DHCP_OPTION_DNS_SERVER;
*optptr++ = 12;


should be replaced with this:
Code: Select all   
        *optptr++ = DHCP_OPTION_DNS_SERVER;
        *optptr++ = 4;
        *optptr++ = ip4_addr1( &ipadd);
        *optptr++ = ip4_addr2( &ipadd);
        *optptr++ = ip4_addr3( &ipadd);
        *optptr++ = ip4_addr4( &ipadd);


Then the DNS server is correctly published in softap mode. When I set up a UDP server on port 53 now, then the devices I connect to the ESP8266 are actually sending DNS requests.
User avatar
By cyberswordman
#8967 @Bomb3rman
I was thinking exactly about the DNS trick but I had no idea about how to implement it.
If I got it right I suppose for that patch to be applied I need to recompile the firmware, right?
I'm more used to develop on JTAG-attached devices, and never tried that on the ESP8266.
Another quick question, from my understanding, with that modification, the first 4 IP address to connect to the ESP
have the DNS request redirected to the ESP IP itself. Is that right? In case, could you please explain a bit more?
Thanks!