# Mavlink Through Serial

The easiest way of using the router with a flight controller that doesn't have ethernet is to use the routers spare serial port and a program called "ser2net". Applicable to firmware versions 23.\*

**FC Side**

Setup your serial port to Mavlink 2 and a baud rate of 115200.

**Router Side**

1\) Connect your router to a wider network so it has internet access to download packages.

{% embed url="<https://openwrt.org/docs/guide-user/network/wifi/connect_client_wifi>" %}

2\) Connect to your router over SSH using:

IP: 192.168.1.1

User: **root** *(or whatever you have changed it to)*

Password: *(Blank or whatever you have changed it to)*

3\) Update package list.

```
opkg update
```

4\) Install Nano for easier text editing.

```
opkg install nano
```

5\) Install ser2net.

```
opkg install ser2net
```

6\) You need to edit the ser2net config file to point at the right serial port, baud rate and destination port. This uses Nano installed earlier.

```
nano /etc/ser2net.conf
```

7\) Scroll to the bottom of the file and paste in (or Shift+Insert).

```
5760:raw:0:/dev/ttyS1:115200 8DATABITS NONE 1STOPBIT
```

Control + x will exit, press "y" to save.

8\) Either Restart the service using the snippet below, or reboot.

```
/etc/init.d/ser2net restart
```

9\) Using Mission Planner connect with TCP and use IP "192.168.1.1" and port 5760.

If you don't get any response you might have to give extra permissions to access the serial port.&#x20;

```
chmod 666 /dev/ttyS1
```


---

# 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://wiki.cbunmanned.com/wiki/products/openwrt-uav-router/mavlink-through-serial.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.
