Page 1 of 1

wifi connection fails , but not allways.

Posted: Tue Oct 29, 2019 8:40 pm
by martinpaul
I'm a bit confused. I use a very basic program, just to see if I could connect to a wifi-network.
My problem is, that the program connects to some wifi-networks, but not to all.
The code must be correct, otherwise it couldn't connect to some networks.
Some fora suggest a security issue, but I can't figure out what that could be.

I use an ESPDUINO-32

This is my code.

#include "WiFi.h"

const char* ssid = "******";
const char* password = "*********";

void setup() {

Serial.begin(115200);

WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.println("Connecting to WiFi..");
}

Serial.println("Connected to the WiFi network");

}