Closed rokrodic closed 3 years ago
I have tested the code below. It makes a software reset and mqtt works afterwards. It is not a solution, but more a test. I suppose there is not a stack problem as errors happen at random time. The only variable is the mqtt server serves other clients as well. Timing? Changing timeout makes no difference.
unsigned long qwe = 0;
while (!Mclient.connect(MQTTName)) {
Serial.print(".");
qwe++;
delay(50);
if (qwe > 50) resetModule();
}
Closing as outdated. Please reopen if problem persists.
Hi. I use the code below and have one problem. At random time I get stuck at the point of connecting to MQTT server. Hard reset starts the ESP32 with functional mqtt. Serial output:
Code:
Any idea? I have checked the net for solution but no luck.