TAK Meshtastic Gateway
TAK Meshtastic Gateway listens for multicast data from TAK clients (ATAK, WinTAK, and iTAK) and forwards it to a Meshtastic device which transmits it to a Meshtastic network. It will also forward messages from Meshtastic to TAK clients via multicast. Additionally, it enables sending and receiving chat messages and locations between TAK clients and the Meshtastic app. For example, someone using WinTAK can send a message over a Meshtastic network to someone using the Meshtastic app and vice versa.
Features
Send chat and PLI messages from TAK clients (ATAK, WinTAK, and iTAK) over a Meshtastic network
Receive chat and PLI messages from a Meshtastic network and display them in a TAK client
See Meshtastic devices on the TAK client’s map
See the TAK client on the Meshtastic app’s map
Send and receive chat messages between the TAK client and Meshtastic app
TAK Meshtastic Gateway currently only supports sending and receiving chat and PLI messages. Other data types such as data packages, markers, images, etc, are not supported due to the limited bandwidth of Meshtastic networks.
Python Requirements
Due to an issue with the unishox2-py3 package, Windows requires Python version 3.12. Linux and macOS will work with Python versions 3.8 and up.
Known Issues
On Windows, the unishox2-py3
library fails to build from the source distribution with the command pip install unishox2-py3
.
TAK Meshtastic Gateway will instead install this wheel.
As a result, Python 3.12 is required when running TAK Meshtastic Gateway on Windows.
Using Windows Offline
If you’re using Windows offline with the Meshtastic node connected via USB, WinTAK might not send CoT messages over multicast. To fix that, a virtual loopback device needs to be installed.
Right click start button -> Device manager
Select your PC at the top (otherwise menu item will be missing)
Click on Action -> Add legacy hardware
Click Next -> Install the hardware that I manually select from a list (Advanced) -> Next
Select Network Adapters -> Next and then wait until list is loaded
In the Manufacturer list, select Microsoft. In the Model list, select
Microsoft KM-TEST Loopback Adapter
Click Next -> Finish
Installation
For installation you only need to create a Python virtual environment, activate the virtual environment, and install using pip.
Linux/macOS
The unishox2-py3 Python library requires C build tools. In Debian based distros (i.e. Ubuntu) they can be installed with
apt install build-essential
.
python3 -m venv tak_meshtastic_gateway_venv
. ./tak_meshtastic_gateway_venv/bin/activate
pip install tak-meshtastic-gateway
Windows
python -m venv tak_meshtastic_gateway_venv
.\tak_meshtastic_gateway_venv\Scripts\activate
pip install https://github.com/brian7704/OpenTAKServer-Installer/raw/master/unishox2_py3-1.0.0-cp312-cp312-win_amd64.whl
pip install tak-meshtastic-gateway
Usage
When your virtual environment active, run the tak-meshtastic-gateway
command
Architecture
In most scenarios, the user will run TAK Meshtastic Gateway on the same computer that runs WinTAK. The Meshtastic node can either be connected to the same computer via USB, or be on the same LAN as the computer. Connecting to the Meshtastic node over the LAN allows it to be mounted in a spot outside with good mesh reception while the computer is inside.
Meshtastic Node Configuration
The Meshtastic node should be set to the TAK role. TAK Meshtastic Gateway will automatically change the node’s long name to the TAK client’s callsign and the short name to the last four characters of the TAK client’s UID. This ensures that the callsign shows up correctly for mesh users who are only using the Meshtastic app as well as ATAK plugin users. TAK Meshtastic Gateway will also update the Meshtastic node’s location with the location of the EUD.
ATAK Plugin Settings
For best results, use the following settings on devices using the Meshtastic ATAK Plugin.. You can find the settings in ATAK by clicking the Settings tool -> Tool Preferences -> Specific Tool Preferences -> Meshtastic Preferences.
Show all Meshtastic devices: On
Don’t show Meshtastic devices without GPS: On
Do not show your local Meshtastic device: On
The rest of the settings can be changed as needed.
Usage
All arguments are optional. If an argument is not specified its default value will be used.
Flag |
Parameter |
Description |
Default |
---|---|---|---|
|
|
The private IP address of the machine running TAK Meshtastic Gateway. |
TAK Meshtastic Gateway will attempt to automatically find the IP of the computer it’s running on |
|
|
The serial device of the Meshtastic node (i.e. |
TAK Meshtastic Gateway will attempt to automatically determine the serial device |
|
|
The IP address or DNS name of the gateway Meshtastic node. Cannot be used simultaneously with |
Uses a serial connection |
|
|
The IP address of the device running the TAK client (ATAK, WinTAK, or iTAK) |
|
|
|
TCP Port to listen on for DMs |
|
|
|
Minimum time (in seconds) to wait between PLI transmissions from the TAK client to the mesh network. This reduces strain on the mesh network. |
|
|
|
Save log messages to a file. |
|
|
|
Enable debug log messages |
|
Permissions
When the Meshtastic node is connected via USB, TAK Meshtastic Gateway needs to be run as root (or via sudo
) in Linux
and in an administrator PowerShell or Command Prompt in Windows. Connecting to the Meshtastic node via TCP does
not require elevated permissions.
Example Usage Scenarios
Scenario 1
WinTAK on a PC
Meshtastic node connected to the PC via USB
TAK Meshtastic Gateway running on the same PC
Command:
tak_meshtastic_gateway
Scenario 2
WinTAK on a PC
Meshtastic node on the same LAN as the PC
TAK Meshtastic Gateway running on the same PC as WinTAK
Command:
tak_meshtastic_gateway --mesh-ip MESHTASTIC_NODE_IP
Note: SubstituteMESHTASTIC_NODE_IP
with the node’s actual IP (i.e.192.168.1.10
)
Scenario 3
ATAK or iTAK on a mobile device connected to a Wi-Fi network
Meshtastic node connected to the same network
TAK Meshtastic Gateway running on a computer or VM on the same network
Command:
tak_meshtastic_gateway --mesh-ip MESHTASTIC_NODE_IP --tak-client-ip TAK_CLIENT_IP
Note: SubstituteMESHTASTIC_NODE_IP
andTAK_CLIENT_IP
with their actual IPs (i.e.192.168.1.10
and192.168.1.11
)