-->
Page 1 of 2

esp8266 wdt reset cause 4

PostPosted: Thu Apr 23, 2020 8:59 pm
by r4adi0GaX2
I've uploaded this program on a D1 mini Lite (ESP8266) and a NodeMCU:

Code: Select all#include <WiFi.h>

char ssid[] = "...";
char password[] =  "Day272020?";

const uint16_t port = 8999;
const char * host = "81.57.233.143";

void setup()
{

  Serial.begin(115200);

  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.println("...");
  }

  Serial.print("WiFi connected with IP: ");
  Serial.println(WiFi.localIP());

}

void loop()
{
  WiFiClient client;

  if (!client.connect(host, port)) {

    Serial.println("Connection to host failed");

    delay(1000);
    return;
  }

  Serial.println("Connected to server successful!");

  client.print("Hello from ESP32!");

  Serial.println("Disconnecting...");
  client.stop();

  delay(10000);
}


and I get the same error with the 2 boards...

Code: Select all ets Jan  8 2013,rst cause:4, boot mode:(3,6)

wdt reset
load 0x4010f000, len 1392, room 16
tail 0
chksum 0xd0
csum 0xd0
v3d128e5c
~ld


I've tried different ports and different computers... nothing changes.

Re: esp8266 wdt reset cause 4

PostPosted: Fri Apr 24, 2020 3:39 am
by btidey
This is a standard watchdog reset caused when the watchdog timer is not fed for a period.

Don't use a huge delay all in one go ( delay(10000) ).

If you need a long delay then break it up into smaller chunks like delay(1000) in a 10 times loop. This ensures the watchdog is periodically fed.

Note that this sort of question should really be asked in one of the other topic areas. I think bug reports should really be used for bugs that you have found in the development environment

Re: esp8266 wdt reset cause 4

PostPosted: Sat Jan 16, 2021 9:57 am
by daveawalker
Have you tried this?
const char * host = "81.57.233.143:8999";

Re: esp8266 wdt reset cause 4

PostPosted: Mon Mar 22, 2021 2:58 pm
by Revan99
use
#include<ESP8266WiFi.h>
instate of
#include<WiFi.h>