> For the complete documentation index, see [llms.txt](https://docs.theseus.us/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.theseus.us/cyclops/autopilot-integration/mavlink.md).

# MAVLink

[MAVLink](https://mavlink.io/en/) is a communication protocol supported on a variety of UAV systems. Cyclops uses MAVLink for two-way communication with the flight controller. We require a bi-directional link to the flight controller (to send position estimates and receive sensor measurements).

Below is a list of the messages we use. If your flight controller does *not* support these message types, or only allows for one-way communication over MAVLink, contact the Theseus team for help integrating on your system.

{% hint style="info" %}
By default, Cyclops sends position using the `MAV_CMD_EXTERNAL_POSITION_ESTIMATE` message.  To accept these estimates, ArduPilot needs to not use the GPS in its EKF sources.
{% endhint %}

## Messages Sent

We send a number of packets

* [STATUSTEXT (253)](https://mavlink.io/en/messages/common.html#STATUSTEXT)
* [MAV\_CMD\_USER\_2 (31011)](https://mavlink.io/en/messages/common.html#MAV_CMD_USER_2)
  * crosstrack start command
* [SYSTEM\_TIME (2)](https://mavlink.io/en/messages/common.html#SYSTEM_TIME)
* [TIMESYNC (111)](https://mavlink.io/en/messages/common.html#TIMESYNC)
* [MAV\_CMD\_EXTERNAL\_POSITION\_ESTIMATE (43003)](https://mavlink.io/en/messages/common.html#MAV_CMD_EXTERNAL_POSITION_ESTIMATE)

## Messages Received

* [LOCAL\_POSITION\_NED (32)](https://mavlink.io/en/messages/common.html#LOCAL_POSITION_NED)
* [ATTITUDE\_QUATERNION (31)](https://mavlink.io/en/messages/common.html#ATTITUDE_QUATERNION)
* [GPS\_RAW\_INT (24)](https://mavlink.io/en/messages/common.html#GPS_RAW_INT) (for testing purposes)
* [NAV\_CONTROLLER\_OUTPUT (62)](https://mavlink.io/en/messages/common.html#NAV_CONTROLLER_OUTPUT)
* [VFR\_HUD (74)](https://mavlink.io/en/messages/common.html#VFR_HUD)
* [SYSTEM\_TIME (2)](https://mavlink.io/en/messages/common.html#SYSTEM_TIME)
* [TIMESYNC (111)](https://mavlink.io/en/messages/common.html#TIMESYNC)
* [EXTENDED\_SYS\_STATE (245)](https://mavlink.io/en/messages/common.html#EXTENDED_SYS_STATE)

## System ID (sysid)

If you want to connect to multiple systems over MAVLink, you'll need to use different sysids for each flight controller. The default sysid is 1 so the Micro VPS automatically looks to connect with sysid 1. If the flight controller has a different sysid than the default, the Micro VPS will report no MAV heartbeat.

To configure your Micro VPS to connect with a flight controller with some other sysid, you'll need to edit the vehicle config. Take a look at [Vehicle Configuration](/gcs-software/legacy-software/theseus-gcs-app/feature-list/vehicle-configuration.md#changing-the-sysid) for more information.
