Finds AP but will not connect.
Posted: Thu Nov 10, 2016 9:17 pm
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:
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.
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.