Is there away to capture that this has happened? I have an electron on the asset tracker v2 board which is sending its data over TCP to my server. Its not communicating to the particle cloud at all.
It is not always accessible and would like to know if it has restarted due to a fault.
Is there away of capturing why the SOS was triggered - other than trying to reproduce it…
In my normal coding of .Net - there’s try / catch to try to wrap around code to allow me log the error while developing. Is there anything similar i can use on the particle devices.
Ideally i want to remove the occasional error - but i would also like to be able to capture as much detail as possible when i enable logging on a device.
The knowing it has restarted is fantastic - at least i can see if its doing it too many times and then work backwards to identify why.
I have a SPI memory chip on it so i can log messages to that as i go through my code i can record what step it got to.and if it has restarted due to an error i can submit that to my server
You can also use Backup RAM to keep track as long the device is not depowered.
This way you can update checkpoints and “stack traces” very rapidly without having to care about rewrite cycles or performance impact.