Add companion message TX lifecycle events#2974
Draft
axhoff wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
An ACK timeout does not prove that a direct message was not delivered: the message may have reached the recipient while only the returning ACK was lost. Today clients cannot also tell whether the message was still queued or whether the local radio actually completed its transmission.
This adds the missing local lifecycle signal so v14 clients can start the ACK timer after radio TX completion and present an expired ACK wait as delivery unconfirmed, rather than definite failure.
Protocol
Protocol v14 adds
PACKET_SEND_TX_STATUS(0x91):Statuses are:
0: the local radio driver reported transmission complete1: the local radio rejected the transmission before it started2: completion was not reported before the firmware timeout; the over-air outcome is unknownThe timeout status deliberately retains the expected-ACK entry so a late ACK can still confirm delivery. A completed transmission is not downgraded by a later failed retry.
Compatibility and scope
Validation
pio test -e native: 16/16 tests passedpio run -e Heltec_v3_companion_radio_ble: passed (ESP32)pio run -e RAK_4631_companion_radio_ble: passed (nRF52)pio run -e waveshare_rp2040_lora_companion_radio_usb: passed (RP2040)pio run -e wio-e5_companion_radio_usb: passed (STM32)git diff --check: cleanRefs #1834
Design discussion: #1834 (comment)