Multiple ESP32 boards scan network, but struggle to connect. Configuration problem??
Posted: Fri Aug 13, 2021 8:39 pm
Hello!
Is there some sort of configuration that's needed to help the ESP32 to connect easily? I can easily get the ESP8266 to connect to my network, but multiple ESP32 boards have difficulty. I've tried two Sparkfun ESP32 Things, and also a couple of Heltec WiFi Kit32 boards. They can *sometimes* connect, so there's nothing grossly wrong with the code, and scanning for networks yields similar signal strengths that the ESP8266 sees (about -55).
The example below ( simplified from the Arduino WiFiClientBasic example) will connect sometimes, but not very often... This seems to me like a software, or configuration problem.
Any suggestions are gratefully received.
Doug
Is there some sort of configuration that's needed to help the ESP32 to connect easily? I can easily get the ESP8266 to connect to my network, but multiple ESP32 boards have difficulty. I've tried two Sparkfun ESP32 Things, and also a couple of Heltec WiFi Kit32 boards. They can *sometimes* connect, so there's nothing grossly wrong with the code, and scanning for networks yields similar signal strengths that the ESP8266 sees (about -55).
The example below ( simplified from the Arduino WiFiClientBasic example) will connect sometimes, but not very often... This seems to me like a software, or configuration problem.
Any suggestions are gratefully received.
Doug
- #include <WiFi.h>
- #include <WiFiMulti.h>
- WiFiMulti WiFiMulti;
- void setup()
- {
- Serial.begin(115200);
- delay(10);
- // We start by connecting to a WiFi network
- WiFiMulti.addAP("Correct_SSID", "Correct_Password");
- Serial.println();
- Serial.println();
- Serial.print("Waiting for WiFi... ");
- while(WiFiMulti.run() != WL_CONNECTED) {
- Serial.print(".");
- delay(500);
- }
- Serial.println("");
- Serial.println("WiFi connected");
- Serial.println("IP address: ");
- Serial.println(WiFi.localIP());
- delay(500);
- }
- void loop()
- {
- }