ChipChop Support Forum
Log in
Log out
Join the forum
My Details
REPLIES: 4
VIEWS: 126
BACK
REPLY TO THIS POST
TomaszB
13 Feb 2026
Soft WDT restart during ChipChop processing
Hi Gizmo

I've started observing a restarts of ESP8266 during processing of ChipChop procedures. It is triggered very often after Chipchop.getMyStatus() I feel that problem is somewhere in my code, but please take a look at two stack dumps - maybe you have seen something similar in the past:

Tomasz

Update:
When I tried to execute Chipchop.getMyStatus() on device that has only two variables defined in ChipChop it works well, but in case where there are 12 variables (and some of them are strings) it fails every time.
I don't need status of all variables, it would be great if there is a parameter in getMyStatus(string variable_name).

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Soft WDT reset

>>>stack>>>

ctx: cont
sp: 3ffffbf0 end: 3fffffc0 offset: 01a0
3ffffd90: 3fff502c 00006fd0 3ffe866c 40100dcb
3ffffda0: 00000020 00000020 00006fc4 3fff109c
3ffffdb0: 3ffe972c 3fff0810 3ffffe80 00000030
3ffffdc0: 3ffe972c 3fff0810 3ffffe80 00000001
3ffffdd0: 00006fc0 00006fd0 3ffffed4 4021878d
3ffffde0: 00006fbf 401043f4 00040000 401004a4
3ffffdf0: 3ffeea60 4010335b 00000005 00000001
3ffffe00: 00006fc0 00000001 3ffffed4 40218827
3ffffe10: 40102df3 00000001 3ffffed4 40218bf2
3ffffe20: 3fff502c 3ffffe50 00000022 40102fd0
3ffffe30: 4020b739 00000030 00000010 3ffffe80
3ffffe40: 3fff0810 3ffe972c 3fff109c 40218d22
3ffffe50: 00004b37 00000000 3ffffed4 40218898
3ffffe60: 3fff0810 3ffe972c 3ffffed4 402088bc
3ffffe70: 00000614 3ffe972c 3fff109c 4020a92c
3ffffe80: 3ffeb190 2c9f0300 4000050c 00000145
3ffffe90: 3fff52b4 00000020 3fff52b4 40100d5e
3ffffea0: 40206056 00000000 00000000 40100708
3ffffeb0: 3ba63162 991a5f17 e97ff590 607e2aa1
3ffffec0: f46bae56 666a76db c0958542 3fff169c
3ffffed0: 31c046aa 3fff502c 6fbf6fbf 8a003964
3ffffee0: 0000001d 00000145 3fff0950 3fff16 DEBUG: Main. Before initialisePinLogic Memory Free Heap Size=38640
DEBUG: Main. Before initialiseHandlers Memory Free Heap Size=38632

0x40100dcb in realloc at ??:?
0x4021878d in String::changeBuffer(unsigned int) at ??:?
0x401043f4 in lmacProcessTXStartData at ??:?
0x401004a4 in ets_post at ??:?
0x4010335b in wDev_ProcessFiq at ??:?
0x40218827 in String::reserve(unsigned int) at ??:?
0x40102df3 in rcReachRetryLimit at ??:?
0x40218bf2 in String::concat(char const*, unsigned int) at ??:?
0x40102fd0 in rcReachRetryLimit at ??:?
0x4020b739 in cc_client::run() at ??:?
0x40218d22 in String::concat(char) at ??:?
0x40218898 in String::copy(char const*, unsigned int) at ??:?
0x402088bc in _ZN6StringpLIcEERS_RKT_$isra$0 at ChipChopEngine.cpp:?
0x4020a92c in ChipChopEngine::_process_server_message(unsigned char, unsigned char*, int) at ??:?
0x40100d5e in free at ??:?
0x40206056 in loop at ??:?
0x40100708 in vPortFree at ??:?


Soft WDT reset

>>>stack>>>

