• It shouldn't really be an issue, but it might be because you're calling getIP and then createserver right after (rather than using callbacks).

    You could try the following and see if that works better:

    function onInit() {
      wifi = require("EspruinoWiFi");
      wifi.connect(WIFI_NAME, WIFI_OPTIONS, function(e) { 
        if (e) {
          console.log("Connection Error: "+e);
          return;
        }
        wifi.getIP(function(f,ip) {
          config.macaddress = ip.mac;
          config.ipaddress = ip.ip;
          console.log("Connected: ",config);
          require("http").createServer(function(re­q,res) {
            console.log(req);
            res.writeHead(200);
            res.end("Hello World");
          }).listen(80);
        });    
      });
    }
    

    Let me know how you get on - if that's the issue I'll see what I can do to fix it in the driver

About

Avatar for Gordon @Gordon started