Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By grhhm
#93496 Hello,

This is an example that I use to work with "ESP-NOW" WiFi mode. Obviously, there are several ESP8266 communicating each other.
I am experimenting with them for a few weeks and they were working OK.

Today one of them started crashing when reaching
Code: Select allWiFi.disconnect();
line in the code. Here I found that adding
Code: Select allWiFi.persistent(false);
before
Code: Select allWiFi.disconnect();
solves the crash problem.

Indeed it does. No crashes but no ESP-NOW connection too.
My guess for the root cause is:
- Wifi needs to write something to Flash in one WiFi function for the sake of other function to read.
- Maybe Flash is damaged somehow and therefore write/read fails and crashes.

My questions:
- How to check this idea?
- Is there better idea or direction to solve the crash problem? Still ESP-NOW communication needed, however I don't have anything to store in the Flash.

Thank you.
Last edited by grhhm on Sun Jan 30, 2022 5:37 am, edited 1 time in total.
User avatar
By grhhm
#93500 Clean up and/or erase of the Flash didn't help.

Well, the brute-force idea was to replace the ESP12 module in the affected device. And it works now.
The Crash was resulted by a damage in Flash.

Posting this as solution for others who might experience ESP8266 crash with stacktrace on attempt to disconnect from WiFi.