fix(mesh/tx): requeue failed transmits with backoff instead of dropping

A TX that fails to start (startTransmit error) or never completes
(send-complete IRQ lost) was released permanently — with an nRF52
SoftDevice servicing BLE connection events this silently ate ~40 % of
DIRECT-route forwards (measured A/B on mast-three: direct_rx +5 / direct_tx
+3 with an idle BLE connection, 5/5 with BLE off). Flood redundancy
masked the same loss for flood traffic.

Retry up to MESH_TX_RETRIES (3) with a short growing backoff; a
duplicate on air is harmless (hasSeen dedup). New tallies
tx_start_fail/tx_timeout in stats-packets + ERR_EVENT_TX_* flags make
this failure class visible at last.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Fable 5 committed 2026-07-21 13:43:34 +02:00
1 parent c5fb0fb4ce
commit 6e076a6e8d
5 files changed
+54 -11

No files matched your search

+1
View File
@@ -50,6 +50,7 @@ public:
uint8_t payload[MAX_PACKET_PAYLOAD];
int8_t _snr;
int8_t _rssi; // CUSTOM (TeTeHacko): last-hop RSSI (dBm) captured at RX, for the passive mesh analyzer
uint8_t _tx_attempts; // CUSTOM (TeTeHacko): failed TX tries so far (RAM only; Dispatcher requeues instead of dropping)
/**
* \brief calculate the hash of payload + type