Skip to content

fix: attempt to fix ota by fixing task timer & github api call#64

Open
wesleynw wants to merge 3 commits intoPostHog:mainfrom
wesleynw:fix-ota-2
Open

fix: attempt to fix ota by fixing task timer & github api call#64
wesleynw wants to merge 3 commits intoPostHog:mainfrom
wesleynw:fix-ota-2

Conversation

@wesleynw
Copy link
Copy Markdown
Contributor

@wesleynw wesleynw commented Aug 1, 2025

Left some reasoning in #63.

A few different elements here:

  1. The watchdog timer was initialized multiple times in OtaManager.cpp with esp_task_wdt_init, which, because those calls were wrapped with ESP_ERROR_CHECK, caused the kernel to panic because the watchdog timer initialization call returns an error when the timer is already initialized. I've generally only seen this panic happen when checking for updates right after boot.
  2. The watchdog timer is actually already automatically initialized on boot by default (source), so passing the esp_task_wdt_config_t had no effect, the watchdog timer timeout was still it's default of 5 seconds (source), not the intended 30 seconds.
  3. Trying to fix No_Memory error on update check, which is a separate issue from the kernel panics. Using the /latest route in the github API seems to fix this. I'm not 100% sure what caused this, but I haven't gotten that error since changing the route. My working theory is that as more releases were published, it was too much data for the json parser to handle for some reason.

(sorry about big whitespace diff)

@wesleynw wesleynw changed the title fix: attempt to fix ota by avoiding dup watchdog timer initialization fix: attempt to fix ota by fixing task timer & github api call Aug 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant