• Some basic tests of the AP functionality. All fine for me.

    var wifi = require("Wifi");
    
    // Start AP
    wifi.startAP("My_AP", {password:"testing1"}, function(){
        console.log("Access Point created"); // Tested OK
        setTimeout(function(){
          // Stop AP
          wifi.stopAP(function(){
            console.log("Access Point stopped"); // Tested OK
          });
        }, 60000);
    });
    
    // Events
    wifi.on('sta_joined', function(params) {
      console.log("Event fired: sta_joined");
      console.log("Params:" + JSON.stringify(params)); // Tested OK
    });
    
    wifi.on('sta_left', function(params) {
      console.log("Event fired: sta_left");
      console.log("Params:" + JSON.stringify(params)); // Tested OK
    });
    

    I'm not sure I grasp the signifcance of the save() and restore() methods. Do these not overlap espruino save() and onInit() functions i.e the espruino program (which includes wifi configuration) must start at boot time for ESP8266 to do anything useful?

About

Avatar for Ollie @Ollie started