Route MAVLink between a Pixhawk or simulator, a Linux companion computer, and the tools that need flight data.
git clone https://github.com/alireza787b/mavlink-anywhere.git
cd mavlink-anywhere
sudo ./install_mavlink_router.sh
sudo ./configure_mavlink_router.shFollow the prompts. On a Raspberry Pi, the serial setup may ask for one reboot. After rebooting, run the last command again.
Check the result:
mla statusBy default:
- Pixhawk data comes from the serial device chosen during setup.
- QGroundControl can connect to the Pi's IP on UDP port
14550. - The optional dashboard runs locally at
http://127.0.0.1:9070.
mla helpIt points to short help for every common task:
mla help endpoint
mla help input
mla help dashboard
mla help configUse sudo for commands that change settings.
List routes:
mla endpoint listSend MAVLink to QGroundControl at 192.168.1.50:
sudo mla endpoint add qgc 192.168.1.50 14550Change, temporarily disable, or remove it:
sudo mla endpoint edit qgc 100.80.10.20 24550
sudo mla endpoint disable qgc
sudo mla endpoint enable qgc
sudo mla endpoint remove qgcChanges are validated and backed up. If the running router cannot restart, MLA restores the previous files.
Pixhawk on the Raspberry Pi serial port:
sudo mla input uart /dev/serial0 57600USB serial adapter:
sudo mla input uart /dev/ttyUSB0 115200UDP input for SITL or another MAVLink router:
sudo mla input udp 0.0.0.0 14560The dashboard starts local-only. An SSH tunnel is the safest remote option:
ssh -L 9070:127.0.0.1:9070 pi@PI_IPThen open http://127.0.0.1:9070 on your computer.
To expose it on a trusted LAN or VPN:
sudo mla dashboard exposeIf no browser login exists, this creates one and prints the password once.
To reverse exposure and return to local-only:
sudo mla dashboard hideTo stop and disable only the UI:
sudo mla dashboard offTurn it back on:
sudo mla dashboard onThese commands do not stop MAVLink routing.
sudo mla dashboard password resetFor a generated password instead:
sudo mla dashboard password generateUse a token for MDS Fleet Ops or another program that changes routes through the API:
sudo mla dashboard token create
sudo mla dashboard token rotate
sudo mla dashboard token removecreate and rotate print the token once. Save it in your password manager or client configuration.
For full control of main.conf:
sudo mla config editMLA opens $EDITOR or nano, validates the file, creates a backup, syncs /etc/default/mavlink-router, and safely applies the change.
Useful checks:
mla config show
mla config check
mla config pathThis updates MAVLink Anywhere without replacing your router config, routes, dashboard password, token, or saved dashboard access mode:
cd ~/mavlink-anywhere
git fetch --tags origin
git switch main
git pull --ff-only
sudo ./configure_mavlink_router.sh --install-dashboard
mla statusIf your checkout is somewhere else, use that directory in the first command. Rebuilding upstream mavlink-routerd is optional and separate:
sudo ./install_mavlink_router.sh --force| Port | Purpose |
|---|---|
14550/udp |
Default device-side listener for a GCS |
14540/udp |
Common local MAVSDK output |
14569/udp |
Common local mavlink2rest output |
24550/udp |
Common explicit remote/VPN GCS output |
5760/tcp |
mavlink-router TCP server |
9070/tcp |
Optional web dashboard |
- CLI command reference
- Dashboard and authentication
- First board setup
- UART and Pixhawk wiring
- Troubleshooting
MAVLink Anywhere works alongside Smart Wi-Fi Manager for connectivity and MDS for fleet operations.
sudo systemctl disable --now mavlink-anywhere-dashboard mavlink-router
sudo rm /etc/systemd/system/mavlink-anywhere-dashboard.service
sudo rm /etc/systemd/system/mavlink-router.service
sudo rm /usr/local/bin/mla
sudo rm -r /usr/local/lib/mavlink-anywhere
sudo systemctl daemon-reloadConfiguration is intentionally left in /etc/mavlink-router and /etc/mavlink-anywhere so it can be recovered. Remove those directories only if you no longer need the saved settings.
Licensed under the MIT License.