Skip to content

Repository files navigation

MAVLink Anywhere

Route MAVLink between a Pixhawk or simulator, a Linux companion computer, and the tools that need flight data.

MAVLink Anywhere logo

License Version

Install on a Raspberry Pi or Linux computer

git clone https://github.com/alireza787b/mavlink-anywhere.git
cd mavlink-anywhere
sudo ./install_mavlink_router.sh
sudo ./configure_mavlink_router.sh

Follow 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 status

By 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.

The command you need

mla help

It points to short help for every common task:

mla help endpoint
mla help input
mla help dashboard
mla help config

Use sudo for commands that change settings.

Manage MAVLink routes

List routes:

mla endpoint list

Send MAVLink to QGroundControl at 192.168.1.50:

sudo mla endpoint add qgc 192.168.1.50 14550

Change, 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 qgc

Changes are validated and backed up. If the running router cannot restart, MLA restores the previous files.

Change the flight-data input

Pixhawk on the Raspberry Pi serial port:

sudo mla input uart /dev/serial0 57600

USB serial adapter:

sudo mla input uart /dev/ttyUSB0 115200

UDP input for SITL or another MAVLink router:

sudo mla input udp 0.0.0.0 14560

Dashboard access

The dashboard starts local-only. An SSH tunnel is the safest remote option:

ssh -L 9070:127.0.0.1:9070 pi@PI_IP

Then open http://127.0.0.1:9070 on your computer.

To expose it on a trusted LAN or VPN:

sudo mla dashboard expose

If no browser login exists, this creates one and prints the password once.

To reverse exposure and return to local-only:

sudo mla dashboard hide

To stop and disable only the UI:

sudo mla dashboard off

Turn it back on:

sudo mla dashboard on

These commands do not stop MAVLink routing.

Reset the dashboard password

sudo mla dashboard password reset

For a generated password instead:

sudo mla dashboard password generate

Manage a machine API token

Use 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 remove

create and rotate print the token once. Save it in your password manager or client configuration.

Raw terminal editing

For full control of main.conf:

sudo mla config edit

MLA 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 path

Update an existing Raspberry Pi

This 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 status

If 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

Ports

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

More help

MAVLink Anywhere works alongside Smart Wi-Fi Manager for connectivity and MDS for fleet operations.

Uninstall

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-reload

Configuration 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.

About

Portable MAVLink routing and telemetry dashboard for companion computers, GCS links, LTE, Wi-Fi, VPNs, UDP, and serial

Topics

Resources

Contributing

Security policy

Stars

78 stars

Watchers

5 watching

Forks

Releases

Packages

Contributors

Languages