Feature: Repeated sending for DIRECT-route packets with echo-cancellation (improves delivery, reduces floods)#2670
Conversation
|
Some information about the 3 commits:
|
|
This seems very similar to #2367. |
… max_resend_attempts at 293)
|
After mcsim-simulation runs and internal tests on real hardware I released firmware packages named "ufo_0.1" for repeaters, companions and room-servers at https://github.com/usrflo/MeshCore/releases. This firmware is based on MeshCore-dev v1.16.0 with application of this pull request. It would be great to get some feedback on this feature. |
…c to isRetryMatch method for packet retransmission handling
…ncellation cannot be determined
…es to prevent too many package repetitions
Resolved conflicts: - CommonCLI.h/cpp: kept both max_resend_attempts (feature) and cad_enabled/radio_fem_rxgain (upstream dev), appending max_resend_attempts at the end of the pref blob. - Dispatcher.cpp: kept noise-floor calibration at end of loop() (to avoid disrupting repeated-sending retransmissions) and added upstream's setCADEnabled() call inside the idle guard.
|
To recognize propagated TRACE packages a special detection was required as TRACE packages differ in using path and body fields. In the simulation with a relatively stable chain of repeaters (TOPOLOGY, BEHAVIOR) I got the following results: Without repeated sending (max.resend 0) With repeated sending (max.resend 2) |
Relates to #1342.
Motivation
Direct messages over multi-hop paths fail silently when a single hop misses a packet due to temporary radio interference or channel congestion. The sending node then falls back to a flood — which is both unreliable under load and consumes significant airtime. In my tests most incoming paths with a length of 3 hops couldn't be reused in back traces: a far too low number that should be increased by an error correction.
What this PR does
This branch adds conditional repeated sending for DIRECT-route packets at the repeater level:
max_resend_attemptsre-transmissions (default: 2, configurable 0–3 viaset max.resend).loop()call, minimising the race window between echo detection and retransmit timer expiry._acks[]inSimpleMeshTables) to keep deduplication cheap (4-byte compare, no SHA-256) and to prevent ACK entries from evicting long-lived flood-packet hashes.Comparison with PR #2367 (HALO)
This implementation shares the same goal as #2367 — improve direct-path reliability — but uses a different strategy. Both branches were applied to mcsim (including fixes to make the simulator timing-accurate for retransmit scenarios, see simulator commits) and run against the same standardised test scenario.
Test topology: 3 repeaters between Alice and Bob, all links of marginal/bad quality
Test: 10 random seeds × 20 DMs each = 200 deliveries total
halo-direct-path-retries(#2367)repeated-sending-2(this PR)Key advantages of this approach:
Delivery rate vs. resend attempts (mcsim, retry_showcase topology)
max_resend_attemptsA value of 2–3 is a good compromise between reliable delivery and channel efficiency.
CLI
No new commands are needed —
max_resend_attemptsis already exposed: