MAVLink custom port to GCS
-
I'm trying to send telemetry data from multiple VOXL 2 drones to a single GCS IP.
Is there a way to set a custom UDP port for
secondary_static_gcs_ip
(other than 14550) on each individual VOXL 2 drone so I can guarantee which drone is connecting? Essentially something like:- drone 1 (MAV_SYS_ID = 1):
drone.connect(system_address="udp://:14551")
- drone 2 (MAV_SYS_ID = 2):
drone.connect(system_address="udp://:14552")
- drone 3 (MAV_SYS_ID = 3):
drone.connect(system_address="udp://:14553")
- etc.
I'm able to view multiple unique drones in QGroundControl, uniquely identified by setting a unique
MAV_SYS_ID
on each drone first. However, I'm trying to connect using mavsdk now instead, but I haven't had any luck using the sysid arg, so it's always a random gamble on which drone actually connects when I try system address ofudp://:14550
. - drone 1 (MAV_SYS_ID = 1):
-
@dan64 That port number is hardcoded in voxl-mavlink-server. You can modify that source code and add a configurable GCS port number to do what you want. But QGroundControl typically only opens one port and listens for connections only on that one port. How are you making it open multiple different ports? https://gitlab.com/voxl-public/voxl-sdk/services/voxl-mavlink-server/-/blob/master/src/gcs_io.c?ref_type=heads#L59
-
@Eric-Katzfey thanks for the quick reply. Since 14550 is hard-coded into voxl-mavlink-server service, that answers my question re: customizing this port.
For additional context, I'm interested in replicating QGC's behavior of connecting to multiple UAVs simultaneously, each identified by their MAV_SYS_ID. As an example:
- Set
MAV_SYS_ID
to "42" on one VOXL - Leave
MAV_SYS_ID
as "1" on another VOXL - Set
secondary_static_gcs_ip
to your GCS IP on both (/etc/modalai/voxl-mavlink-server.conf
) - QGC automatically connects to both and shows "Vehicle 42" and "Vehicle 1" in the dropdown in the top menu bar
I'm able to connect to my UAV using mavsdk at
udp://:14550
but I can't tell which one connects since both are sending telemetry to my Mac's 14550.Since posting this, I discovered https://github.com/mavlink-router/mavlink-router which may be what I'm looking for, but I'm still trying to get it working with my docker-compose setup. I was just wondering if there was a simpler configuration onboard the VOXL that I could easily change.
- Set