Skip to content

fix(takserver): emit *:-1:stcp contact endpoint so directed TAK-Talk/GeoChat routes over the mesh#5661

Merged
jamesarich merged 1 commit into
mainfrom
fix/tak-directed-contact-endpoint
May 29, 2026
Merged

fix(takserver): emit *:-1:stcp contact endpoint so directed TAK-Talk/GeoChat routes over the mesh#5661
jamesarich merged 1 commit into
mainfrom
fix/tak-directed-contact-endpoint

Conversation

@thebentern

Copy link
Copy Markdown
Contributor

Problem

Directed TAK-Talk (<marti>) and directed GeoChat never reach the mesh — only broadcast PLI does. Field captures (CoT Explorer + logcat) show ATAK never hands the directed CoT to the Meshtastic TAK server: every RAW CoT IN (TCP …) is a PLI, while a composed TAK-Talk simply never appears.

Root cause

The reconstructed contact endpoint was 0.0.0.0:4242:tcp (a dead direct-TCP address), so ATAK treats mesh peers as directly reachable and tries to deliver directed messages to that address instead of replying down the Meshtastic server stream. Broadcast PLI is endpoint-agnostic, hence the asymmetry (position works, directed chat/voice doesn't).

Fix

  • Emit the TAK "reply via this server" endpoint *:-1:stcp (matches real ATAK server-relayed contacts) via DEFAULT_TAK_ENDPOINT.
  • Bump takpacket-sdk to 0.5.1, which fixes the same default in the SDK's CotXmlBuilder across all five bindings. __serverdestination keeps the authentic 0.0.0.0:4242:tcp form.

Notes

  • Verified locally: :core:takserver:jvmTest green against SDK 0.5.1 (mavenLocal).
  • ⚠️ CI will be red until org.meshtastic:takpacket-sdk:0.5.1 finishes publishing to Maven Central (SDK release in progress) — it goes green automatically once the artifact is available.

🤖 Generated with Claude Code

…GeoChat routes over the mesh; SDK v0.5.1

The reconstructed contact endpoint (0.0.0.0:4242:tcp) made ATAK treat mesh peers as directly reachable, so directed messages (TAK-Talk <marti>, GeoChat to a callsign) were delivered to a dead address instead of the Meshtastic server stream and never hit the mesh — broadcast PLI was unaffected. Use the TAK 'reply via this server' endpoint *:-1:stcp (DEFAULT_TAK_ENDPOINT) and bump TAKPacket-SDK to 0.5.1, which fixes the same default in the SDK's CotXmlBuilder.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the bugfix PR tag label May 29, 2026
@jamesarich jamesarich added this pull request to the merge queue May 29, 2026
@jamesarich jamesarich removed this pull request from the merge queue due to a manual request May 29, 2026
@jamesarich jamesarich merged commit 4888592 into main May 29, 2026
18 checks passed
@jamesarich jamesarich deleted the fix/tak-directed-contact-endpoint branch May 29, 2026 20:36
thebentern added a commit that referenced this pull request May 30, 2026
The mesh can hand the bridge the same logical CoT event multiple times (a packet relayed over several LoRa paths, or a sender that retransmits), which made ATAK surface doubled chat / TAK-Talk messages. Add a small TTL cache (CotDeliveryDedup) keyed by the exact, already-normalized CoT XML and gate handleV2Packet on it: an identical event within the window is dropped, while genuine updates (new PLI position, moved marker, …) differ in content and pass through. Confined to the single meshPacketFlow collector coroutine, so no locking. Complements the *:-1:stcp endpoint fix (#5661) — that lets the TAK client dedupe cross-transport copies by uid; this stops the bridge from emitting its own duplicates.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants