Mark implicit ACK for MQTT as MQTT transport#8939
Conversation
There was a problem hiding this comment.
Pull request overview
This PR modifies the MQTT implicit ACK mechanism to mark ACK packets with the MQTT transport type, preventing premature termination of retransmissions and ensuring proper fallback to flooding from the next hop.
Key Changes:
- Exposes
allocAckNakmethod in RoutingModule for direct ACK packet manipulation - Updates MQTT.cpp to set
transport_mechanismto MQTT for implicit ACKs - Removes trailing whitespace from two files
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/mqtt/MQTT.cpp | Modified to use allocAckNak directly and set transport_mechanism to TRANSPORT_MQTT for implicit ACKs |
| src/modules/RoutingModule.h | Added public allocAckNak method declaration |
| src/modules/RoutingModule.cpp | Implemented allocAckNak method that delegates to parent class |
| src/platform/nrf52/main-nrf52.cpp | Removed trailing whitespace from comment |
| src/mesh/MeshModule.h | Removed trailing whitespace from function declaration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
MQTT might still be causing an ACK which stops the Lora retransmissions. MQTT generates new packet id=3458476566 (0xce242a16) and it looks like that packet is responsible for the |
|
Ah, I see, indeed in the firmware/src/mesh/ReliableRouter.cpp Line 99 in bcfe069 |
|
This should be fixed now in the latest commit. |
|
@GUVWAF the test |
|
@thebentern Ah, I think it should still work because the ACK is still generated, only the retransmissions are not stopped. But I think it's because the test expects it to be sent with firmware/test/test_mqtt/MQTT.cpp Line 89 in 68250dc |
* Mark implicit ACK for MQTT as MQTT transport * TRUNK * Fix build * Make sure implicit ACKs from MQTT do not stop retransmissions in ReliableRouter --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Mark implicit ACK for MQTT as MQTT transport * TRUNK * Fix build * Make sure implicit ACKs from MQTT do not stop retransmissions in ReliableRouter --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
…astic#8947) * Mark implicit ACK for MQTT as MQTT transport * TRUNK * Fix build * Make sure implicit ACKs from MQTT do not stop retransmissions in ReliableRouter --------- Co-authored-by: GUVWAF <78759985+GUVWAF@users.noreply.github.com>
To avoid it stopping retransmissions and hence not falling back to flooding from next-hop.