Post topics, source code that relate to the Arduino Platform

User avatar
By Blue Birds Fly
#89887 I want to connect my esp8266 (Wemos D1 mini) to the wifi coming from my router. But when doing this it gives code 6. According to documentation, this is WL_CONNECT_WRONG_PASSWORD. I changed the password in the router 3 times to simple password to make sure the password is correct and it still gives this code.

When I try to connect to a mobile phone hotspot, it gives code 6 one time and then it connects. Does anybody know why I cannot connect to my router while the password is correct? The router is using 2.4 GHz, 802.11 b/g/n

Code: Select all  const char* ssid     = "SSIDHERE";
const char* password = "Pass HERE";
void setup() {
 // We start by connecting to a WiFi network
  Serial.println("Connecting to ");
  WiFi.begin(ssid, password);
 while (WiFi.status() != WL_CONNECTED) {
    Serial.printf("Connection status: %d\n", WiFi.status());

  Serial.println("WiFi connected");
  Serial.println("IP address: ");
User avatar
By Blue Birds Fly
#89904 Yes, I used the GitHub version and I found the code in the docs

Do you know what I have to do to fix this error? Are there router settings wrong? Do I use wrong code, my d1 doesn't work, etc. ?