Serial Port Configuration

APX4 provides predefined functions for many flight controller serial ports, allowing for simple plug-and-play operation. For example, you can connect a GPS module to the GPS1 port or a telemetry module to TELEM1, and they will generally work without additional setup.

However, these port functions are fully configurable through parameters.

The configuration makes it easy to (for example):

  • Assign any unused port to a specific function

  • Reassign ports to accommodate different hardware

With this flexible configuration, you can:

  • Run MAVLink on a different port, modify the streamed messages, or configure a TELEM port to use ROS 2/XRCE-DDS

  • Adjust the baud rate of any port or configure the UDP port settings

  • Set up dual GPS modules for redundancy or improved accuracy

  • Enable additional sensors that communicate via serial ports

This versatility allows you to customize the flight controller's communication setup to meet the needs of your specific application.

  • Some ports can't be reconfigured because they are used for a critical purpose such as the system's serial console. These are:

    • DEBUG_PORT (internal for debugging)

    • RC_SERIAL_PORT (internal for IO)

  • The mapping of specific devices to port names on the flight controller is explained in the Serial Port Mapping section of the Skynode datasheet

Port Configuration Parameters

The serial port configuration parameters allow you to assign a specific function or support for particular hardware to a specific port. Depending on which device you connect (not only depending on the device type/category), you will need to change a different set of parameters. These parameters follow the naming pattern *_CONFIG or *_CFG.Examples include:

Some functions/features may define additional configuration parameters, which will follow a similar naming pattern to the port configuration prefix. For example, MAV_0_CONFIG enables MAVLink on a particular port, but you may also need to set MAV_0_FLOW_CTRL, MAV_0_FORWARD, MAV_0_MODE and so on.

Auterion Mission Control only displays the parameters for services/drivers that are present in the firmware.

How to Configure a Port

To configure a port follow the steps below:

  1. Set the configuration parameter for the service/peripheral to the port it will use

  2. Reboot the vehicle to make the additional configuration parameters visible

  3. Set the baud rate parameter for the selected port to the desired value (e.g. SER_GPS1_BAUD)

  4. Configure module-specific parameters (i.e., MAVLink streams and data rate configuration)

If you want to forward sensor data from the FMU to the Mission Computer, you can set up MAVLink message forwarding.

Set the following parameters as described:

If you want to use TELEM2 for forwarding, set MAV_S_FORWARD to Enabled.

Reboot Skynode and run the following command in the MAVLink console to check if the forwarding works: mavlink status. The output of this command shows the MAVLink instances that are enabled on this system.

If your setup was successful, you'll see at least the two following MAVLink instances:

  • /dev/ttyS4: connection between the FMU and Mission Computer (enabled by default and cannot be modified)

  • /dev/ttyS6: connection going to the TELEM1 port on the FMU

Last updated