Skip to content

TCP API: STATION.SET_GROUPS + STATION.SET_AVOID_ALLCALL#208

Merged
wmiler merged 6 commits into
JS8Call-improved:masterfrom
BrunoKlu:pr/tcp-groups
Mar 7, 2026
Merged

TCP API: STATION.SET_GROUPS + STATION.SET_AVOID_ALLCALL#208
wmiler merged 6 commits into
JS8Call-improved:masterfrom
BrunoKlu:pr/tcp-groups

Conversation

@BrunoKlu

@BrunoKlu BrunoKlu commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds TCP commands to manage JS8Call groups and @allcall opt-out remotely, enabling headless operation without the Qt Settings dialog.

Depends on PR #207 (TCP API: 8 MODE commands + headless autoreply confirmation)

New TCP commands

Command Description
MODE.SET_GROUPS Replace the subscribed groups list with validation
MODE.SET_AVOID_ALLCALL Toggle @allcall opt-out
MODE.GET_CONFIG Now includes MY_GROUPS and AVOID_ALLCALL fields

Validation

MODE.SET_GROUPS validates each group using Varicode::isGroupAllowed() and Varicode::isCompoundCallsign(), returning a TCP error response instead of opening a JS8MessageBox (which blocks under xvfb/headless).

Example error response:

{"type": "MODE.SET_GROUPS", "params": {"ERROR": "Group not allowed: @APRSIS"}}

Configuration::setMyGroups()

Bulk-replaces the groups list without per-group addGroup() calls, which use JS8MessageBox::critical_message() on invalid input — blocking under xvfb. setMyGroups() writes directly via write_settings().

Changes

File Change
JS8_Mainwindow/networkMessage.cpp 2 new TCP commands + GET_CONFIG enrichment (+57 lines)
JS8_UI/Configuration.cpp setMyGroups() method (+5 lines)
JS8_UI/Configuration.h Declaration (+1 line)

63 insertions, 0 deletions across 3 files.

Testing

  • Tested on Raspberry Pi 5 running JS8Call 2.5.2 headless via xvfb-run
  • Groups persist in INI (MyGroups key) after MODE.SET_GROUPS
  • Forbidden groups (@APRSIS, @JS8NET) rejected with TCP error
  • @allcall toggle reflected in AvoidAllcall INI key
  • MODE.GET_CONFIG returns correct MY_GROUPS and AVOID_ALLCALL values

BrunoKlu and others added 3 commits March 2, 2026 03:39
- networkMessage.cpp: MODE.GET_CONFIG, SET_AUTO_REPLY, SET_JS8HB,
  SET_HBACK, SET_MULTI_DECODER, SET_HB_INTERVAL, SET_HB_TIMER, SEND_HB
- mainwindow.cpp/h: confirmThenEnqueueMessage() sends TCP push
  instead of SelfDestructMessageBox (headless/xvfb compatible)
- Configuration.cpp/h: autoreply_confirmation accessor

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…s live

- MODE.SET_GROUPS : remplacement direct de la liste via setMyGroups()
  (bypass addGroup MessageBox bloquant sous xvfb)
- MODE.SET_AVOID_ALLCALL : toggle opt-out @allcall via TCP
- MODE.GET_CONFIG enrichi : retourne MY_GROUPS + AVOID_ALLCALL
- setMyGroups(QStringList) dans Configuration : ecriture directe + write_settings()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Verifie isGroupAllowed() + isCompoundCallsign() pour chaque groupe
- Retourne une erreur TCP (champ ERROR) au lieu d'ouvrir un MessageBox Qt
- Compatible headless (xvfb) et clients TCP generiques

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wmiler

wmiler commented Mar 2, 2026

Copy link
Copy Markdown
Collaborator

This all needs to move to STATION as well. MODE is reserved for the JS8 protocol ONLY. STATION is basically any configuration stuffs, and anything that doesn't logically fit anywhere else.

- Rename all MODE.* config commands to STATION.* (including SET_GROUPS
  and SET_AVOID_ALLCALL)
- Add @note API 2.6+ to each new @brief block (12 commands total)
- Translate French comments to English

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
BrunoKlu added a commit to BrunoKlu/JS8Call-improved that referenced this pull request Mar 2, 2026
Applique les memes corrections que PRs JS8Call-improved#207/JS8Call-improved#208/JS8Call-improved#209 sur la branche
qmx-pi : MODE.* → STATION.* pour les commandes config, FILTER.* → RX.*
pour les commandes filtre, @note API 2.6+ sur tous les @brief, et
traduction commentaires francais → anglais.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wmiler wmiler mentioned this pull request Mar 3, 2026
@wmiler wmiler added this to the 2.6.0 milestone Mar 4, 2026
@wmiler wmiler added documentation Improvements or additions to documentation enhancement New feature or request API labels Mar 4, 2026
Move all STATION.* command handlers (GET_CONFIG, SET_AUTO_REPLY,
SET_JS8HB, SET_HBACK, SET_MULTI_DECODER, SET_HB_INTERVAL,
SET_HB_TIMER, SEND_HB, SET_AUTOREPLY_CONFIRMATION,
AUTOREPLY_CONFIRM_RESPONSE, SET_GROUPS, SET_AVOID_ALLCALL)
from the MODE section to the STATION section, just before the
End STATION Commands marker. Fix End MODE Commands marker.
Update summary comment block with new command list.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wmiler

wmiler commented Mar 7, 2026

Copy link
Copy Markdown
Collaborator

You will need to rebase since #207 was merged to resolve conflicts. I'm going to merge #209 first tho.

@Chris-AC9KH

Copy link
Copy Markdown
Collaborator

The code here looks good. I think there's three outstanding API-based PR's that will have to be merged in order and conflicts resolved by rebasing on master as we go.

@wmiler

wmiler commented Mar 7, 2026

Copy link
Copy Markdown
Collaborator

The code here looks good. I think there's three outstanding API-based PR's that will have to be merged in order and conflicts resolved by rebasing on master as we go.

Yeah, I think he had 2 PRs from the same branch, I'm at a mini FD right now, and not in front of my dev machine.

@wmiler wmiler changed the title TCP API: MODE.SET_GROUPS + MODE.SET_AVOID_ALLCALL TCP API: STATION.SET_GROUPS + STATION.SET_AVOID_ALLCALL Mar 7, 2026
@wmiler wmiler merged commit 998d032 into JS8Call-improved:master Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants