Arduino: I can not connect the ESP8266 ESP-01 to the Wi-Fi network

Created on 21 Dec 2016  路  3Comments  路  Source: esp8266/Arduino

Please fill the info fields, it helps to get you faster support ;)

if you have a stack dump decode it:
https://github.com/esp8266/Arduino/blob/master/doc/Troubleshooting/stack_dump.md

for better debug messages:
https://github.com/esp8266/Arduino/blob/master/doc/Troubleshooting/debugging.md

----------------------------- Remove above -----------------------------

Basic Infos

Hardware

Hardware: ESP8266 ESP-01
Core Version: 2.3.0

Description

Problem description

Settings in IDE

Module: Generic ESP8266 Module
Flash Size: 512K(64KSPIFFS)
CPU Frequency: 80Mhz
Flash Mode: DIO
Flash Frequency: 40Mhz
Upload Using: WIFI
Reset Method: ck

Sketch

#include <ESP8266WiFi.h> // Importa a Biblioteca ESP8266WiFi

#define DEBUG true

// WIFI
const char* SSID = "TP-LINK_D834A8";
const char* PASSWORD = "eneagrama";


void initWiFi();


void setup() {
  Serial.begin(115200);
}


void initWiFi() {
  delay(1000);
  Serial.println();
  Serial.print("Conectando-se em: ");
  Serial.println(SSID);

  WiFi.begin(SSID, PASSWORD);
  while (WiFi.status() != WL_CONNECTED) {
    delay(100);
    Serial.print(".");
  }
  Serial.println();
  Serial.print("Conectado na Rede ");
  Serial.print(SSID);
  Serial.print(" | IP ");
  Serial.println(WiFi.localIP());
}

void reconectar() {
  while (WiFi.status() != WL_CONNECTED) {
    delay(100);
    Serial.print(".");
  }
}
void loop() {
  reconectar();
  Serial.print("Conectado na Rede: ");
  Serial.println(SSID);
  delay(1000);
}

Debug Messages

.scandone
no SSID found, reconnect after 1s
wifi evt: 1
STA disconnect: 201
.reconnect

messages here

I can not see the Arduino serial monitor the IP it receives from the router. I just get the message .scandone
No SSID found, reconnect after 1s
Wifi evt: 1
STA disconnect: 201
.reconnect

My router uses WPA2 encryption. How can I solve this problem?

All 3 comments

I can not see the Arduino serial monitor the IP it receives from the router. I just get the message .scandone
No SSID found, reconnect after 1s
Wifi evt: 1
STA disconnect: 201
.reconnect

My router uses WPA2 encryption. How can I solve this problem?

@Marcelphilippeandrade you are not calling initWifi() anywhere, which is the function that actually calls WiFi.begin().
Closing due to user error.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Chagui- picture Chagui-  路  3Comments

hulkco picture hulkco  路  3Comments

tiestvangool picture tiestvangool  路  3Comments

markusschweitzer picture markusschweitzer  路  3Comments

Geend picture Geend  路  3Comments