From 5fa32811d543a7714083c653ac240c4ae4aeecac Mon Sep 17 00:00:00 2001 From: Dorian Date: Wed, 1 Jul 2026 22:36:52 +0100 Subject: [PATCH] fix(firmware): prepend RNode on-air header so RNS peers accept our announce MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RNode firmware frames every LoRa packet as [1-byte header][payload]: on TX it writes `random(256) & 0xF0` (split-flag clear for a single packet), and on RX it reads+strips that byte before handing the packet to RNS. Our bridge sent the raw RNS packet, so a real RNode consumed our flags byte as its header and gave RNS a 1-byte-shifted packet that failed validation — the node received our RF but never registered us as a destination. Prepend a 0x00 RNode header (single, non-split) to the Reticulum announce. Verified live: node .116 now emits an announce event for our dest hash and registers "Archy-Messh" as an LXMF delivery contact. Co-Authored-By: Claude Opus 4.8 (1M context) --- firmware/src/main.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/firmware/src/main.cpp b/firmware/src/main.cpp index cc6e935..fc5f083 100644 --- a/firmware/src/main.cpp +++ b/firmware/src/main.cpp @@ -499,8 +499,14 @@ static void sendReticulumAnnounce() { uint8_t sig[64]; ed25519_sign(sig, signed_data, sl, rnsEdPub, rnsEdPrv); - uint8_t pkt[2 + 16 + 1 + 64 + 10 + 10 + 64 + 32]; size_t p = 0; - pkt[p++] = 0x01; // flags: HEADER_1|BROADCAST|SINGLE|ANNOUNCE + uint8_t pkt[1 + 2 + 16 + 1 + 64 + 10 + 10 + 64 + 32]; size_t p = 0; + // RNode on-air framing: every LoRa frame starts with a 1-byte RNode header + // (RNode_Firmware transmit(): `random(256) & 0xF0`, split-flag clear for a + // single packet). RNode RX reads+strips it before handing the packet to RNS, + // so we must prepend it or the real RNS packet arrives shifted and fails to + // validate. Low nibble 0 = not a split packet. + pkt[p++] = 0x00; // RNode header (single, non-split) + pkt[p++] = 0x01; // RNS flags: HEADER_1|BROADCAST|SINGLE|ANNOUNCE pkt[p++] = 0x00; // hops memcpy(pkt + p, rnsDestHash, 16); p += 16; pkt[p++] = 0x00; // context = NONE