OTAMgr: check firmware endpoint; HTTPTOFS download; optional SHA256 verify; Update.apply + reboot

This commit is contained in:
2025-09-05 13:17:42 +10:00
parent 14ebfa5451
commit 050d02d822
4 changed files with 229 additions and 0 deletions

View File

@@ -6,6 +6,9 @@
#include "src/app/AppConfig.hpp"
#include "src/hw/PowerMgr.hpp"
#include "src/hw/WiFiMgr.hpp"
#include "src/core/OTAMgr.hpp"
#define FW_VERSION "1.0.0"
static AppConfig CFG;
@@ -26,6 +29,8 @@ void setup() {
NetMgr::attachAndPdp(CFG.apn.c_str());
SmsMgr::setup();
OTAMgr::setCurrentVersion(FW_VERSION);
// 2) Identity
CFG.imei = queryImei();
if (CFG.imei.isEmpty()) CFG.imei = "860016049744324";