A per-stream bridge TX leg on a MASTER slot is popped by its terminator, so a leg still there after 5 s lost it. The trimmer also required TX_TYPE != VTERM, but TX_TYPE holds the frame's dtype_vseq and voice burst C carries 2, the terminator's value: a call that lost its terminator right after burst C kept its leg forever and never got its END TX.
_send_data_to_hbp rebuilt each frame as header + burst and dropped the two
BER/RSSI octets, so every unit-data frame went out 53 bytes long. DMRGateway
only accepts DMRD frames of exactly 55 bytes (g4klx/DMRGateway DMRNetwork.cpp,
HOMEBREW_DATA_PACKET_LENGTH), so these frames never reached the radio.
It went unnoticed because a peer-originated data stream also reached the
hotspot through the private-call path in full. Frames sent by a plugin
(ServerContext.send_dmrd) only take the unit-data path: a D-APRS plugin's
answers reached the hotspot but the Hytera/MOTOTRBO radio never heard them
(seen on air 24-oct-2026: same bytes accepted at 55, ignored at 53).
Keep the received BER/RSSI octets (zero when absent).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LweTug2oJgREHKxEUuE38Q
The MASTER local REPEAT (_pvt_repeat_targets) already delivers a private
unit-data frame to the destination hotspot when both are on the same MASTER;
the SUB_MAP lookup in RoutingUseCases sent it a second time through
_send_data_to_hbp. The hotspot got every CSBK/header/block twice, which
breaks unconfirmed (rate 1/2) SMS reassembly on the radio. Same rule as
private voice. Plugin frames still go out through routing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LweTug2oJgREHKxEUuE38Q
The config normalizer, the settings lookup and the HBP embedded-LC buffer
all defaulted a missing key to false. Default it to true, matching the
example config; an explicit false still disables it.
With ALLOW_UNREG_ID off, the master compared the RPTC callsign with the
subscriber DB byte for byte. Older IPSC2HBP builds send it lower case
("hp3icc"), so after a good RPTL/RPTK the master answered MSTNAK
("Callsign does not match subscriber database: Sent Call: hp3icc, DB
call HP3ICC") on every attempt, while BM, XLX and other masters accepted
the same repeater.
Callsigns are case-insensitive: compare both sides upper-cased. An
unknown ID (validate_id() returns False) is still rejected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ma9qC57Hrw7b4dZWoErMp4
An empty SUB_MAP_FILE already loaded sub_map.pkl, but the periodic save,
SIGHUP, kill switch and shutdown all skipped writing, so routes learned
since startup were lost on restart. Write to the same path the map is
loaded from; docs now say empty means sub_map.pkl.
With SUB_MAP_FILE empty the server loads sub_map.pkl at startup but never
writes it, so private-call routes were lost on every restart for installs
based on the example. Set it to sub_map.pkl and correct the docs, which
claimed an empty value fell back to a default name.
Unit data on a shared MASTER, TG 4000 on a multi-peer MASTER, the
announcements' quiet-TG wait and tg_quiet_for, connected_at in topology;
monitor MAP section, dashboard config reload, SERVER_STATUS_URL and the
WebSocket compressed once per broadcast. English and Spanish.
Unit data was recognised by data type 6, 7 and 8 only. An SMS sent as rate 1
blocks (data type 10) went down the private voice path instead: repeated to
every hotspot of a shared MASTER and sent over slots playing voice, the same
crackle #144 removed for rate 1/2 and 3/4 data. One UNIT_DATA_DTYPES set now
drives the dispatch, the unit data checks and the local REPEAT.
The shared-MASTER handling only applied to the proxy target. A MASTER with
MAX_PEERS > 1 that hotspots reach on its own port still ran the in-band 4000
signalling and deactivated every dynamic bridge, so one hotspot's 4000 cut the
talkgroups every other hotspot on it was listening to.
A radio's GPS/ARS to an ID never heard on the shared MASTER was repeated to
every hotspot on it, and MMDVMHost drops the network voice it is playing when
a CSBK or data header lands on that slot: everyone heard a crackle every few
minutes. Unit data now goes only to its destination's hotspot, never as a
broadcast on a shared MASTER, and not while that hotspot carries voice on the
slot (any slot when simplex).
Review of #141:
- A live over sharing a slot with another TG: on the shared SYSTEM the
slot's flat RX fields only hold the last frame, so with hotspot A on
TG 213 and hotspot B on TG 91 talking on the same slot (B's frame
last) tg_quiet_for(213) counted time while A was on air.
tg_quiet_for now also reads each slot's RX_STREAMS (#129): a stream on
the TG with its last frame within STREAM_TO is live.
- An over that ends without a terminator left the record at its start:
the stream trimmer now notes the TG at the stream's last frame when a
hotspot stream (RX_STREAMS) or an OpenBridge ingress stream times out.
_note_tg_heard never moves the record back.
- Tests: your interleaved A/B case, a hotspot over and a mesh over that
lose their terminator (quiet from the last frame, not the start), and
a core announcement (synthetic, no plugin origin) not counted. Each
fails when its fix is removed. The deterministic harness now keeps
RX_STREAMS on HBP ingress, as udp_hbp does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JnjAx7G27d9q88j9PFLj11
Review of #141:
- The quiet window is a voice-announcements option, tg_quiet_s
(config.yaml, default 3 s; 0 turns it off), not the MASTER's
GROUP_HANGTIME, which is 15 s in the example yaml and would have kept
announcements retrying through normal pauses until they were dropped.
- Routing keeps a per-TG record of when an over last started or ended
(_tg_last_heard, written on voice headers and terminators only, from
any ingress but the server's own voice, pruned past 2048 TGs / 600 s).
On the shared SYSTEM the slot's flat RX_TGID / RX_TIME only remember
the latest stream, so a hotspot keying TG 91 erased the pause of a QSO
on TG 213 on the same slot; the record does not.
- RoutingUseCases.tg_quiet_for(tg): 0.0 while a stream on the TG is live
anywhere (tg_has_active_conversation), else seconds since the record,
inf if never heard. Offered to plugins as ServerContext.tg_quiet_for
(PluginDmrdSender: granted talkgroups only), next to voice_slot_for_tg,
which is back to develop's.
- The announcer waits before choosing a slot while quiet < tg_quiet_s:
every 5 s while voice is live, else right when it has been quiet long
enough. tg_voice_heard_within and the own-stream list are gone.
Tests: routing (never heard, from the end of a mesh over, live, another
MASTER, TG 91 on the same slot keeps the 213 trace, own voice not
counted), sender (granted TGs only), announcer (waits through a QSO,
a short pause keeps it waiting, 0 turns it off, no tg_quiet_for = as
before). 10 fail on develop.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JnjAx7G27d9q88j9PFLj11
start_utc / end_utc were HH:MM:SS.s only. A probe runs for days, so a
filter or a --summary by hour mixed the same hour of different days: on
2131 an on-air A/B test picked up yesterday's announcement at the same
time and looked like two TG 213 streams reaching the hotspot at once.
- Rows now carry YYYY-MM-DDTHH:MM:SS.s (UTC).
- --summary groups by date and hour (YYYY-MM-DDTHH); rows written before
this change (no date) still group by HH.
- Tests: a row carries its date; the summary keeps the same hour of two
days apart and still reads old rows. Both fail without the change.
- Docs (en/es) give the format.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JnjAx7G27d9q88j9PFLj11
voice_slot_for_tg() only looked at the announcement MASTER's own slot.
A QSO on the same talkgroup coming in over the mesh (or from another
MASTER) rides the slot's TX leg, which no longer counts as busy since
#121, and between two overs there is no live stream at all. So a
scheduled announcement could start in the pause between overs: the
hotspots that then picked it up dropped the next over (same TG, other
stream) for the length of the announcement.
tg_voice_heard_within() (routing/helpers.py) tells whether a talkgroup
carried group voice in the last N seconds on any MASTER/PEER slot (RX or
TX leg) or OpenBridge stream, ignoring given stream IDs.
voice_slot_for_tg() returns None while the TG was heard within the
announcement MASTER's GROUP_HANGTIME (TG_QUIET_DEFAULT_S = 5 s when
unset), so the announcer retries every 5 s as for a busy slot. The
plugin's own streams of the last minute are ignored, so its previous
announcement does not hold the next one.
Tests: a mesh QSO's pause holds it and the window then frees it; the
window follows GROUP_HANGTIME; an over from a hotspot on another MASTER
holds it; another TG does not; the plugin's own last announcement does
not. The first three fail on develop.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JnjAx7G27d9q88j9PFLj11
The server emits both on every logged-in hotspot (options once it has OPTIONS), but the
topology peer schema has additionalProperties false, so a real topology failed to
validate. ts1_static/ts2_static descriptions now say they include the MASTER's statics.
merge_top_level_config never copied OBP_PROXY, so a reload kept DEBUG as at start and the
'bind change ignored' warning could never fire. DEBUG now applies on SIGHUP; LISTEN_PORT,
LISTEN_IP and BIND_LEGACY_PORTS still need a restart and log the warning. Docs updated.
Both languages: MASTER yaml statics on a shared MASTER, per-stream RX on one slot, voice
sequence handling, bridge reset on the last peer, OpenBridge DNS anchoring and shared
passphrases, OBP_PROXY/ALIASES keys and reload rules, TGID_ACL on OPENBRIDGE, report v2
topology fields, plugins (voice_slot_for_tg, voice-announcements, slot sharing), server
prompts on TS2, TG 4000 leg release and voice reply, mesh_* modules.
LOOP_GUARD now defaults to true: an echo coming back through a transcoding bridge is
dropped unless a system sets log (write a *LoopGuard* line and let it through) or false.
The example yaml explains what the guard catches that stream-ID loop control cannot.
The note on seq_advance and the two tests named one app; the capture on 7302 was from a
different one, and the fix covers any client that resets the sequence on the terminator.
A MASTER without the key now answers a hotspot's TG / ID 4000 with its link status;
TG4000_VOICE: false turns it off. Example yaml and docs (en/es) updated.
DVSwitch Mobile sends the terminator with seq 0 after ..., 28, 29. Since #127 seq_advance
takes it as a late packet and the ingress drops it, so on HBP and OBP the call only ended on
the 5 s stream timeout (5-10 s late on the dashboard) and a TG 4000 reply never fired. Before,
seq 0 skipped the checks. A terminator is now always the next packet; everything else keeps
#127's late/duplicate handling.
_release_legs_nobody_else_holds() checked the statics of the other
hotspots only: a hotspot with TS2=3340 in its OPTIONS that also held
3340 as a dynamic lost the 3340 leg after its own 4000, while the reply
said "linked to 3340". A leg is now kept while any connected hotspot,
the sender included, has the TG on that slot as an OPTIONS or YAML
static, or another one holds it as a dynamic.
The pacing test now gives each frame 5 ms of work, so a schedule that
drifts (next frame at now + 58 ms) fails it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JnjAx7G27d9q88j9PFLj11