-->
Page 1 of 1

[Espruino] Wifi doesn't work on NodeMCU + integrated ESP8266

PostPosted: Tue Jun 12, 2018 12:51 am
by justnaughty
I have two kinds of NodeMCU boards: one with ESP8266 ESP-12E on top, and one with ESP8266 integrated. I am using Espruino on both, and integration ESP8266 doesn't seem to work.

Code: Select allconst 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.

Image

Image