Fix TCP messaging via hub and persist known_destinations (v1.5.6)

This commit is contained in:
DeFiDude
2026-03-08 22:01:41 -06:00
parent e8b7592f33
commit fc5b7a527e
3 changed files with 12 additions and 7 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ build_unflags =
-std=gnu++11
lib_deps =
https://github.com/attermann/microReticulum.git#392363c
https://github.com/ratspeak/microReticulum.git#fix/tcp-transport-and-identity-persistence
https://github.com/attermann/Crypto.git
bblanchon/ArduinoJson@^7.4.2
lovyan03/LovyanGFX@^1.1.16
+2 -2
View File
@@ -6,8 +6,8 @@
#define RATDECK_VERSION_MAJOR 1
#define RATDECK_VERSION_MINOR 5
#define RATDECK_VERSION_PATCH 5
#define RATDECK_VERSION_STRING "1.5.5"
#define RATDECK_VERSION_PATCH 6
#define RATDECK_VERSION_STRING "1.5.6"
// --- Feature Flags ---
#define HAS_DISPLAY true
+9 -4
View File
@@ -64,9 +64,9 @@ bool ReticulumManager::begin(SX1262* radio, FlashStore* flash) {
RNS::Utilities::OS::register_filesystem(fs);
Serial.println("[RNS] Filesystem registered");
// Restore routing tables from SD if missing on flash
// Restore routing tables and known destinations from SD if missing on flash
if (_sd && _sd->isReady()) {
static const char* files[] = {"/destination_table", "/packet_hashlist"};
static const char* files[] = {"/destination_table", "/packet_hashlist", "/known_destinations"};
for (const char* name : files) {
if (!LittleFS.exists(name)) {
char sdPath[64];
@@ -105,6 +105,10 @@ bool ReticulumManager::begin(SX1262* radio, FlashStore* flash) {
_reticulum.start();
Serial.printf("[RNS] Reticulum started (%s)\n", _transportEnabled ? "Transport Node" : "Endpoint");
// Load persisted known destinations so Identity::recall() works
// immediately after reboot for previously-seen nodes.
RNS::Identity::load_known_destinations();
if (!loadOrCreateIdentity()) {
Serial.println("[RNS] ERROR: Identity creation failed!");
return false;
@@ -217,9 +221,10 @@ void ReticulumManager::loop() {
void ReticulumManager::persistData() {
RNS::Transport::persist_data();
// Backup routing tables to SD
RNS::Identity::persist_data();
// Backup routing tables and known destinations to SD
if (_sd && _sd->isReady()) {
static const char* files[] = {"/destination_table", "/packet_hashlist"};
static const char* files[] = {"/destination_table", "/packet_hashlist", "/known_destinations"};
for (const char* name : files) {
File f = LittleFS.open(name, "r");
if (f && f.size() > 0) {