Clarification to TCP and UDP ports in the ecosystem

This is a general question, that I am trying to understand a bit about the various port assignments in relation to PX4, MAVLINK, offboard APIs, and Simulators.
Does the PX4 ecosystem have a de facto port assignment rule?

For example,
generally, UDP port 14540 is used for offboard APIs and 14550 for GCS.

what are TCP/UDP ports 4560 and 5760 used for?
connecting to PX4 hardware? to SITL? to simulators such as JMAVSim?
In various posts and docs, the ports are used for different things.

Or there isn’t a specific rule of ports or is it based on user/vendor-specific assignments?

1 Like

Have a look at the overview: Simulation | PX4 User Guide

TCP 5760 might be the default SITL port that ArduPilot uses, but not PX4.

TCP 4560 is the mavlink connection between the simulator (Gazebo and Gazebo plugins) and PX4.

1 Like