Using mavlink-router to connect multiple devices

I’m trying to use mavlink-router to connect to a USB RF radio so that QGC and a python script can connect to the vehicle via 2 separate UDP ports simultaneously.

import time
import csv
import signal
import sys
from pymavlink import mavutil
from datetime import datetime
import math
import platform
import dearpygui.dearpygui as dpg
import argparse

udp_endpoint = ''

# Set the baud rate (match with the PX4 configuration)
baud_rate = 57600

connection = mavutil.mavlink_connection(udp_endpoint)

# Wait for a heartbeat message to ensure the connection is established
print("Waiting for heartbeat message...")
print("Heartbeat received. Connection established.")

Here is my /etc/mavlink-router/main.conf file


[UdpEndpoint MAVLinkApp]
Mode = Normal
Address =
Port = 14550

[UdpEndpoint MyPythonApp]
Mode = Normal
Address =
Port = 14551

[SerialEndpoint Serial]
Device = /dev/ttyUSB0
Baud = 57600

[Route Direct]

which I’m starting with

mavlink-routerd -c /etc/mavlink-router/main.conf

I’m able to use netcat to confirm that I can send/recv messages on the udp port but my python script is never able to receive a heartbeat?