Fix LXMF bidirectional messaging, increase known_destinations cap

Outbound (Ratdeck→Python) was broken because Identity::recall() could
never find the recipient. Root cause: OS::time() returns seconds since
boot on ESP32, but persisted known_destinations entries carried timestamps
from the previous session. New announces got timestamp ~31s while persisted
entries had ~5000s, so the LRU cull immediately removed the new entry.

The microReticulum Identity.cpp fix (timestamp normalization on load) is
in .pio/libdeps and must be upstreamed to ratspeak/microReticulum separately.

Changes:
- known_destinations cap 256→512 (PSRAM pool was 1% used, plenty of room)
- Fix link delivery destHash: onLinkEstablished callback was passing link_id
  instead of LXMF destination hash, corrupting conversation routing
- Add diagnostic logging: [LXMF-DIAG], [TCP-DIAG], [HEART-DIAG], [DIAG-PROOF]
  for tracing link establishment, proof routing, and interface status
This commit is contained in:
DeFiDude
2026-03-20 19:24:28 -06:00
parent 45df807424
commit 43e5420416
4 changed files with 39 additions and 3 deletions
+9
View File
@@ -1055,6 +1055,15 @@ void loop() {
radioOnline ? "ON" : "OFF",
sdStore.isReady() ? "OK" : "FAIL",
flash.isReady() ? "OK" : "FAIL");
// Diagnostic: show registered transport interfaces and TCP connection status
{
auto& ifaces = RNS::Transport::get_interfaces();
int tcpUp = 0;
for (auto* tcp : tcpClients) { if (tcp && tcp->isConnected()) tcpUp++; }
Serial.printf("[HEART-DIAG] ifaces=%d tcp=%d/%d wifi=%s\n",
(int)ifaces.size(), tcpUp, (int)tcpClients.size(),
wifiSTAConnected ? "STA" : (wifiImpl ? "AP" : "OFF"));
}
maxLoopTime = 0;
}
}