From 0047e4d15278b2877d7be3f488e22155f82050db Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 29 May 2026 12:44:16 -0500 Subject: [PATCH] fix(takserver): emit *:-1:stcp contact endpoint so directed TAK-Talk/GeoChat routes over the mesh; SDK v0.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The reconstructed contact endpoint (0.0.0.0:4242:tcp) made ATAK treat mesh peers as directly reachable, so directed messages (TAK-Talk , 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) --- .../kotlin/org/meshtastic/core/takserver/TAKDefaults.kt | 8 +++++++- gradle/libs.versions.toml | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/core/takserver/src/commonMain/kotlin/org/meshtastic/core/takserver/TAKDefaults.kt b/core/takserver/src/commonMain/kotlin/org/meshtastic/core/takserver/TAKDefaults.kt index e228bd2673..3ac0226d7f 100644 --- a/core/takserver/src/commonMain/kotlin/org/meshtastic/core/takserver/TAKDefaults.kt +++ b/core/takserver/src/commonMain/kotlin/org/meshtastic/core/takserver/TAKDefaults.kt @@ -24,7 +24,13 @@ import org.meshtastic.proto.User // a single exported data package (containing truststore.p12 + client.p12) works for // both Meshtastic-iOS and Meshtastic-Android without reconfiguration in ATAK/iTAK. internal const val DEFAULT_TAK_PORT = 8089 -internal const val DEFAULT_TAK_ENDPOINT = "0.0.0.0:4242:tcp" + +// Default contact endpoint for mesh peers (the real endpoint is never carried over +// LoRa). MUST be the TAK "reply via this server" form `*:-1:stcp`: it makes ATAK route +// directed GeoChat / TAK-Talk (``) back down the Meshtastic server stream. A +// concrete host (e.g. `0.0.0.0:4242:tcp`) makes ATAK attempt a dead direct connection, +// so directed messages never reach the mesh while broadcast PLI still works. +internal const val DEFAULT_TAK_ENDPOINT = "*:-1:stcp" // Bundled certificate password — matches iOS (`"meshtastic"`). Used for the // server.p12 / client.p12 PKCS#12 files shipped under `tak_certs/` on the classpath. diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c355c41c37..741786c249 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -88,7 +88,7 @@ kable = "0.43.0" mqttastic = "0.3.6" jmdns = "3.6.3" qrcode-kotlin = "4.5.0" -takpacket-sdk = "0.5.0" +takpacket-sdk = "0.5.1" # Gradle Plugins develocity = "4.4.2"