Question about frightanic.com's cloud build service
Posted: Thu Jan 21, 2016 10:01 am
I have been using frightanic's cloud build service to create custom firmware and it's been brilliant. Now I would like to try this Captive Portal example in LUA published by Robert Foss but I am unsure about the need to follow the instructions to get the ESP8266 to announce that it's running a DNS server:
As far as I can tell this is not going to be possible with frightanic's custom builds. Yet when I simply went ahead with the captive portal example anyway, it did seem to work although rather clunkily...
On connecting to the ESP8266 Acces Point "Sign in to W-Fi network" appears in the phone's notification bar but selecting this I get a browser with "clinets3.google.com/generate_204" in the address bar and after a few tens of seconds of not loading anything, the page times out with an error. But then the AP seems to reconnect and the page eventually loads.
So I'm wondering if it's working the way it should and if so how does it work without tweaking the USE_DNS 1 define?
By default DNS is not announced in the DHCP offer message, because a DNS server does not ship with NodeMCU. In order to announce that the ESP8266 is running a DNS server, NodeMCU has to be recompiled to support that. A guide to building NodeMCU can be found here.
Thanks to the wonderful work of Andy Reischles on Captive Portal, a lua implementation of a domain hijacking DNS server exists. Which will allow an ESP8266 to redirect all traffic to itself.
Detailed guide
In dhcpserver.h, #define USE_DNS 1
Build NodeMCU.
Flash NodeMCU.
Upload all .lua files and index.html.
Reboot ESP.
As far as I can tell this is not going to be possible with frightanic's custom builds. Yet when I simply went ahead with the captive portal example anyway, it did seem to work although rather clunkily...
On connecting to the ESP8266 Acces Point "Sign in to W-Fi network" appears in the phone's notification bar but selecting this I get a browser with "clinets3.google.com/generate_204" in the address bar and after a few tens of seconds of not loading anything, the page times out with an error. But then the AP seems to reconnect and the page eventually loads.
So I'm wondering if it's working the way it should and if so how does it work without tweaking the USE_DNS 1 define?