ctx: cont
sp: 3ffffc30 end: 3fffffc0 offset: 01a0
3ffffdd0: 00006f40 00006f50 3ffffed4 4021878d
3ffffde0: 00006f3f 00000000 00000020 401004a4
3ffffdf0: 00000001 000000d0 00000005 00000001
3ffffe00: 00006f40 00000001 3ffffed4 40218827
3ffffe10: 40102df3 00000001 3ffffed4 40218bf2
3ffffe20: 3fff50b4 3ffffe50 3ffeec40 40102fd0
3ffffe30: 3ffeb16c 00000000 00000000 3ffffe80
3ffffe40: 3fff0810 3ffe972c 3fff109c 40218d22
3ffffe50: 3ffeb169 00000000 3ffffed4 40218898
3ffffe60: 3fff0810 3ffe972c 3ffffed4 402088bc
3ffffe70: 000005d4 3ffe972c 3fff109c 4020a92c
3ffffe80: 3ffeb190 2c9f0300 4000050c 00000146
3ffffe90: 3fff50b4 00000020 3fff50b4 40100d5e
3ffffea0: 40219b1b 00000000 00000000 40100708
3ffffeb0: 1373a384 ac1f19fd 872f9ffe a8da50ee
3ffffec0: f6e29c92 d37792ce abdba9d0 3fff169c
3ffffed0: 42ce29d1 3fff50b4 6f3f6f3f 8a003964
3ffffee0: 0000001d 00000146 3fff0950 3fff166c
3ffffef0: 000000be 00000146 00000146 40207ac4
3fffff00: 3fff0956 3fff169c 3fff18fc 00000146
3fffff10: 3fff1038 00000014 3fff0038 4020b035
3fffff20: 3fff1038 00000014 3fff0038 4020b8`n DEBUG: Main. Before initialisePinLogic Memory Free Heap Size=38640
DEBUG: Main. Before initialiseHandlers Memory Free Heap Size=38632

0x4021878d in String::changeBuffer(unsigned int) at ??:?
0x401004a4 in ets_post at ??:?
0x40218827 in String::reserve(unsigned int) at ??:?
0x40102df3 in rcReachRetryLimit at ??:?
0x40218bf2 in String::concat(char const*, unsigned int) at ??:?
0x40102fd0 in rcReachRetryLimit at ??:?
0x40218d22 in String::concat(char) at ??:?
0x40218898 in String::copy(char const*, unsigned int) at ??:?
0x402088bc in _ZN6StringpLIcEERS_RKT_$isra$0 at ChipChopEngine.cpp:?
0x4020a92c in ChipChopEngine::_process_server_message(unsigned char, unsigned char*, int) at ??:?
0x40100d5e in free at ??:?
0x40219b1b in preloop_update_frequency at ??:?
0x40100708 in vPortFree at ??:?
0x40207ac4 in WiFiClient::read(char*, unsigned int) at ??:?
0x4020b035 in onMessageCallback(unsigned char, unsigned char*, int) at ??:?

Gizmo
13 Feb 2026

Hi Mr T,

hmmm, it looks like something to do with forming some String value and some buffer but I can't tell where it's crashing exactly. There's definitely plenty of free heap so i don't think it's a memory issue.
It could be the speed of execution, the status received is fired every time a component details are constructed and the information is sent as reference (&string) so could be something with that?

Can you email me your code, it would be quicker for me to try and figure out what is happening. I have some esp8266 D1-minis so I can run the code on those.
If you have something sensitive in your code just delete it, I just need a rough idea what you are dealing with.
TomaszB
13 Feb 2026

Hi Gizmo


This code has no sense as it doesn't consume received status, but it reproduces the issue. By swaping device_id (from simple device to device with many components) you can recreate the problem.

Regards
T.



//const char* device_id = "device_40f478236c12"; //Good
const char* device_id = "device_9d9e5874f070"; //Derails ChipChop - too many components




void WifiStart(){

WiFi.begin(WIFI_SSID, WIFI_PASSWORD);

//Serial.println("Connecting...");
while (WiFi.status() != WL_CONNECTED){
delay(500);
Serial.print(".");
}
//Serial.println("WiFi Connected!");


}

Ticker recalculate_ticker;

void chipChopConnectedCallback (String &component, String &value, String &source, int command_age){
//Serial.println("chipChopConnectedCallback");
recalculate_ticker.attach_scheduled(10,[](){

ChipChop.getMyStatus();
});
}
/*
void ChipChop_onStatusReceived(String &component,String &value, String &source){
//Serial.println("ChipChop_onStatusReceived: component="+component+" value="+value+" source="+source);
}
*/


void setup(){

Serial.begin(115200);
delay(500);

WifiStart();

ChipChop.debug(false); //set to false for production
ChipChop.start(wifiClient, server_uri, uuid, device_id, auth_code);
//ChipChop.addListener(CC_COMMAND_RECEIVED, ChipChop_onCommandReceived);
//ChipChop.addListener(CC_STATUS_RECEIVED,ChipChop_onStatusReceived);
ChipChop.addListener(CC_CONNECTED,chipChopConnectedCallback);
ChipChopModules.start();

}

void loop(){

ChipChop.run();
ChipChopModules.run();

}


Gizmo
13 Feb 2026
ACCEPTED

Well f*** me sideways and upside down, this was fun!

Ok, I've managed to reproduce the problem on an esp8266 and it was to do with the size of the data received. Annoyingly there's no crash on an esp32, just blissful ignorance :-)

It was to do with some conversion issues from int / uint8_t etc on the esp8266 so it was chopping the incoming buffer and if the payload was large the esp8266 brain would crap out (many component details sent by the server at the same time)

Anyway, I've made som etweaks and I think it's working now, I've tested on some esp8266 and esp32.
p.s. I've also removed a bunch of Serial.print in some places so they shouldn't disturb your uart communication.

Just download a new template from the code builder and then just replace these two files:
- cc_client.cpp
- ChipChopEngine.cpp

Let me know if it works now

G
TomaszB
13 Feb 2026

Hi Gizmo

Thanks for instant help. Now it works well.
I'm going to test it for couple of days to be 100% sure.

Next time, I will reduce number of new ideas on Friday 13th....

Have a nice weekend

Tomasz.