Skip to content

feat: automatic uplink ping scope (v1.22.0) - #19

Merged
efiten merged 1 commit into
masterfrom
feat/auto-scope
Oct 16, 2026
Merged

efiten merged 1 commit into
masterfrom
feat/auto-scope

Conversation

@efiten

@efiten efiten commented Oct 16, 2026

Copy link
Copy Markdown
Owner

Why

Users just over the border in NL or DE get a ping sent in be, which many repeaters there do not forward (live node_declared_regions: e.g. NL-NWS-RP02, NL-KERKR, the VRZL repeaters declare only *, nl or nl-li).

What

  • src/autoscope.js (new): parseScopeList, mergeRegionTable (CoreScope list plus this session's answers, session wins), matchHeard (unique prefixes only), chooseScope, default-scope frames (CMD_GET_DEFAULT_FLOOD_SCOPE 64 / resp 28, fw v10+; un-scoped [54][1], fw v12+).
  • Choice per ping: candidates are the companion's default scope, then uplinkScope in order. The one most of the repeaters heard directly in the last 5 min forward wins; ties go to the order. None but *: un-scoped. Nothing known: companion default.
  • src/app.js: reads the companion's default scope at ping setup, records direct hears (advert, discover, rxlog), fetches uplinkRegionsUrl every 30 min, logs the chosen scope and the counts.
  • src/config.js: uplinkRegionsUrl, default corescopeUrl + /api/nodes/declared-regions.
  • Needs feat(server): GET /api/nodes/declared-regions CoreScope#24 for the server list; without it the app uses its own session answers and logs a 404.
  • v1.22.0, SW coredrive-rx-v57, docs/releases/v1.22.0.md. Payload unchanged.

Tests

  • test/autoscope.test.mjs (11): list parsing, firmware frames, merge, prefix matching, Belgium, the border case, ties, companion default outside the list, un-scoped, fallbacks.
  • npm test: 428 pass. vite build OK.
  • Not tested on a radio yet.

🤖 Generated with Claude Code

…anion (v1.22.0)

A fixed uplinkScope ("be") reaches almost nobody just over the border: of
the Limburg border repeaters in CoreScope's node_declared_regions, many in NL
declare only *, nl or nl-li. uplinkScope is now a preference list
("de,nl,be"). Per ping, src/autoscope.js counts how many of the repeaters
heard directly in the last 5 minutes forward each candidate (the companion's
default scope first, then the list) and takes the most forwarded. With none
forwarded but *, the ping goes out un-scoped (fw v12+); with nothing known,
in the companion's default scope (CMD_GET_DEFAULT_FLOOD_SCOPE, fw v10+).

Declared regions come from CoreScope GET /api/nodes/declared-regions
(uplinkRegionsUrl, default corescopeUrl + that path, every 30 min) merged
with this session's own region answers. The MQTT payload is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@efiten
efiten merged commit 4a91f20 into master Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant