const wifi = require('Wifi');
const xxx = {
name: 'xxx',
options: {
password: 'xxx',
authMode: 'wpa_wpa2'
}
};
const connectToWifi = (shadowWifiLoginData) => {
wifi.connect(shadowWifiLoginData.name, shadowWifiLoginData.options, (err) => {
if (err) {
console.log('[ Wifi ] Failed: ' + err);
return;
}
console.log('[ Wifi ] Connected to ' + shadowWifiLoginData.name + ' successfuly!');
console.log('[ Wifi ] IP ' + wifi.getIP());
});
};
connectToWifi(xxx);
returns: no_ap_found
pushing the same code, and the same flash on NodeMCU with ESP-12E on top, works.
Anyone had the same problem? I am starting to wonder if maybe I got 3 pcs of NodeMCU with integrated ESP8266 with damaged wifi.