-->
Page 1 of 1

Question about frightanic.com's cloud build service

PostPosted: Thu Jan 21, 2016 10:01 am
by AdrianM
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:
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?

Re: Question about frightanic.com's cloud build service

PostPosted: Wed Jan 27, 2016 7:59 am
by AdrianM
I have searched all files in nodemcu-firmware 1.4.0 (and 0.9.6) for all instances of USE_DNS and it 's always seems to have been been defined in dhcpserver.h:
Code: Select all#define USE_DNS

Screenshot 2016-01-27 12.30.35.png

Nothing checks the value of the definition, just that the identifier has been defined. I'm puzzled why Googling for "esp8266 USE_DNS" brings up so many instances of people creating captive poortals and describing the need to set this flag.

Re: Question about frightanic.com's cloud build service

PostPosted: Fri Jun 24, 2016 3:20 pm
by marcelstoer
It's used in three places: