Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By cpl
#57955 Hi all,

I am running Arduino IDE 1.6.5 with version 2.2.0 of the esp8266 module. I am using a nodeMCU 1.0. Everything seemed to be working fine until I tried to connect to my AP.

The AP accepts 802.11b and g connections. WEP is off, WPA is on. The nodeMCU finds the AP when it scans using the Arduino example WiFiScan sketch (to which I added the encryption type at the end of the line). See attached pdf for AP 1UXG7.

But it will not connect with this code:

Code: Select all#include <ESP8266WiFi.h>

const char* ssid     = "1UXG7";
const char* password = "HappyBirthday";

void setup() {
  Serial.begin(115200);
  delay(100);
 
  Serial.setDebugOutput(true);

  WiFi.begin(ssid, password);

  Serial.println();
  String s = WiFi.macAddress();
  Serial.print("Mac Address: ");
  Serial.println(s);
  Serial.println();
  Serial.print("Connecting to ");
  Serial.print(WiFi.SSID());   
 
  while (WiFi.status() != WL_CONNECTED) {
    delay(2500);
    Serial.print(".");
    Serial.println(WiFi.status());
    WiFi.printDiag(Serial);
  }

  Serial.println("");
  Serial.println("WiFi connected"); 
  Serial.println("IP address: ");
  Serial.println(WiFi.localIP());
}


I have attached the diagnostics output in an attachment. Can anyone tell me what is wrong? Note that "HappyBirthday" is not the real password, but the output appears the same even with the correct one.

Thanks.
You do not have the required permissions to view the files attached to this post.
User avatar
By cpl
#58166 Mark this one solved--at least sort of.

I went into the Arduino IDE Boards Manager, changed the esp8266 tools to version 2.0.0 (from 2.2.0) and now it connects to my AP fine. (Still with Arduino 1.6.5)

Don't ask me why. But before I made the change, I did try to connect with a couple other APs--two open and one password protection. Version 2.2.0 worked fine with them.

The DSL modem/router I had the problem with is 10 years old and only handles 802.11b and g connections. (It also handles WPA but not WPA2 security.) Not sure if this has anything to to with it, but the newer esp8266 modules in the Arduino IDE don't seem to play as well with the older router technology--at least in my case.