# HERELINK

<figure><img src="https://752643261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1Ot9F_Ob2Aboz1SKNK%2Fuploads%2FcrmGSuUWCgFZ8MkwZOOu%2FIMG_9318.jpg?alt=media&#x26;token=6da72189-3b50-4bf2-a20a-48b4979149e9" alt=""><figcaption></figcaption></figure>

## Hardware Setup

### Connect Pixhawk

#### Method 1: Connect to both XBLink and Herelink Air Unit.

In case the telemetry port of flight controller is unoccupied, we highly recommend to use this method to ensure stable and reliable telemetry signal.

<figure><img src="https://752643261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1Ot9F_Ob2Aboz1SKNK%2Fuploads%2FImboLFkNNgyJi9TaY5uV%2FHardware%20Setup.drawio%20(2).png?alt=media&#x26;token=7be4b78b-99bd-45fa-9bc9-fc6f00a808f1" alt=""><figcaption></figcaption></figure>

#### Method 2: Connect only to XBLink

XBLink will read telemetry data, then stream it through ethernet to Herelink Air Unit and 5G at the same time.

<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="" width="563"><figcaption></figcaption></figure>

***

### Connect Herelink Air Unit

#### Connect directly to ETH0 port's XBLink.

In case you are using USB port of XBLink for IP Cameras or USB Cameras, we recommend you connect Herelink Air Unit to XBLink ETH port as below.

<figure><img src="https://752643261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1Ot9F_Ob2Aboz1SKNK%2Fuploads%2FggZOhi1QrZo1EnrhW8Oi%2FConnect%20Herelink%20Air%20Unit.drawio.png?alt=media&#x26;token=52576c44-5bf9-4e60-95cd-9770c500cca8" 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%2F5TPbENPOAZpdjkgxpdWC%2FHardware%20Setup.drawio%20(11).png?alt=media&#x26;token=5574f7e4-4275-47e7-859b-cf819a7b881f" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Warning: GND signal of Herelink must be connect to XBLink to prevent data loss
{% endhint %}

{% hint style="info" %}
Note: ETH port is ETH0 of XBLink 5G R2
{% endhint %}

***

### Connect Cameras

We support a variety of cameras to stream video. Please connect it base on hardware setup as below links

