Skip to content

Expose BITS field in RX.ACTIVITY TCP push messages#198

Merged
Chris-AC9KH merged 1 commit into
JS8Call-improved:masterfrom
BrunoKlu:feature/expose-bits-in-rx-activity
Feb 24, 2026
Merged

Expose BITS field in RX.ACTIVITY TCP push messages#198
Chris-AC9KH merged 1 commit into
JS8Call-improved:masterfrom
BrunoKlu:feature/expose-bits-in-rx-activity

Conversation

@BrunoKlu

Copy link
Copy Markdown
Contributor

Summary

Add the BITS parameter (from ActivityDetail::bits) to the RX.ACTIVITY network message sent via TCP port 2442.

This is a 1-line change in processRxActivity.cpp.

Problem

RX.ACTIVITY TCP 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.DIRECTED messages do not have this problem because processCommandActivity.cpp checks isLast before calling sendNetworkMessage, appending the EOT character. In contrast, processRxActivity.cpp calls sendNetworkMessage before the isLast check — an asymmetry that this PR addresses.

Solution

Add {"BITS", QVariant(d.bits)} to the RX.ACTIVITY params map, exposing the existing d.bits field that already contains the frame type information.

TCP clients can then check:

  • BITS & 1JS8CallFirst (first frame of a message)
  • BITS & 2JS8CallLast (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.

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>
@Chris-AC9KH Chris-AC9KH added the enhancement New feature or request label Feb 24, 2026
@Chris-AC9KH

Copy link
Copy Markdown
Collaborator

@BrunoKlu excellent enhancement. Merged. Thanks!

@Chris-AC9KH Chris-AC9KH merged commit 0ce999d into JS8Call-improved:master Feb 24, 2026
@wmiler wmiler added the API label Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants