# MAVlink

## Introduction

MAVLink is a very lightweight messaging protocol for communicating with drones, as well as between onboard drone components. It is a very commonly used protocol in the open source drone community.

## 65R OEM

65R supports image metadata tagging and sensor triggering using MAVLink V1 messages. The required serial port configuration for the MAVLink controller is 460800, 8-N-1, and it must be connected to 6X connector J2, pins 1/2 (UART2 TX/RX) with 3.3v signal levels.

{% content-ref url="mavlink/mavlink-v1" %}
[mavlink-v1](https://support.senterasensors.com/65r-sensor-user-guide/integration-information/communication-protocol/mavlink/mavlink-v1)
{% endcontent-ref %}

## 65R Gimbal

The gimbaled 65R supports image metadata tagging and sensor triggering using MAVlink V2 messages. The MAVlink messages are ingested into the gimbal hardware and automatically forwarded to the 65R.

{% content-ref url="mavlink/mavlink-v2" %}
[mavlink-v2](https://support.senterasensors.com/65r-sensor-user-guide/integration-information/communication-protocol/mavlink/mavlink-v2)
{% endcontent-ref %}

***

## Integrated Platforms

Please see the compatibility settings if you are using a fully integrated platform:

{% content-ref url="../../65r-sensor/installation/freefly/freefly-compatibility-settings" %}
[freefly-compatibility-settings](https://support.senterasensors.com/65r-sensor-user-guide/65r-sensor/installation/freefly/freefly-compatibility-settings)
{% endcontent-ref %}

{% content-ref url="../../65r-sensor/installation/inspired-flight/inspired-flight-compatibility-settings" %}
[inspired-flight-compatibility-settings](https://support.senterasensors.com/65r-sensor-user-guide/65r-sensor/installation/inspired-flight/inspired-flight-compatibility-settings)
{% endcontent-ref %}

***

## Generic Settings

These are generic MAVlink settings for use with the 65R sensor.

{% hint style="info" %}
For non-gimballed sensors use the listed baud rates. For gimballed sensors a baud rate of 115200 or greater is recommended.&#x20;
{% endhint %}

### PX4 Settings

<table><thead><tr><th width="280">Parameter</th><th>Value</th><th></th></tr></thead><tbody><tr><td>TRIG_INTERFACE</td><td>MAVlink</td><td>Sets MAVlink messages as the trigger commands.</td></tr><tr><td>TRIG_MODE</td><td>Distance Based (Survey Mode)</td><td>Distance-based on command (Survey mode)</td></tr><tr><td>MAV_X_CONFIG</td><td>TELEM2 (or any other configurable UART)</td><td>Sets the configuration of the desired MAVlink stream on a serial/UART port.</td></tr><tr><td>MAV_X_RATE</td><td>0 b/s</td><td>PX4 Default (half of theoretical max).</td></tr><tr><td>MAV_X_MODE</td><td>Gimbal or Normal</td><td>Sets the MAVlink message set.</td></tr><tr><td>MAV_X_FORWARD</td><td>Enable</td><td>Enables forwarding of MAVlink messages on the configured MAVlink stream.</td></tr><tr><td>SER_X_BAUD</td><td>460800 8N1</td><td>Baudrate for the configured serial port.</td></tr></tbody></table>

### Ardupilot Settings

<table><thead><tr><th width="279">Parameter</th><th>Value</th><th>Description</th></tr></thead><tbody><tr><td>SERIALX_BAUD</td><td>460800</td><td>Baudrate for configured serial port.</td></tr><tr><td>SERIALX_PROTOCOL</td><td>MAVlink 1 (OEM) <br>MAVlink 2 (Gimballed)</td><td>MAVlink protocol for configured serial port.</td></tr><tr><td>SRX_EXTRA1</td><td>10</td><td>Rate for attitude messages (10Hz).</td></tr><tr><td>SRX_EXTRA3</td><td>2</td><td>Rate for UTC time messages (2Hz).</td></tr><tr><td>SRX_POSITION</td><td>4</td><td>Rate for GPS position messages (4Hz).</td></tr><tr><td>SRX_EXT_STAT</td><td>10</td><td>MAVLink Stream rate of SYS_STATUS, POWER_STATUS, MCU_STATUS, MEMINFO, CURRENT_WAYPOINT, GPS_RAW_INT, GPS_RTK (if available), GPS2_RAW_INT (if available), GPS2_RTK (if available), NAV_CONTROLLER_OUTPUT, FENCE_STATUS, and GLOBAL_TARGET_POS_INT</td></tr><tr><td>CAMX_TYPE</td><td>5</td><td>How to trigger the camera to take a picture</td></tr></tbody></table>
