mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-06-15 03:04:53 +02:00
fa0b1c9109
PR #2 of 5. Builds the full GRP_TXT wire bytes (header + transport_codes if scoped + path_len + encrypted payload) from the ts+0 pkt_payload guess and stores it in channel_messages.raw_packet right after the send. When echo correlation later identifies the actual pkt_payload (potentially using a different ±dt candidate due to host/firmware clock drift), the raw_packet is rebuilt from the actual one so a future resend matches the original packet hash and dedupes at the repeaters. Transport-scope codes are computed in Python via HMAC-SHA256(scope_key, payload_type||payload)[:2], mirroring TransportKey::calcTransportCode in MeshCore Core (including the 0x0000/0xFFFF reservations). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>