• @Thijsmans: Either there was a huge improvement in espruino (2v03), or your WIFI AP and DHCP server are both slow. For me using DHCP the connection is usually up in 2.18 seconds. I tested also with channel and bssid, but this didn't change anything for me.

    My code:

    var wifi = require("Wifi");
    var test = function() {
    wifi.disconnect();
    var startTime = getTime();
    wifi.connect(wifi.getDetails().ssid,{password: wifi.getDetails().password},
      function(err) {
    	var endTime = getTime();
    	var duration =  endTime - startTime;	
              if (err) {
                console.log('Wifi setup error, duration/s=' + duration );
              } else {
                console.log('Wifi connection is up, duration/s=' + duration );
              }
    });
    }
    
About

Avatar for maze1980 @maze1980 started