-->
Page 1 of 4

MQTT ESP8266-12 HELP WDT RESET

PostPosted: Sun Jun 14, 2015 10:35 am
by danbicks
Guys,

I have been pulling my hair out with this one, could it be the SDK? could it be arduino IDE or could it be me.

I have been trying to get a stable MQTT sketch working, It connects, gets callbacks processes message but needs to be bullet proof. My main aim was to add network and MQTT checking in this sketch fired by the ticker every 20 seconds to check and re connect if need be.
I have a wireless TPLINK router as a bridge, easy to pull out power and force my little ESP to do some network re connect attempts. It realizes the network is down and tries, I plug the network back in and a good old WDT crash is hit.

Can you guru's stop me from insanity here!

Many thanks in advance Dans
WDT Error.JPG

ESP_MQTT_12_NETCHECK_FORUM.rar

Re: MQTT ESP8266-12 HELP WDT RESET

PostPosted: Sun Jun 14, 2015 3:16 pm
by GerryKeely
Hi

This may have nothing to do with your problem but I note you use wdt_feed() in your program.I don't think this actually does anything. If you try the following program with and without the ESP.wdtFeed(), the watchdog still resets the program

Code: Select allextern "C"
{
#include "user_interface.h"
}
void setup() {
  delay(1000);
  Serial.begin(115200);
  Serial.println("starting");
}

void loop() {
  while(1){ESP.wdtFeed();}
}



Gerry

Re: MQTT ESP8266-12 HELP WDT RESET

PostPosted: Sun Jun 14, 2015 3:19 pm
by danbicks
Hi Gerry,

The WDT feed was used to try and stop this WDT crash problem. It did not help.

Thanks for the method of achieving this in C :)

Dans

Re: MQTT ESP8266-12 HELP WDT RESET

PostPosted: Tue Jun 16, 2015 1:47 pm
by danbicks
Hi Guys,

Has anyone managed to work this out yet?
Downloaded 8 times would be good to know of any progress.

Cheers Dans