I have an ESP8266 project which reads my gas consumption. The hardware and the project run satisfactorily. Sporadically, the ESP8266 can no longer write to its file system and therefore cannot save any data. As soon as I upload the complete data and the sketch to the device again, it works for a few months. After that, the mistake occurred again and again. What could that be?
The ESP8266 then has an "Exception" error. Unfortunately, I have not yet been able to find the reason for the error, why it always happens.
Does anyone have a tip on how I can isolate the problem?
https://github.com/HomeAutoUser/ESP-Gaszaehler-GZ16/tree/pre-release_v1.91
-
1what is what you write? configuration or log files? if you upload the data does it contain the files with logged data? isn't the file system simply full?Juraj– Juraj ♦2020年02月13日 14:56:07 +00:00Commented Feb 13, 2020 at 14:56
-
does github.com/me-no-dev/EspExceptionDecoder give you any more info about what's exploding? Does rebooting once a day fix it?dandavis– dandavis2020年02月13日 19:12:28 +00:00Commented Feb 13, 2020 at 19:12
-
The link is broken, I believe. It may also be that the module's flash is wearing out, although I'm not sure how reuploading would fix that, if that is the case.user47164– user471642020年02月14日 21:25:09 +00:00Commented Feb 14, 2020 at 21:25
-
The link is now revised.user11528497– user115284972020年02月15日 22:04:06 +00:00Commented Feb 15, 2020 at 22:04
1 Answer 1
I have faced the same issue with my water leak detector, based on esp8266. It was caused by memory leak in the ESP binaries, so, I've updated it to ver 2.6.3
So, you can try to log (print to serial) free memory amount:
extern "C"
{
#include "user_interface.h"
}
uint32_t free = system_get_free_heap_size();
-
Thanks for the answer. I now have the problem that it can be compiled with the Core 2.5.2 but not with the Core 2.6.3. I added the code above. Suddenly a variable should not be declared.
exit status 1 StaticRequestHandler has not been declared
user11528497– user115284972020年02月13日 11:17:39 +00:00Commented Feb 13, 2020 at 11:17 -
The line 'extern "C" { #include "user_interface.h" }' is in code already in.user11528497– user115284972020年02月13日 11:18:59 +00:00Commented Feb 13, 2020 at 11:18
-
the memory leak was with WiFiClient in 2.4.1 2 years ago2020年02月13日 14:43:19 +00:00Commented Feb 13, 2020 at 14:43
-
@Juraj, okay, so, any other ideas?gbg– gbg2020年02月13日 14:51:09 +00:00Commented Feb 13, 2020 at 14:51