Description
Try to use ElegantOTA library, but appears that the call “lv_task_handler()” in the loop function cause a bootloop of the board.
Honestly i don’t know if this is the correct place where to post this problem i’ve encountered.
What MCU/Processor/Board and compiler are you using?
MakerFabs Esp32 S3 with Arduino IDE
What LVGL version are you using?
LVGL 9.1.0
What do you want to achieve?
I want to add the feature to upload via OTA a new update to the board.
What have you tried so far?
Different test, appears that the code for ElegantOta works perfectly on ESP32 S3, but used in my context, keeps crashing.
I’ve tried to add the “ElegantOTA.loop()” in a separate task, with FreeRTOS, but appears to be not linked to my issue.
I’ve also attempted to select a different core into the library Async_TCP, but nothing changed . This is the define that i’ve changed “CONFIG_ASYNC_TCP_RUNNING_CORE”.
Code to reproduce
The code block(s) should be formatted like:
#include <WiFi.h>
#include <AsyncTCP.h>
#include <ESPAsyncWebServer.h>
#include <ElegantOTA.h>
const char* WIFI_SSID = "FILMACHINE_WIFI";
const char* WIFI_PASSWORD = "password";
const char* USERNAME = "username";
const char* PASSWORD = "password";
void connectOtaAP(){
WiFi.softAP(WIFI_SSID, WIFI_PASSWORD);
IPAddress myIP = WiFi.softAPIP();
LV_LOG_USER("AP IP address: %s",myIP.toString());
ElegantOTA.setAutoReboot(true);
ElegantOTA.setAuth(USERNAME, PASSWORD);
ElegantOTA.begin(&otaServer);
// ElegantOTA callbacks
ElegantOTA.onStart(onOTAStart);
ElegantOTA.onProgress(onOTAProgress);
ElegantOTA.onEnd(onOTAEnd);
otaServer.begin();
LV_LOG_USER("Server started");
}
void loop()
{
lv_task_handler(); /* let the GUI do its work */
ElegantOTA.loop();
delay(5);
}
Any kind of suggestion is appreciated!
Thanks in advance!