G6EJD / ESP32-e-Paper-Weather-Display

An ESP32 and 2.9", 4.2" or 7.5" ePaper Display reads Weather Underground data via their API and then displays the weather
Other
934 stars 203 forks source link

error: connection failed #209

Closed Schramme793 closed 11 months ago

Schramme793 commented 1 year ago

I'm struggling with my Lolin32 using a waveshare 2.9 after changing the network configurations. I just set up a new wifi network and now the Lolin32 causes some problems while establishing the wifi connection. I receive the following error:

Connecting to: **SSID**
WiFi connected at: 192.**********
connection failed, error: connection failed, error: connection failed, error: connection failed, error: _PowerOff : 153004
Entering 1778-secs of sleep time
Awake for : 3.755-secs
Starting deep-sleep period...

I already tried out a easy Wifi test on my Lolin32 and it worked perfectly. It connected to the network very smoothly and had a stable connection. The code I used for this test is the following:

#include <Arduino.h>
#include <WiFi.h>

void setup() {
  Serial.begin(115200);
  WiFi.begin("**SSID**", "**password**");

  // Wait for wifi to be connected
  uint32_t notConnectedCounter = 0;
  while (WiFi.status() != WL_CONNECTED) {
      delay(100);
      Serial.println("Wifi connecting...");
      notConnectedCounter++;
      if(notConnectedCounter > 150) { // Reset board if not connected after 5s
          Serial.println("Resetting due to Wifi not connecting...");
          ESP.restart();
      }
  }
  Serial.print("Wifi connected, IP address: ");
  Serial.println(WiFi.localIP());
}

void loop() {
  // put your main code here, to run repeatedly:
}

Does somebody know about any differences in the "Waveshare_2_9_v4.ino" that could probably cause my problem?

G6EJD commented 1 year ago

If it displays an IP address like 192.168.n.n then the WiFi is connected, what it can’t do is connect to the OpenWeatherMap server so suspect your API is in correct or your location is not recognised.