# Telemetry

## Hardware Setup

You can use Telemetry 1 or 2 of Pixhawk for connection with XBLink via **COM1** (Default), **COM2** or **COM3** port.

<div><figure><img src="https://752643261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1Ot9F_Ob2Aboz1SKNK%2Fuploads%2FtJhJyP0JQUQQB5tcFvCn%2Fz6784082458391_bf9c25161ecf5b32002298e2753453d3.jpg?alt=media&#x26;token=2ae57716-46a7-47dc-a0e6-341d6c621ac3" alt="" width="563"><figcaption></figcaption></figure> <figure><img src="https://752643261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1Ot9F_Ob2Aboz1SKNK%2Fuploads%2F6oFlEu4VZ69JqgiKSsgA%2FHardware%20Setup.drawio%20(1).png?alt=media&#x26;token=da2e9c9b-9f51-4e0b-83f2-7db5b5dacde0" alt=""><figcaption></figcaption></figure></div>

More information for pinout of COM Port, please click to [**Pinout - Interface**](https://docs.xbstation.com/xblink-plus/user-manual/getting-started/interfaces#pinout)

## Software Setup <a href="#telemetry-setting" id="telemetry-setting"></a>

### XBStationPilotApp <a href="#telemetry-setting" id="telemetry-setting"></a>

#### 1. Telemetry Setting <a href="#telemetry-setting" id="telemetry-setting"></a>

<figure><img src="https://752643261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1Ot9F_Ob2Aboz1SKNK%2Fuploads%2Fnu7LnSk2UsmKkEDY4BBj%2Fimage.png?alt=media&#x26;token=08881428-627f-42e5-a843-8fbd1a8bc47a" alt=""><figcaption><p>Telemetry Setting</p></figcaption></figure>

**a. Telemetry Host port**

TCP telemetry server port, Ground Control Station can connect to this port via TCP to get telemetry data. Default is **5760 (or 5761, please see on XBStationPilotApp)**

**b. Telemetry stream protocol**

Telemetry data is relayed through internet in 2 connections method:

* UDP to archive minimize latency (possible packet loss, suitable for Joystick mode)
* TCP method to achieve high reliability (**default**)

#### 2. Serial Setting

<figure><img src="https://752643261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1Ot9F_Ob2Aboz1SKNK%2Fuploads%2FNw86FKemDKyZyFDdSABB%2Fimage.png?alt=media&#x26;token=a6813aa5-954c-4a59-80e2-b6ff330b7541" alt=""><figcaption><p>Serial Setting</p></figcaption></figure>

**a. Serial Port**

Port allows you to choose serial port on companion computer

The companion computer will show all available port (ttyS0, ttyUSB0, ttyUSB1…). You have to choose exactly serial port. If you don’t know name port, you can try them one by one.

{% hint style="info" %}
Choose option is ttyS0 if you connect to **COM1** ( ttyAMA4 -> **COM2** or ttyAMA5 -> **COM3**)
{% endhint %}

**b. Serial Baudrate**

Baudrate allows you to choose serial baudrate on companion computer

The baudrate on companion computer have to same the baudrate (telemetry 2) on Pixhawk

* With PX4: **SER\_TEL2\_BAUD** (Default 921600), you should change **57600** for stable and save data.
* With ArduPilot : **SERIAL2\_BAUD** (Default **57**, it means 57600),\
  **SERIAL2\_PROTOCOL**: **2** (MAVLink 2)

{% hint style="info" %}
**If you have problem with Telemetry 2 port, you can use Telemetry 1 Port**

**(Default baud rate Telemetry 1 is 57600 and SERIAL1\_PROTOCOL = 2)**
{% endhint %}

### GroundStation <a href="#telemetry-setting" id="telemetry-setting"></a>

#### Mission Planner

1. Open Mission Planner, at the top-right, choose **TCP** type and **Connect.**

<figure><img src="https://752643261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1Ot9F_Ob2Aboz1SKNK%2Fuploads%2FSBuZDNTezd6BxIWpgCui%2Fimage.png?alt=media&#x26;token=b96c2b5c-1bb0-450b-8f4e-8c8e6fed55bb" alt="" width="315"><figcaption></figcaption></figure>

2. Host name/ip: **127.0.0.1** (default)

<figure><img src="https://752643261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1Ot9F_Ob2Aboz1SKNK%2Fuploads%2F4sooeXos6k5IGuVkG7FR%2Fimage.png?alt=media&#x26;token=330d17d3-5b47-4d94-833d-61355467419b" alt="" width="248"><figcaption></figcaption></figure>

3. Remote port: **5760** (default) or 5761 (*remember it must be same Telemetry Host Port in PilotApp*)

<figure><img src="https://752643261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1Ot9F_Ob2Aboz1SKNK%2Fuploads%2FSGdi0AduQqCqyXJ3u4au%2Fimage.png?alt=media&#x26;token=c1453a8e-a9f7-4e34-a3d6-03eb193e8fb9" alt="" width="248"><figcaption></figcaption></figure>

![](https://752643261-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1Ot9F_Ob2Aboz1SKNK%2F-M_yz5MVA-a6zwERGJU-%2F-M_z01dNhT9PsqR5rfJ8%2Fimage.png?alt=media\&token=d53a6656-ce1b-420f-97b7-5462ce9dc53b)

{% embed url="<https://youtu.be/WxmOfRFRJh4>" %}
Mission Planner Setup
{% endembed %}

#### QGroundControl

1. Open QGroundControl -> Comm Links -> choose TCP type
2. Enter Host name/ip: **127.0.0.1** (default)
3. Remote port: **5760** or **5761** (*remember it must be same Telemetry Host Port in PilotApp*)

<figure><img src="https://752643261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1Ot9F_Ob2Aboz1SKNK%2Fuploads%2Fsxb53DWNfKrxGZN22dgd%2Fimage.png?alt=media&#x26;token=e29193af-b7db-4484-9a0b-a1b4400c5376" alt=""><figcaption></figcaption></figure>

<figure><img src="https://752643261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1Ot9F_Ob2Aboz1SKNK%2Fuploads%2FFQfstvypiqCGxVb99X66%2Fimage.png?alt=media&#x26;token=358b0f4f-d7fc-4b4b-abf9-f4a10508fb54" alt=""><figcaption><p>QGroundControl Setup</p></figcaption></figure>

{% embed url="<https://youtu.be/8mLK-jrc7eE>" %}
