# Connection

## Connection to Onboard Computer

#### SSH over USB

With the USB cable connected and the host PC interface configured (see [Host PC Setup](#host-pc-setup)):

```bash
ssh dcs_user@192.168.55.1
```

On the first connection, SSH will ask you to verify and accept the host key fingerprint:

```
The authenticity of host '192.168.55.1 (192.168.55.1)' can't be established.
ED25519 key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
```

Type `yes` and press Enter to proceed. The key will be saved and you will not be prompted again on subsequent connections.

Enter the password `dronecore` when prompted.

#### HDMI + Keyboard *(optional)*

Connect a monitor and USB keyboard directly to DCS2 for local console access. Log in with the same credentials (`dcs_user` / `dronecore`).

#### Quick Connection Checklist

* [ ] USB cable connected (Micro USB or USB-C)
* [ ] Host PC USB Ethernet interface is up and in `192.168.55.x` subnet
* [ ] Board is powered and fully booted (\~60–90 seconds after power-on)
* [ ] SSH command: `ssh dcs_user@192.168.55.1`

***

## Connection to FMU

DCS2 includes **MAVLink Router**, which automatically routes MAVLink traffic from the FMU to the USB network interface. In newer distributions, MAVLink Router is pre-installed and running by default.

This means that a ground control station such as **QGroundControl (QGC)** running on the host PC will detect the FMU automatically over UDP without any additional configuration - regardless of whether the FMU is an onboard module or an external autopilot connected to DCS2.

| Parameter | Value          |
| --------- | -------------- |
| Protocol  | UDP            |
| Address   | `192.168.55.1` |
| Port      | `14550`        |

QGC listens on UDP port `14550` by default and will connect automatically once the USB link is established.

{% hint style="info" %}
If the FMU is not detected in QGC, verify that MAVLink Router is running on DCS2. For details see **\[MAVLink Router]\(\[TODO: link to mavlink-router section]).**
{% endhint %}

***

## Internet Connection

To complete your development setup, it is recommended to forward internet access from your host PC to DCS2. This allows you to install packages, pull repositories, and update the system directly from the board.

> \[TODO: verify and document the recommended method - likely IP forwarding + NAT via iptables on the host PC. Example commands below are indicative.]

On your **host PC**, enable IP forwarding and set up NAT:

```bash
# Enable IP forwarding
sudo sysctl -w net.ipv4.ip_forward=1

# Replace <host_interface> with your host PC's internet-facing interface (e.g. eth0, wlan0)
sudo iptables -t nat -A POSTROUTING -o <host_interface> -j MASQUERADE
sudo iptables -A FORWARD -i usb0 -o <host_interface> -j ACCEPT
sudo iptables -A FORWARD -i <host_interface> -o usb0 -m state --state RELATED,ESTABLISHED -j ACCEPT
```

On **DCS2**, set the default gateway and DNS:

```bash
sudo ip route add default via 192.168.55.100
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf
```

Verify connectivity from DCS2:

```bash
ping -c 4 google.com
```

> \[TODO: check if there is a helper script in `~/airvolute/` that automates this]


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.airvolute.com/hidden-wip/dcs2-getting-started/connection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