1. [**Siyi Gimbal Cameras**](https://docs.xbstation.com/xblink-5g-r2/user-manual/advanced-configuration/cameras-and-gimbals/ip-cameras/siyi-camera-gimbal)
2. [**Other IP Cameras**](https://docs.xbstation.com/xblink-5g/user-manual/advanced-configuration/cameras-and-gimbals/ip-cameras/other-ip-cameras#hardware-setup)
3. [**XBCam V2**](https://docs.xbstation.com/xblink-5g-r2/user-manual/cameras-and-gimbals/usb-cameras/xbcam-v2#camera-setting-3)
4. **Herelink Air Unit HMDI** ([HERELINK - Compatible camera list](https://docs.cubepilot.org/user-guides/herelink/herelink-faq#herelink-compatible-camera-list))

<figure><img src="https://752643261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1Ot9F_Ob2Aboz1SKNK%2Fuploads%2FRhYZwmXy5JEOpQ6clmId%2FHardware%20Setup.drawio%20(10).png?alt=media&#x26;token=a7e54186-9c0d-40a6-bbc3-5350076ff376" alt=""><figcaption><p><strong>Herelink Air Unit HDMI</strong></p></figcaption></figure>

## Configuration

### XBStationPilotApp

Open XBStationPilotApp and configure as below:

#### In **RC Remote Controlle**r Section:

1. Interfaces: **eth0**
2. Remote Controller: **HERELINK**

#### In **Camera Settings** Section:

1. Internet connection: **TCP**
2. Video Port: **5601**
3. Video Source: Please select a kind of connecting Cameras

***

**Siyi Gimbal Cameras**

3. Video Source: **SIYI**
4. Ethernet: **eth1**
5. IP: **.25**
6. Tick **-> RTSP**
7. Encoder: **H265**
8. **TURN ON**

<figure><img src="https://752643261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1Ot9F_Ob2Aboz1SKNK%2Fuploads%2FQiqPJMieS5cPMlRtVaIp%2Fimage.png?alt=media&#x26;token=df7ecdeb-5e34-47d1-b666-5cc7569c084e" alt=""><figcaption><p>Example for method 1 &#x26; USB port -> IP Camera</p></figcaption></figure>

***

**Other IP Cameras**

**Method 1:** Connect to ETH0 port's XBLink

1. Internet connection: **TCP**
2. Video Port: **5601**
3. Video Source: **Other IP CAM**
4. Ethernet: **eth0**
5. Ip Address: **Please fill out your IP address Camera (find from your document of IP Camera)**
6. Pipeline: **Please fill out your Pipeline Camera (find from your document of IP Camera)**

{% hint style="info" %}
The address format should be rtsp\://*\<camera-ip-address>/\<video-format>*

Example with ZR10:

* Ip Address: 192.168.144.25
* Pipeline: rtsp\://192.168.144.25:8554/main.264
  {% endhint %}

7. Tick **-> RTSP**
8. Encoder: Select H264 or H265 option up to your Camera.
9. **TURN ON**.

<figure><img src="https://752643261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1Ot9F_Ob2Aboz1SKNK%2Fuploads%2Fl03Dp1TAX9S1BwMXoxaM%2Fimage.png?alt=media&#x26;token=6cbdc443-9775-4e53-8694-8c762610a761" alt=""><figcaption></figcaption></figure>

**Method 2**: Using USBtoETH Adapter

Just change Ethernet section to **eth1**

<figure><img src="https://752643261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1Ot9F_Ob2Aboz1SKNK%2Fuploads%2FDZs8JYDwQFgErA4NPGmF%2Fimage.png?alt=media&#x26;token=7b6a0ba4-8b02-4080-a697-1eb7978f0041" alt=""><figcaption></figcaption></figure>

***

**XBCam V2**

1. Video Source: **XBCam V2**
2. Tick **-> RTSP**
3. **TURN ON**

<figure><img src="https://752643261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1Ot9F_Ob2Aboz1SKNK%2Fuploads%2Ff9emHoP8OvmtSYjnE4nr%2Fimage.png?alt=media&#x26;token=8ba83524-dfc7-4dbc-8e62-9ed3b407291f" alt=""><figcaption><p>Example for method 1 &#x26; USB port -> USB port -> XBCAM V2</p></figcaption></figure>

***

**Herelink Air Unit HMDI**

1. Internet connection: **TCP**
2. Video Port: **5601**
3. Video Source: **HERELINK**
4. Ethernet: **eth0**

<figure><img src="https://752643261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1Ot9F_Ob2Aboz1SKNK%2Fuploads%2F6rJGG41gcxyqCQlEU8rZ%2Fimage.png?alt=media&#x26;token=7e8af2b4-7fe0-4686-8df8-bca7c9b5be1a" alt=""><figcaption></figcaption></figure>

***

### Ground Station

#### QGroundControl (PC)

After turning on Camera, open QGroundControl and configure as below.

{% hint style="info" %}
Please select Source: **UDP h.265 Video Stream** with only Siyi Camera

Source: **UDP h.264 Video Stream** with **USB, HDMI, CSI or almost IP cameras**

If you don’t know name port, you can try them one by one.
{% endhint %}

<div><figure><img src="https://752643261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1Ot9F_Ob2Aboz1SKNK%2Fuploads%2FYdgFGhhVPZYFIX2YaIJW%2Fimage.png?alt=media&#x26;token=17c7536e-8dcd-461e-b155-e88f8b5ffd75" alt=""><figcaption><p>Siyi Camera</p></figcaption></figure> <figure><img src="https://752643261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1Ot9F_Ob2Aboz1SKNK%2Fuploads%2FtPFjJYPjRBeuyFpFq4ph%2Fimage.png?alt=media&#x26;token=0d074bbc-a2ec-43d9-b17f-91a02a5b267c" alt=""><figcaption><p><strong>USB, HDMI, CSI or almost IP cameras</strong></p></figcaption></figure></div>

***

#### Mission Planner (PC)

1. At the Video HUD area, Right Click -> Video -> GStreamer Stop as below instruction

<figure><img src="https://752643261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1Ot9F_Ob2Aboz1SKNK%2Fuploads%2FQAmOfHvNmdWBlRtz8O0w%2Fimage.png?alt=media&#x26;token=bb4a609a-c0f3-44d2-8c77-3ffe47fbb173" alt="" width="528"><figcaption><p>GStreamer Stop</p></figcaption></figure>

2. At the Video HUD area, Right Click -> Video -> Set GStreamer source -> input GStreamer URL:

* **Siyi Camera:**

`udpsrc port=5601 caps = "application/x-rtp, media=video, clock-rate=90000, encoding-name=H265, payload=96" ! rtpjitterbuffer ! rtph265depay ! avdec_h265 ! videoconvert ! video/x-raw,format=BGRA ! appsink name=outsink`

```
udpsrc port=5601 caps = "application/x-rtp, media=video, clock-rate=90000, encoding-name=H265, payload=96" ! rtpjitterbuffer ! rtph265depay ! avdec_h265 ! videoconvert ! video/x-raw,format=BGRA ! appsink name=outsink
```

* **USB, Herelink Air Unit HMDI, CSI or almost IP cameras:**

**udpsrc port=5601 caps = "application/x-rtp, media=video, clock-rate=90000, encoding-name=H264, payload=96" ! rtpjitterbuffer ! rtph264depay ! avdec\_h264 ! videoconvert ! video/x-raw,format=BGRA ! appsink name=outsink**

```
udpsrc port=5601 caps = "application/x-rtp, media=video, clock-rate=90000, encoding-name=H264, payload=96" ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! videoconvert ! video/x-raw,format=BGRA ! appsink name=outsink
```

{% hint style="info" %}
**NOTE: udpsrc port=560x must be the same as PilotApp**

**NOTE:** The GStreamer URL just need to input at the first time, Mission Planner will auto save this params, the next run with Mission Planner, you just **Right Click -> Video -> Set GStreamer source -> and click OK to use video streaming**
{% endhint %}

![Mission Planner](https://i.imgur.com/kFRpzS9.png)

{% hint style="info" %}
**NOTE:** Download and install the plugin (domestic environment download is slow, if it fails, please restart the Mission Planner ground station and try again)
{% endhint %}

![Mission Planner](https://i.imgur.com/RurZ4jz.png)

After the installation is complete, restart the MissionPlanner ground station to display the following interface.

For more information see video as below

{% embed url="<https://youtu.be/lN5N9yZ6EAc>" %}

***

#### Herelink QGroundControl

* **XBCamV2, Siyi or IP cameras**

**Configure Telemetry**

1. Open QGroundControl -> Comm Links -> Add
2. Type: Click to **UDP**
3. In UDP Link Settings-> Listening Port: **19856**

**Configure Cameras**

1. Open QGroundControl -> General -> Video Settings -> configure as below.
2. Source: **RTSP Video Stream**
3. RTSP URL: **rtsp\://192.168.144.100:8554/xb**

<figure><img src="https://752643261-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M1Ot9F_Ob2Aboz1SKNK%2Fuploads%2FQj7sJx2aKN0tcAJT2phv%2Fimage.png?alt=media&#x26;token=b0b19018-830e-4564-9264-20c9ae5218de" alt="" width="563"><figcaption></figcaption></figure>

For more information see video as below

{% embed url="<https://youtu.be/vXvVmYJ7teM>" %}

***

* **Herelink Air Unit HDMI**

**Configure Telemetry**

1. Open QGroundControl -> Comm Links -> Add
2. Type: Click to **UDP**
3. In UDP Link Settings-> Listening Port: **19856**

**Configure Cameras**

**In case QGroundControl v4.2.6 64 (Default)**

1. Open QGroundControl -> General -> Video Settings -> configure as below.
2. Video Source: **RTSP Video Stream**
3. RTSP URL: **rtsp\://192.168.0.10:8554/H264Video**

{% embed url="<https://www.youtube.com/watch?v=cKZKY7QeDYM>" %}

**In case QGroundControl (Development herelink)**

1. Open QGroundControl -> General -> Video Settings -> configure as below.
2. Video Source: **Auto Connection Video Stream**

{% embed url="<https://www.youtube.com/watch?v=2_WL5Mi5eY4>" %}
