-
Gordon, pthieu,
I seem to have a related problem. I am trying to get a web server running on boot up, I've used samples from the forums to test with. Here's the code I'm using:
>dump()
E.on("init", function () { var http = require("http"); http.createServer(function (req, res) { res.writeHead(200); res.end("Hello World"); }).listen(8080); });
As you can see, the code was saved(). I've also saved the wifi settings (which do work btw)! However, when booting I get:
Loading 1836 bytes from flash...
ERROR: Not connected to the internetAnd, when I try to browse to port 8080 on the IP address of my ESP8266, the web browser can't load the page, however, if I type:
>load()
=undefined
Loading 1836 bytes from flash...Voila, it starts working! I am assuming that the http server is starting before the wifi interface, thus producing the Not connected to the internet error and when I load the code manually after the ESP8266 has finished booting, it works. This isn't very handy!
Any ideas chaps? Oh and pthieu, I think I have the same ESP8266 as you...
Julian
Hi pthieu,
Wowzers, yes that works! The error has gone and the http server is running after a hard reboot. That link makes sense to me now, good find!