Skip to content

Conversation

@CapnBry
Copy link
Member

@CapnBry CapnBry commented Oct 30, 2025

Remove the redundant tlmConfirm bit in PACKET_TYPE_LINKSTATS. The extra byte in the linkstats packet returns fullres telemetry bandwidth back to where it was in 3.x, and also use this packet in standard res modes to provide massive bandwidth increases for low telemetry rates.

Also refactor all names to be consistent where the old "MSP" referred to any data uplink packet and the old "telemetry" referred to any data downlink packet. TelemetryStatus is the same as tlmConfirm, so unified their names as well as stubbornAck.

WARNING: Breaks 4.0 OTA compatibility

This rejiggers many OTA structures. The RX and TX MUST use the this PR or above as mixing prior versions will result in no telemetry (at the best) or crashes.

Redundant Bit

tlmConfirm was present in the OTA_LinkStats_s structure, as well as in the surrounding data_dl union. This was used somewhat inconsistently throughout the code on both sides of the connection. We only need one, so it is now just in the data_dl union along with the packageIndex. The trueDiversityAvailable bit was moved into the OTA_LinkStats_s structure.

Increased Telemetry Bandwidth

This is what you're all reading this for, right? Fullres modes get their 1 byte back in the linkstats that was commandeered during OTA 4.0 development, so it is just back to where it was in 3.x (apart from the 4.0 Gemini boost obviously).

The real star of the show is the clear byte in the standard res packets that was just carrying the trueDiversityAvailable flag. This is now being used as additional payload for data downlink, similar to the way fullres splits the packet. It is just one byte but far more important is that it increases the number of data downlink transfers from 2 to 4 per second when using Std telemetry. Given that any downlink transfer takes a minimum of 2 packets, this is a massive increase.

Time to transfer all Betaflight telemetry items (VBat, FlightMode, VSpd, GPS, Attitude / 14 sensors):

  • 6657 -> 5120 ms 500Hz Std ANT1 (30% increase)
  • 5119 -> 3072 ms 500Hz Std Gemini (66% increase)
  • 6656 ms in 3.x.x regardless of antenna mode

Low (1:128) rates benefit the most and the benefit scales down at higher rates. 1000Hz 1:2 is only a 0.4% theoretical increase.

Refactor / Rename

Some old comments referred to old OTA packet fields. Much of the code referred to uplink data as "MSP" regardless of the fact it usually was CRSF. Downlink data was referred to as telemetry. Everything is now standardized to "data_dl" or "data_ul".

All of the data downlink OTA generator and data uplink OTA processor code was refactored to use common code. The RX's downlink was a real problem to keep together due to how many objects were needed, so it just became a preprocessor macro for readability. The TX's code is a few hundred bytes smaller.

@CapnBry CapnBry added enhancement 🪄 New feature or request V4.0 🍔 labels Oct 30, 2025
@CapnBry
Copy link
Member Author

CapnBry commented Oct 30, 2025

schugabe is correct, tlmConfirm is also no longer appropriate. Renamed to stubbornAck.

Semi-related: there was a static tlmConfirm in the OTA unpacker that was used from the 3.x Wide switch mode where it wasn't sent in every packet, replaced with just a stack variable.

@CapnBry
Copy link
Member Author

CapnBry commented Oct 31, 2025

Tested this morning with Rotorflight custom telemetry as well, since that sends big fat packets instead of the smaller CRSF sensors. Because the overhead of larger packets is less, not as much gain there. Also because it mixes the rates of the sensors and it has so many I am here measuring telemetry bandwidth in bits/s

  • 72.1bps -> 86.9bps 500Hz 1:128 ANT1 (20% improvement)
  • 131.8bps -> 171.3bps 500Hz 1:128 Gemini (30% improvement)

Copy link
Collaborator

@pkendall64 pkendall64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and looks good. I don't know is this is correct, but it feels like the RX Lua loads a lot faster!

@CapnBry CapnBry merged commit 0aa17a0 into ExpressLRS:master Nov 7, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement 🪄 New feature or request V4.0 🍔

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants