Error log to sd card
-
I'm running a Fipy which is attaching to LTE CAT M1 and sending data over MQTT TLS every minute. Unfortunately the whole script stops working after approximately 1.5 day. To troubleshoot the issue, I would like to log errors to the sd card. Is this somehow possible?
-
@robert-hh Hello, i have tested with a multiple LiPo batteries from 300 ma - 8000 mah. same issue. I monitor the voltage via a web service, but only all 3 minutes. I can't see any spikes. I think its a inferences problem with the i2c bus.
I think I have a EMV problem. but I want to log the output from the board to get a answer.
-
@svonbentzel That looks like a power supply problem. Can you monitor the power supply for short voltage dropouts?
-
@robert-hh said in Error log to sd card:
@dariox Sure. Depends. For you own logs: Just mount the SD card, open a file in append mode and write to it.
For the crash log: Connect it to a terminal on your PC and log the output to a file.
And the usual question: which release of the firmware are you using? You'll get that with:import uos uos.uname()
Sorry for the old threat. but I have the same problem, and the specially problem is: some errors only if the Pycom board only connected over LiPo Battery. if the board connected over USB --> Errors never seen.
-
Thats true, for core dumps all hope is lost without something externally logging because the fact that the core dump has happened means the esp32 has crashed so it cant be logging
-
@seb Yes, but that is not the core dump after calling for THE GURU.
-
Look into https://docs.pycom.io/chapter/firmwareapi/micropython/sys.html#sysprintexceptionexc-filesysstdout
if you want to print errors to files
-
@robert-hh So it's not possible to log this crash log to the SD card?
I'm not running the latest FW currently, but will update.
-
@dariox Sure. Depends. For you own logs: Just mount the SD card, open a file in append mode and write to it.
For the crash log: Connect it to a terminal on your PC and log the output to a file.
And the usual question: which release of the firmware are you using? You'll get that with:import uos uos.uname()