# 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.

{% hint style="info" %}

* 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](https://3329189600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFW1Ge1p1f6WHyiYCb146%2Fuploads%2Fg5ziQAabZrGnMfLuX7OC%2FSkynode%20X%20Datasheet.pdf?alt=media\&token=4c36ecb2-4299-4551-afa5-2a1d8c83841a)
  {% endhint %}

## Port Configuration Parameters[​](https://docs.px4.io/main/en/peripherals/serial_configuration.html#configuration-parameters) <a href="#configuration-parameters" id="configuration-parameters"></a>

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:

* Generic GPS Module:
  * [GPS\_1\_CONFIG](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#GPS_1_CONFIG)
  * [GPS\_2\_CONFIG](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#GPS_2_CONFIG) (for most GPS/GNSS systems)
* Septentrio GNSS Module
  * [SEP\_PORT1\_CFG](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#SEP_PORT1_CFG)
  * [SEP\_PORT2\_CFG](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#SEP_PORT2_CFG)
* MAVLink Peripheral Ports:
  * [MAV\_0\_CONFIG](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#MAV_0_CONFIG)
  * [MAV\_1\_CONFIG](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#MAV_1_CONFIG)
  * [MAV\_2\_CONFIG](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#MAV_2_CONFIG)
* RC Port:
  * [RC\_PORT\_CONFIG](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#RC_PORT_CONFIG)
* FrSky Telemetry:
  * [TEL\_FRSKY\_CONFIG](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#TEL_FRSKY_CONFIG)
* Optical flow and distance sensors:
  * [SENS\_CM8JL65\_CFG](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#SENS_CM8JL65_CFG)
  * [SENS\_LEDDAR1\_CFG](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#SENS_LEDDAR1_CFG)
  * [SENS\_SF0X\_CFG](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#SENS_SF0X_CFG)
  * [SENS\_TFLOW\_CFG](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#SENS_TFLOW_CFG)
  * [SENS\_TFMINI\_CFG](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#SENS_TFMINI_CFG)
  * [SENS\_ULAND\_CFG](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#SENS_ULAND_CFG)
  * [SENS\_VN\_CFG](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#SENS_VN_CFG)

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.

{% hint style="info" %}
Auterion Mission Control only displays the parameters for services/drivers that are present in the firmware.
{% endhint %}

## How to Configure a Port[​](https://docs.px4.io/main/en/peripherals/serial_configuration.html#how-to-configure-a-port) <a href="#how-to-configure-a-port" id="how-to-configure-a-port"></a>

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](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#SER_GPS1_BAUD))
4. Configure module-specific parameters (i.e., MAVLink streams and data rate configuration)

## How to Set up MAVLink Message Forwarding

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:**

* [SER\_TEL1\_BAUD](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#SER_TEL1_BAUD): Baudrate for the `TELEM1` Serial Port
* [MAV\_0\_CONFIG](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#MAV_0_CONFIG): Set to `TELEM1` to enable MAVLink over it
* [MAV\_0\_MODE](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#MAV_0_MODE): Defaults to Normal, but you can also [change to lower bandwidth modes](https://docs.px4.io/main/en/peripherals/mavlink_peripherals.html#mavlink-instances)
* [MAV\_0\_FORWARD](https://docs.px4.io/main/en/advanced_config/parameter_reference.html#MAV_0_FORWARD): Set to 1 (Enabled) to make sure the MAVLink traffic on this port is forwarded to other MAVLink instances (for example the Mission Computer UART)

{% hint style="info" %}
If you want to use TELEM2 for forwarding, set `MAV_S_FORWARD` to Enabled.
{% endhint %}

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.auterion.com/hardware-integration/airframe-integration/serial-port-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
