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 = '127.0.0.1:14551'

# 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...")
connection.wait_heartbeat()
print("Heartbeat received. Connection established.")

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

[General]
LogOutput=true
LogPath=/var/log/mavlink-router.log

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

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

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

[Route Direct]
Source=Serial
Target=MAVLinkApp

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?

connection.wait_heartbeat()