ESP8266MQTTClient
ESP8266MQTTClient copied to clipboard
User exception (panic/abort/assert)
Arduino IDE 1.8.12 Esp8266 Framework 2.7.0 ESP8266MQTTClient 1.0.5
Run Sample MQTTClient.ino
#include <ESP8266MQTTClient.h>
#include <ESP8266WiFi.h>
MQTTClient mqtt;
void setup() {
Serial.begin(115200);
// WiFi.begin("ssid", "pass");
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
//topic, data, data is continuing
mqtt.onData([](String topic, String data, bool cont) {
Serial.printf("Data received, topic: %s, data: %s\r\n", topic.c_str(), data.c_str());
mqtt.unSubscribe("/qos0");
});
mqtt.onSubscribe([](int sub_id) {
Serial.printf("Subscribe topic id: %d ok\r\n", sub_id);
mqtt.publish("/qos0", "qos0", 0, 0);
});
mqtt.onConnect([]() {
Serial.printf("MQTT: Connected\r\n");
Serial.printf("Subscribe id: %d\r\n", mqtt.subscribe("/qos0", 0));
// mqtt.subscribe("/qos1", 1);
// mqtt.subscribe("/qos2", 2);
});
mqtt.begin("mqtt://test.mosquitto.org:1883");
// mqtt.begin("mqtt://test.mosquitto.org:1883", {.lwtTopic = "hello", .lwtMsg = "offline", .lwtQos = 0, .lwtRetain = 0});
// mqtt.begin("mqtt://user:[email protected]:1883");
// mqtt.begin("mqtt://user:[email protected]:1883#clientId");
}
void loop() {
mqtt.handle();
}
User exception (panic/abort/assert)
Abort called
>>>stack>>>
ctx: cont
sp: 3fffff00 end: 3fffffc0 offset: 0000
3fffff00: 3fffdad0 3ffee7d8 00000020 401009b7
3fffff10: 000000fe 00000000 00000000 00000000
3fffff20: 00000000 00000000 00000000 00000080
3fffff30: 3ffef6a0 0000001d 00000001 3ffee988
3fffff40: 3fffdad0 00000000 3ffee7d8 4020723e
3fffff50: 00000000 40201e94 80ffff90 40207250
3fffff60: 00000000 8000001e 3fffff90 40211048
3fffff70: 3fffdad0 00000000 3ffee7d8 401000dc
3fffff80: 3fffdad0 00000000 3ffee7d8 40202b01
3fffff90: 3ffef800 00000000 3ffee948 40201ed8
3fffffa0: feefeffe 00000000 3ffee948 40206ea8
3fffffb0: feefeffe feefeffe 3ffe84e4 40100c79
<<<stack<<<
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
same here
....... User exception (panic/abort/assert) Abort called
stack>>>
ctx: cont
sp: 3fffff00 end: 3fffffc0 offset: 0000
3fffff00: 3fffdad0 3ffee7f8 00000020 401009bf
3fffff10: 000000fe 00000000 00000000 00000000
3fffff20: 00000000 00000000 00000000 00000080
3fffff30: 3ffef908 00000012 00000001 3ffeeac8
3fffff40: 3fffdad0 00000000 3ffee7f8 4020850e
3fffff50: 00000000 40201e00 80ffff90 40208524
3fffff60: 00000000 80000027 3fffff90 40210b24
3fffff70: 3ffef800 0027002f 3ffee7f8 401000dc
3fffff80: 3fffdad0 00000000 3ffee7f8 40202a3d
3fffff90: 3ffef800 00000000 3ffeea88 40201e44
3fffffa0: feefeffe 00000000 3ffeea88 40208118
3fffffb0: feefeffe feefeffe 3ffe84e8 40100c81
<<<stack<<<
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 1392, room 16 tail 0 chksum 0xd0 csum 0xd0 v3d128e5c ~ld
I have the same issue. After some investigation i checked that this error is caused in handle() method....
Got it! To fix temporary this issue you need to declare onDisconnect() in setup, for example:
mqtt.onDisconnect([]() {
Serial.printf("MQTT: Disconnected\r\n");
});
Additionally theres second bug which occurs in new 2.7 ESP library core. In ESP8266MQTTClient.cpp in 86 line we need wrap ESP.getChipId() with String constructor like String(ESP.getChipId()).
But still ESP sometimes catch a Soft WDT reset.
I have the same issue.
I have the onDisconnect implementented without succes. Used board: Wemos D1 mini.
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
Soft WDT reset
stack>>>
ctx: cont
sp: 3ffffdc0 end: 3fffffc0 offset: 01a0
3fffff60: 00000000 3ffef91c 3ffef418 4020594b
3fffff70: 3fffdad0 00000000 3ffef418 3ffef95c
3fffff80: 3fffdad0 00000000 3ffef418 40205baa
3fffff90: 3fffdad0 00000000 3ffef91c 4020222b
3fffffa0: feefeffe 00000000 3ffef91c 402066b0
3fffffb0: feefeffe feefeffe 3ffe85e8 40100fd5
<<<stack<<<
--------------- CUT HERE FOR EXCEPTION DECODER ---------------
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 3584, room 16 tail 0 chksum 0xb0 csum 0xb0 v2843a5ac ~ld VMDPR_
Any Update ??? I have Same issue Board Lolin V3 Library 1.0.5 --> try to rollback 1.0.4 (error compiling)
same issues
Got it! To fix temporary this issue you need to declare onDisconnect() in setup, for example:
mqtt.onDisconnect([]() { Serial.printf("MQTT: Disconnected\r\n"); });Additionally theres second bug which occurs in new 2.7 ESP library core. In ESP8266MQTTClient.cpp in 86 line we need wrap
ESP.getChipId()with String constructor likeString(ESP.getChipId()). But still ESP sometimes catch a Soft WDT reset.
this work
Got it! To fix temporary this issue you need to declare onDisconnect() in setup, for example:
mqtt.onDisconnect([]() { Serial.printf("MQTT: Disconnected\r\n"); });Additionally theres second bug which occurs in new 2.7 ESP library core. In ESP8266MQTTClient.cpp in 86 line we need wrap
ESP.getChipId()with String constructor likeString(ESP.getChipId()). But still ESP sometimes catch a Soft WDT reset.this work
for me as well, thanks !