Closed antoniuschan99 closed 1 year ago
@antoniuschan99
ESP-Insights already sends the reboot reason.
It also optionally sends the coredump
on crash. You need to enable IDF's coredump
feature to be able to do the same. Please follow this and set core dump to flash if you want to get crash info: https://docs.espressif.com/projects/esp-idf/en/release-v5.1/esp32/api-guides/core_dump.html
Thanks for your reply. I mean upon reboot, is there an implementation/function within esp insights api to know if the reboot was caused by a crash? Yes, I am currently able to get it to send coredump info to esp insights cloud.
@antoniuschan99 as you've suggested in main issue description, esp_reset_reason
is the correct way to go. The same API is also used by ESP-Insights internally.
ok great thanks!
In the esp insights marketing, it says you can have esp insights upload the core dump logs to the cloud if there was a crash upon reboot. Is there an esp insights implementation or should we use esp_reset_reason()? Thanks!
`
include "esp_system.h"
void app_main() { // Check the reason for the last reset esp_reset_reason_t reset_reason = esp_reset_reason();
`