🛰️ mavQT
mavQT is a lightweight Python tool that connects MAVLink-enabled drones to IoT systems via MQTT.
It allows you to receive, display, and forward MAVLink messages in real time to an MQTT broker, enabling seamless data streaming to cloud and edge devices.

Features
- Connect to UDP/TCP MAVLink streams from drones
- Forward MAVLink messages to any MQTT broker
- Subscribe and publish MQTT topics with custom QoS levels
- Lightweight and easy to integrate into existing UAV systems
Installation and Setup
- Clone the repository:
git clone https://github.com/rohith8272/mavQT.git cd mavQT - Create a virtual environment and install dependencies:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt - Run the tool:
python -m mavQT
Setting Up an MQTT Broker
Before running mavQT, ensure that an MQTT broker is available to receive MAVLink packets.
Option 1: Run a Local Broker (Mosquitto)
-
Download Mosquitto:
https://mosquitto.org/download/ -
Navigate to the Mosquitto installation directory where
mosquitto.exeis located. - Create a configuration file named
sample.confwith the following contents:# Default listener (local + remote) listener 1883 0.0.0.0 # Allow anonymous connections allow_anonymous true # (Optional) persistence persistence true persistence_location mosquitto/ - Start the broker:
mosquitto.exe -c "sample.conf" -vThe broker should now be running on port 1883.
Option 2: Use an Online Broker
If you prefer not to run a local broker, you can use a free online MQTT service like:
Forwarding MAVLink Streams
To connect your MAVLink stream to mavQT, ensure your flight controller or GCS is sending data to the correct UDP/TCP port. If you haven’t set up Software in the Loop(SITL) simulations before, you can use: https://dronesim.xyz/
Example 1: Using Mission Planner
- Set UDP outbound on port 14550.

Example 2: Using MAVProxy
mavproxy --master=tcp:127.0.0.1:5760 --out 127.0.0.1:14550
For more information on MAVLink routing, check the DroneSim documentation:
Forwarding MAVLink Packets
Testing mavQT
- Connect mavQT to your MQTT broker using its IP and port.
- Subscribe to or publish MQTT topics to view real-time MAVLink data.
- Adjust QoS levels as needed for reliable message delivery.
Example usage:
python -m mavQT
On connection to an active MAVLink stream, new messages are auto discovered. I can now check the messages that I would like to broadcast with the custom topic name (default mavlink/msg). The bottom terminal should now show the client topics. You can also recieve the topics on any device with an mqtt client within the network or using a VPN.
The MAVLink packets are sent as soon as they are received by the tool, while it is also possible to set a time interval and QoS level.
Contribute
The current tool is a PoC and you are free to modify and alter it to your requirements. If you’d like to improve mavQT, report bugs, or suggest features, feel free to open an issue or submit a pull request.
📍 Repository: https://github.com/rohith8272/mavQT