Skip to content

fix(cot): switch emitter to TCP for OpenTAK Server compatibility#112

Merged
d3mocide merged 2 commits into
mainfrom
claude/bold-darwin-oyz9mb
Jun 22, 2026
Merged

fix(cot): switch emitter to TCP for OpenTAK Server compatibility#112
d3mocide merged 2 commits into
mainfrom
claude/bold-darwin-oyz9mb

Conversation

@d3mocide

Copy link
Copy Markdown
Owner

Summary

  • OpenTAK Server does not accept UDP CoT — it listens on TCP only (OTS_TCP_STREAMING_PORT, default 8088). The emitter was sending UDP unicast which arrived at the host but was silently dropped.
  • CotEmitter now connects via TCP when COT_TAKSERVER_HOST is set, with the same reconnect/backoff logic as CotReceiver.
  • Falls back to UDP multicast when no server host is configured (LAN/ATAK-direct mode unchanged).
  • Adds VERTEX- UID filter in CotReceiver to drop CoT echoed back by OTS, preventing entity feedback loops.

Config change required

In .env, update the emitter port to match the OTS TCP streaming port:

COT_TAKSERVER_PORT=8088

Then rebuild: docker compose build poller && docker compose up -d poller

Test plan

  • docker compose logs -f poller | grep "\[cot\]" shows TCP connected to TAK server
  • Aircraft/vessel entities appear in the OpenTAK Server web UI
  • ATAK clients connected to OTS see Vertex tracks
  • Vertex map does not show duplicate tak_client ghost entities for its own aircraft

🤖 Generated with Claude Code

https://claude.ai/code/session_01PswxT6xcRYioF1ZfgszgRi


Generated by Claude Code

claude added 2 commits June 22, 2026 21:30
OpenTAK Server does not accept UDP CoT — only TCP on its streaming port
(OTS_TCP_STREAMING_PORT, default 8088). The emitter was sending UDP unicast
which arrived at the host but was never received by OTS.

- CotEmitter now connects via TCP when COT_TAKSERVER_HOST is set, with
  the same reconnect/backoff logic as CotReceiver
- Falls back to UDP multicast when no server host is configured (LAN mode)
- Extracts _msg_to_cot() helper shared by both TCP and UDP paths
- Adds VERTEX- UID filter in CotReceiver to drop echoed-back CoT and
  prevent feedback loops when OTS broadcasts to all connected clients

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PswxT6xcRYioF1ZfgszgRi
…/PORT

Both emitter and receiver connect to the same TAK server endpoint, so
COT_RECEIVE_HOST and COT_RECEIVE_PORT were redundant. The receiver now
uses COT_TAKSERVER_HOST and COT_TAKSERVER_PORT, and COT_RECEIVE_ENABLED
remains as the simple boolean gate for the receive direction.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PswxT6xcRYioF1ZfgszgRi
@d3mocide d3mocide marked this pull request as ready for review June 22, 2026 21:34
@d3mocide d3mocide merged commit 0ac28d8 into main Jun 22, 2026
3 checks passed
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.

2 participants