I have an issue somewhat similar to user124799. I recently picked up a couple of MELIFE ESP32 boards because I'm having trouble obtaining Espruinio WIFI boards (so sorry Gordon!). I flashed 2v08 and ran this simple web server:
var wifi;
var count = 0;
function getContent() {
return '<html><h1>' + count++ + '</h1></html>';
}
function sendPage(res) {
var content = getContent();
res.writeHead(200, {'Content-Type': 'text/html', 'Content-Length':content.length});
res.end(content);
}
function onPageRequest(req, res) {
var a = url.parse(req.url, true);
if (a.pathname=="/") {
sendPage(res);
}
}
function onConnected() {
wifi.getIP(function(e,ip) {
lip = ip.ip;
require("http").createServer(onPageRequest).listen(80);
});
}
function onInit() {
wifi = require("Wifi");
setTimeout(onConnected, 2000);
}
I used a timeout because wifi.connect("***", { password : "***" }, onConnected) doesn't seem to call 'onConnected'. Anyhow, it runs okay for a minute or so then dies. The console shows this error:
>E (5287) event: post event to user fail!
E (8131) event: post event to user fail!
WARNING: Wifi:startMDNS - espressif
>E (34066) event: post event to user fail!
E (36911) event: post event to user fail!
The first 3 lines print on bootup - the last 2 lines print right when the ESP32 dies.
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.
I have an issue somewhat similar to user124799. I recently picked up a couple of MELIFE ESP32 boards because I'm having trouble obtaining Espruinio WIFI boards (so sorry Gordon!). I flashed 2v08 and ran this simple web server:
I used a timeout because wifi.connect("***", { password : "***" }, onConnected) doesn't seem to call 'onConnected'. Anyhow, it runs okay for a minute or so then dies. The console shows this error:
The first 3 lines print on bootup - the last 2 lines print right when the ESP32 dies.
Searching on the error led me to this page:
https://github.com/espruino/Espruino/issues/1571
Which led me to try an older build - specifically this one:
http://www.espruino.com/binaries/travis/1a1fd36b740547ece5dda46220c9489bdbd17ff0/espruino_esp32.bin
Which looks like 2v00.42. The ESP32 works fine with this build.
Is there a wifi issue with 2v08?
Allen