@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 );
}
});
}
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.
@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: