Keep bridged OTA retries resumable across profile handoffs

Let the mesh timed OTA retry guard own byte-identical requests instead of the permanent bridge FIFO. Bind bridge ingress to its primary profile generation and preserve UART reflection/liveness protections. Verified a LoRa to ESP-NOW to LoRa update with outage recovery and install.
This commit is contained in:
mikecarper committed 2026-10-15 21:05:23 -07:00
1 parent bc1b414af0
commit 690ffe5601
11 files changed
+228 -24

No files matched your search

+7 -3
View File
@@ -39,13 +39,17 @@ void BridgeBase::handleReceivedPacket(mesh::Packet *packet) {
return;
}
if (!allowsPacket(packet)) {
if (!preparePacketIngress(packet) || !allowsPacket(packet)) {
_mgr->free(packet);
return;
}
if (!_seen_packets.wasSeen(packet)) {
_seen_packets.markSeen(packet);
// OTA retries deliberately reuse the same request/data bytes. The mesh
// owns their bounded retry/longer-path echo cache and hop ceiling; the
// ordinary bridge FIFO has no expiry and would pin a lost burst forever.
const bool ota = packet->getPayloadType() == PAYLOAD_TYPE_OTA;
if (ota || !_seen_packets.wasSeen(packet)) {
if (!ota) _seen_packets.markSeen(packet);
// bridge_delay provides a buffer to prevent immediate processing conflicts in the mesh network.
_mgr->queueInbound(packet, millis() + _prefs->bridge_delay);
} else {