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 internet
And, 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...
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
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()
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 internet
And, 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