#include <WiFi.h>
// Replace with your network credentials (STATION)
const char* ssid = "...";
const char* password = "...";
void initWiFi()
{
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
Serial.print("Connecting to WiFi ..");
while (WiFi.status() != WL_CONNECTED)
{
Serial.print('.');
delay(1000);
}
Serial.println(WiFi.localIP());
}
void setup()
{
Serial.begin(9600);
initWiFi();
Serial.print("RRSI: ");
Serial.println(WiFi.RSSI());
}
void loop()
{
// put your main code here, to run repeatedly:
}
The ESP32 keeps trying to connect to the WiFi but it never really connects to it. I search alot but I can't understand what's missing to put this into a real connection.
With your reply I tested one thing: I was using the Ethernet cable and it seems that with that I can't connect to the WiFi, my bad on that... I though it would work anyway even with the Ethernet cable in use...