Skip to content

Implement ATAK Plugin V2 and drop unishox2 compression support#10105

Open
thebentern wants to merge 10 commits into
developfrom
tak_v2
Open

Implement ATAK Plugin V2 and drop unishox2 compression support#10105
thebentern wants to merge 10 commits into
developfrom
tak_v2

Conversation

@thebentern
Copy link
Copy Markdown
Contributor

@thebentern thebentern commented Apr 8, 2026

Moves ATAK PLI traffic to ATAK_PLUGIN_V2 port using a flags-byte-prefixed TAKPacketV2 protobuf wire format, and removes all Unishox2 compression from the firmware path. Compression/decompression is now delegated entirely to client apps.

Changes

  • PositionModule: TAK tracker PLI now encodes to TAKPacketV2 protobuf on meshtastic_PortNum_ATAK_PLUGIN_V2. Payload wire format: [1 byte flags (0xFF = uncompressed sentinel)][raw TAKPacketV2 protobuf]. Includes correct ground_track → degrees×100 unit conversion and NUL-terminated callsign copies.
  • AtakPluginModule: Simplified to a pure SinglePortModule passthrough — no protobuf decode, no compression, no periodic OSThread scheduling. Removed OSThread inheritance, runOnce(), and all unused includes.
  • Unishox2: Removed unishox2.cpp / unishox2.h from the codebase entirely.

Wire format (ATAK_PLUGIN_V2)

[flags: 1 byte][payload: N bytes]
  flags = 0xFF  → payload is raw uncompressed TAKPacketV2 protobuf
  flags = 0x00–0x3F → bits 0-5 = zstd dictionary ID (app-originated, firmware passes through unchanged)

🤝 Attestations

  • I have tested that my proposed changes behave as described.
  • I have tested that my proposed changes do not cause any obvious regressions on the following devices:
    • Heltec (Lora32) V3
    • LilyGo T-Deck
    • LilyGo T-Beam
    • RAK WisBlock 4631
    • Seeed Studio T-1000E tracker card
    • Other (please specify below)

@thebentern thebentern requested a review from Copilot April 8, 2026 18:37
@github-actions github-actions Bot added needs-review Needs human review enhancement New feature or request labels Apr 8, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements ATAK Plugin V2 handling by moving ATAK payloads to the ATAK_PLUGIN_V2 port and removing Unishox2-based string compression from the firmware path.

Changes:

  • Switch TAK tracker PLI generation to TAKPacketV2 on meshtastic_PortNum_ATAK_PLUGIN_V2 with a flags-byte-prefixed wire payload.
  • Simplify AtakPluginModule into a SinglePortModule passthrough (no protobuf decode/alter/compression in firmware).
  • Remove Unishox2 compression implementation files from the codebase.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/modules/PositionModule.cpp Generates ATAK V2 PLI packets and prefixes payload with a flags byte.
src/modules/AtakPluginModule.h Refactors module to SinglePortModule and updates module documentation for V2 passthrough.
src/modules/AtakPluginModule.cpp Removes legacy protobuf-based compression/decompression logic; keeps minimal passthrough handler.
src/mesh/compression/unishox2.h Deletes Unishox2 public API header.
src/mesh/compression/unishox2.cpp Deletes Unishox2 implementation.

Comment thread src/modules/PositionModule.cpp Outdated
Comment thread src/modules/PositionModule.cpp
Comment thread src/modules/PositionModule.cpp
Comment thread src/modules/PositionModule.cpp Outdated
Comment thread src/modules/PositionModule.cpp
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Comment thread src/modules/PositionModule.cpp
Comment thread src/modules/PositionModule.cpp
Comment thread src/modules/AtakPluginModule.cpp Outdated
Comment thread src/modules/AtakPluginModule.h
thebentern and others added 2 commits April 8, 2026 14:12
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@thebentern thebentern requested a review from Copilot April 8, 2026 19:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Comment thread src/modules/PositionModule.cpp
Comment thread src/modules/PositionModule.cpp
Comment thread src/modules/AtakPluginModule.h Outdated
Comment thread src/modules/AtakPluginModule.cpp
Comment thread src/modules/AtakPluginModule.h
thebentern and others added 2 commits April 8, 2026 14:42
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Comment thread src/modules/PositionModule.cpp
Comment thread src/modules/PositionModule.cpp Outdated
Comment thread src/modules/AtakPluginModule.cpp Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…needs no periodic scheduling

Agent-Logs-Url: https://github.com/meshtastic/firmware/sessions/bdc82eb6-77c4-4711-839c-04bcbb1aa9cd

Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 8, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request needs-review Needs human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants