fix(cot): switch emitter to TCP for OpenTAK Server compatibility#112
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OTS_TCP_STREAMING_PORT, default 8088). The emitter was sending UDP unicast which arrived at the host but was silently dropped.CotEmitternow connects via TCP whenCOT_TAKSERVER_HOSTis set, with the same reconnect/backoff logic asCotReceiver.VERTEX-UID filter inCotReceiverto 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:Then rebuild:
docker compose build poller && docker compose up -d pollerTest plan
docker compose logs -f poller | grep "\[cot\]"showsTCP connected to TAK servertak_clientghost entities for its own aircraft🤖 Generated with Claude Code
https://claude.ai/code/session_01PswxT6xcRYioF1ZfgszgRi
Generated by Claude Code