Expose BITS field in RX.ACTIVITY TCP push messages#198
Merged
Chris-AC9KH merged 1 commit intoFeb 24, 2026
Merged
Conversation
Add the `BITS` parameter (from `ActivityDetail::bits`) to the `RX.ACTIVITY` network message, alongside the existing FREQ, DIAL, OFFSET, SNR, SPEED, TDRIFT, and UTC parameters. This allows TCP clients to detect frame boundaries — specifically `JS8CallFirst` (bit 0) and `JS8CallLast` (bit 1) — enabling instant message finalization without waiting for a timeout-based deadline. Currently, `RX.DIRECTED` messages already benefit from the `isLast` check (in `processCommandActivity.cpp`) which appends the EOT character before sending the network message. However, `RX.ACTIVITY` sends the network message *before* the `isLast` check, so TCP clients have no way to know when a message is complete. Adding BITS solves this asymmetry. Use case: headless JS8Call stations (e.g., Raspberry Pi) using the TCP API for RX can now display decoded messages with 0s delay instead of waiting TRPeriod + margin. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
|
@BrunoKlu excellent enhancement. Merged. Thanks! |
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
Add the
BITSparameter (fromActivityDetail::bits) to theRX.ACTIVITYnetwork message sent via TCP port 2442.This is a 1-line change in
processRxActivity.cpp.Problem
RX.ACTIVITYTCP push messages currently include FREQ, DIAL, OFFSET, SNR, SPEED, TDRIFT, and UTC — but not the frame type bits (JS8CallFirst/JS8CallLast).TCP clients have no way to detect when a multi-part message is complete. They must resort to timeout-based deadlines (typically TRPeriod + margin), adding 12-40 seconds of unnecessary delay.
Note:
RX.DIRECTEDmessages do not have this problem becauseprocessCommandActivity.cppchecksisLastbefore callingsendNetworkMessage, appending the EOT character. In contrast,processRxActivity.cppcallssendNetworkMessagebefore theisLastcheck — an asymmetry that this PR addresses.Solution
Add
{"BITS", QVariant(d.bits)}to theRX.ACTIVITYparams map, exposing the existingd.bitsfield that already contains the frame type information.TCP clients can then check:
BITS & 1→JS8CallFirst(first frame of a message)BITS & 2→JS8CallLast(last frame — message complete)Use case
Headless JS8Call stations (e.g., Raspberry Pi) using the TCP API can finalize decoded messages instantly (0s delay) instead of waiting for a timeout, dramatically improving the user experience.
Testing
Tested with JS8Call-Improved 2.5.2 compiled from source on Raspberry Pi 4 (arm64), receiving JS8 Fast mode signals via a QRP Labs QMX transceiver. Both single-fragment and multi-fragment messages are correctly detected and finalized immediately upon receiving the last frame.
Backwards compatibility
This change only adds a new parameter to the existing TCP message. Clients that do not expect BITS will simply ignore it. No breaking changes.