fix(firmware): prepend RNode on-air header so RNS peers accept our announce
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) <noreply@anthropic.com>
This commit is contained in:
parent
d882458885
commit
5fa32811d5
@ -499,8 +499,14 @@ static void sendReticulumAnnounce() {
|
|||||||
uint8_t sig[64];
|
uint8_t sig[64];
|
||||||
ed25519_sign(sig, signed_data, sl, rnsEdPub, rnsEdPrv);
|
ed25519_sign(sig, signed_data, sl, rnsEdPub, rnsEdPrv);
|
||||||
|
|
||||||
uint8_t pkt[2 + 16 + 1 + 64 + 10 + 10 + 64 + 32]; size_t p = 0;
|
uint8_t pkt[1 + 2 + 16 + 1 + 64 + 10 + 10 + 64 + 32]; size_t p = 0;
|
||||||
pkt[p++] = 0x01; // flags: HEADER_1|BROADCAST|SINGLE|ANNOUNCE
|
// 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
|
pkt[p++] = 0x00; // hops
|
||||||
memcpy(pkt + p, rnsDestHash, 16); p += 16;
|
memcpy(pkt + p, rnsDestHash, 16); p += 16;
|
||||||
pkt[p++] = 0x00; // context = NONE
|
pkt[p++] = 0x00; // context = NONE
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user