OTA over LoRa for ESP32 and nRF52

This commit is contained in:
Valentin Kivachuk Burda committed 2026-06-25 11:47:36 +02:00
1 parent e8d3c53ba1
commit f149858dc4
67 files changed
+8369 -36

No files matched your search

+1 -1
View File
@@ -12,7 +12,7 @@
#endif
#ifndef FIRMWARE_VERSION
#define FIRMWARE_VERSION "v1.16.0"
#define FIRMWARE_VERSION "v1.17.0"
#endif
#if defined(NRF52_PLATFORM) || defined(STM32_PLATFORM)
+4 -2
View File
@@ -924,8 +924,10 @@ MyMesh::MyMesh(mesh::MainBoard &board, mesh::Radio &radio, mesh::MillisecondCloc
memset(default_scope.key, 0, sizeof(default_scope.key));
}
// OTA mesh-integration (receive/begin/loop) is centralized in mesh::Mesh — no per-example wiring.
void MyMesh::begin(FILESYSTEM *fs) {
mesh::Mesh::begin();
mesh::Mesh::begin(); // also starts OTA (ota_ctx().begin) for all roles
_fs = fs;
// load persisted prefs
_cli.loadPrefs(_fs);
@@ -1267,7 +1269,7 @@ void MyMesh::loop() {
bridge.loop();
#endif
mesh::Mesh::loop();
mesh::Mesh::loop(); // also drives the OTA fetch loop (centralized in mesh::Mesh)
if (next_flood_advert && millisHasNowPassed(next_flood_advert)) {
mesh::Packet *pkt = createSelfAdvert();
+5 -1
View File
@@ -2,6 +2,9 @@
#include <Arduino.h>
#include <Mesh.h>
#if defined(ENABLE_OTA)
#include <helpers/ota/OtaContext.h>
#endif
#include <RTClib.h>
#include <target.h>
@@ -73,7 +76,7 @@ struct NeighbourInfo {
#endif
#ifndef FIRMWARE_VERSION
#define FIRMWARE_VERSION "v1.16.0"
#define FIRMWARE_VERSION "v1.17.0"
#endif
#define FIRMWARE_ROLE "repeater"
@@ -172,6 +175,7 @@ protected:
void onPeerDataRecv(mesh::Packet* packet, uint8_t type, int sender_idx, const uint8_t* secret, uint8_t* data, size_t len) override;
bool onPeerPathRecv(mesh::Packet* packet, int sender_idx, const uint8_t* secret, uint8_t* path, uint8_t path_len, uint8_t extra_type, uint8_t* extra, uint8_t extra_len) override;
void onControlDataRecv(mesh::Packet* packet) override;
// OTA mesh-integration is centralized in mesh::Mesh (no per-example onOtaRecv / send adapter / tick).
void sendFloodReply(mesh::Packet* packet, unsigned long delay_millis, uint8_t path_hash_size);
+1 -1
View File
@@ -31,7 +31,7 @@
#endif
#ifndef FIRMWARE_VERSION
#define FIRMWARE_VERSION "v1.16.0"
#define FIRMWARE_VERSION "v1.17.0"
#endif
#ifndef LORA_FREQ
+1 -1
View File
@@ -38,7 +38,7 @@
#endif
#ifndef FIRMWARE_VERSION
#define FIRMWARE_VERSION "v1.16.0"
#define FIRMWARE_VERSION "v1.17.0"
#endif
#define FIRMWARE_ROLE "sensor"