Skip to content

직렬 포트 설정

PX4 defines default functions for many flight controller ports, which is why you can plug a GPS module into the port labelled GPS 1, an RC receiver into RC IN, or a telemetry module into TELEM 1, and generally they will just work.

The functions assigned to ports are fully configurable using appropriate parameters (in most cases). You can assign any unused port to any function, or reassign a port to use it for something else.

설정을 통하여 아래의 작업들이 용이해집니다.(예 😃

  • Run MAVLink on a different port, change the streamed messages, or switch a TELEM port to use ROS 2/XRCE-DDS.
  • Change the baud rate on a port or set the UDP port
  • Setup dual GPS.
  • Enable sensors that run on a serial port, such as some distance sensors.


  • Some ports cannot be configured because they are used for a very specific purpose such as the system console.
  • The mapping of specific devices to port names on the flight controller is explained in Serial Port Mapping.

Configuration Parameters

The serial port configuration parameters allow you to assign a particular function or support for particular hardware to a particular port. These parameters follow the naming pattern *_CONFIG or *_CFG

QGroundControl only displays the parameters for services/drivers that are present in firmware.

At time of writing the current set is:

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.

포트를 설정 방법

모든 직렬 드라이버와 포트는 동일한 방식으로 설정합니다.

  1. 서비스와 주변기기에 대한 매개변수를 사용할 포트로 설정하십시오.
  2. 추가 설정 매개변수를 표시하기 위하여 기체를 재부팅합니다.
  3. 선택한 포트의 전송속도 매개변수를 설정합니다.
  4. Configure module-specific parameters (i.e. 모듈별 매개변수를 설정합니다(예 : MAVLink 스트림 및 데이터 속도 설정).

The GPS/Compass > Secondary GPS section provides a practical example of how to configure a port in QGroundControl (it shows how to use GPS_2_CONFIG to run a secondary GPS on the TELEM 2 port).

Similarly PX4 Ethernet Setup > PX4 MAVLink Serial Port Configuration explains the setup for Ethernet serial ports, and MAVLink Peripherals (OSD/GCS/Companion Computers/etc.) explains the configuration for MAVLink serial ports.

Deconflicting Ports

Port conflicts are handled by system startup, which ensures that at most one service is run on a specific port. For example, it is not possible to start a MAVLink instance on a specific serial device, and then launch a driver that uses the same serial device.


이 글을 쓰는 시점에는 충돌하는 포트에 관련된 사용자 피드백은 없습니다.

Default Serial Port Configuration


These port mappings can be disabled by setting the associated configuration parameter to Disabled.

The following ports are commonly mapped to specific functions on all boards:

Other ports generally have no assigned functions by default (are disabled).

문제 해결

Configuration Parameter Missing from QGroundControl

QGroundControl only displays the parameters for services/drivers that are present in firmware. 펌웨어에 누락된 매개변수를 추가할 수 있습니다.

PX4 firmware includes most drivers by default on Pixhawk-series boards. 플래시 제한 보드는 드라이버를 주석 처리하거나 생략할 수 있습니다(작성 시점에는 FMUv2 기반 보드에만 영향을 미침).

You can include the missing driver in firmware by enabling the driver in the default.px4board config file that corresponds to the board you want to build for. For example, to enable the SRF02 driver, you would a the following line to the px4board.


An easier method would be using boardconfig which launches a GUI where you can easily search, disable and enable modules. To launch boardconfig type:

make <vendor>_<board>_<label> boardconfig

You will then need to build the firmware for your platform, as described in Building PX4 Software.

추가 정보