> **Sokil documentation pack**
> Language: English
> Station software: 20261126_usb_cameras
> UI build: c6b2dc620
> Generated: 2026-11-26
> Generated by the Sokil ground station UI from the documentation it ships. Download it again after every software update - the pack describes the version it was generated from.

<a id="gs-rpi5"></a>

# Ground station on Raspberry Pi 5

**Summary:** One of the two boards Sokil GS 5.8 is built on - WiFi cards in the blue sockets, the handset adapter on USB, and what setup writes for a ground station.

**Audience:** field integrators

Open in the UI: http://10.1.1.30/help/guides/gs-rpi5

The Raspberry Pi 5 is one of the two boards Sokil GS 5.8 is built on - the Raspberry Pi 4 is the
other, and both are used equally. The station is the box that holds the 5.8 GHz radio, binds
the camera and serves its own pages at `http://10.1.1.30`. That address is where you **configure**
the station - setup, the radio, the camera bound to it. It is not where the pilot sits in a split
kit: the station streams the decoded video and telemetry on to its **Pilot IP** (parameter `vrx_target`)
(**VRX settings > Receive**), whose shipped `10.1.1.50` is the pilot's own laptop running Sokil, and the pilot flies there, at
`http://127.0.0.1/`. That is a secure origin, so the browser hands the web OSD its video decoder;
`http://10.1.1.30` is not one, and the video pane blocks there until a flag is set for that address,
once per browser. [Sokil on the pilot's laptop](pilot-laptop.md#pilot-laptop) is that seat's own page.

Almost everything on this board is USB - the WiFi cards, the handset adapter, the transmitter
modules - so wiring one is mostly a question of which socket a thing goes in, and the sockets are
not interchangeable.

<a id="gs-rpi5--what-you-need"></a>

### What you need

- The board, a microSD with the Sokil ground image, and 5V 5A from its own BEC.
- **One WiFi card for the link, in a blue USB 3.0 socket.** A second card is optional and buys you a
  spectrum sweep that never touches the link.
- **An ESP32 adapter on USB for each transmitter module** this station drives. The handset's own
  adapter plugs into the pilot's laptop, not into this box. See [Handset and CRSF](handset-crsf.md#handset-crsf).
- Ethernet to the pilot's laptop or the kit's router, if the kit has one.

<a id="gs-rpi5--which-station-this-is"></a>

### Which station this is

**This station is a WiFi radio head behind the pilot's laptop.** The handset's ESP32
adapter plugs into the laptop, which reads the sticks and sends them to this station as CRSF over
UDP on port 14540; the station drives the ELRS transmitter in its JR module bay, and the aircraft's
own ELRS receiver hands the sticks to the flight controller
([Handset and CRSF](handset-crsf.md#handset-crsf)). The station owns the radio link and binds the
camera. The pilot flies from that laptop, at `http://127.0.0.1/` - see
[Sokil on the pilot's laptop](pilot-laptop.md#pilot-laptop), and
[Laptop pilot station](gs-laptop.md#gs-laptop) for the box itself. While this station's
**Pilot IP** (parameter `vrx_target`) points at the laptop, **its own fly view is blank, with no error and no diagnostic
finding**: the browser only reads the streams off the station the page is open on, and this one is
delivering the picture to the laptop.

![The handset's adapter on the pilot's laptop, CRSF to the Pi 5 radio head on port 14540, the radio head's 5.8 GHz link and ELRS transmitter to the drone, and video and telemetry back to the laptop](../img/gs-rpi5.svg)

Diagram: The handset's adapter on the pilot's laptop, CRSF to the Pi 5 radio head on port 14540, the radio head's 5.8 GHz link and ELRS transmitter to the drone, and video and telemetry back to the laptop - img/gs-rpi5.svg (vector: img/gs-rpi5.svg)

The handset never plugs into this box - a Pi or Radxa station is never switched over to read it. A
tablet can still browse to `http://10.1.1.30` to configure the station; its video pane needs the
browser flag above, because that address is not a secure origin.

Setup does not ask which end you are on: it recognizes the **Board** (parameter `dev_board`), and a Pi 5
listens on port 14540 by default, so setup wires it as the **receiving** end of that relay - the
radio head, with nothing on the handset side to change by hand.

<a id="gs-rpi5--wiring"></a>

### Wiring

Kit picture: Ground station on Raspberry Pi 5. The parts list below carries the same wiring.

#### Ground station on Raspberry Pi 5

- Board: Raspberry Pi 5 (BCM2712 + RP1)

##### Parts

| Part | What it is | Attaches to | Link | Note |
| --- | --- | --- | --- | --- |
| USB WiFi card (wfb0) | WiFi card | on socket USB 3.0 upper |  | the station names a card by the socket it is in, not by the order it was plugged in. |
| ESP32 adapter 1 | Sokil ESP32 adapter | on socket USB 2.0 upper |  | comes up as /dev/ttyUSB0 - named by parameter rc_crsf_serial |
| ESP32 adapter 2 | Sokil ESP32 adapter | on socket USB 2.0 lower |  | comes up as /dev/ttyUSB1 - named by parameter rc2_crsf_serial |
| ELRS transmitter module 1 | Transmitter module | on ESP32 adapter 1 | CRSF TX/RX pair |  |
| ELRS transmitter module 2 | Transmitter module | on ESP32 adapter 2 | CRSF TX/RX pair |  |
| Pilot laptop station (optional - one of several fielded shapes) | Pilot laptop | on connector Ethernet |  | reads the handset and sends the sticks here as CRSF on port 14540. |

##### Power feeds

| Load | Voltage | BEC output (solder pads) | Note |
| --- | --- | --- | --- |
| Raspberry Pi 5 - Header 5V | 5V | Matek BEC12S Pro - 5V, nothing bridged (factory default) |  |
| USB WiFi card (wfb0) | ~14V | Matek BEC12S Pro - ~14V, 8V and 12V pads both bridged | sensitive - its own BEC |
| ELRS transmitter module 1 | 8V | Matek BEC12S Pro - 8V, 8V pads bridged | electrically noisy - its own BEC |
| ELRS transmitter module 2 | 8V | Matek BEC12S Pro - 8V, 8V pads bridged | electrically noisy - its own BEC |

##### Parameters the setup wizard writes for this kit

| Parameter | Value |
| --- | --- |
| rc_crsf_baud | 460800 |
| rc2_enabled | 1 |
| rc2_crsf_baud | 460800 |

*Figure: The whole station: the radio in the upper blue USB 3.0 socket, an ESP32 adapter in each black USB 2.0 socket with a transmitter module on it, and four BECs on the battery - the Pi, the card and one per module. The board, its sockets and its pins are the same drawing the Hardware page shows.*

The station names a WiFi card by **the socket it is in**, not by the order it was plugged in, so the
same card is `wfb0` here and `wfb1` there. On a Pi 5 the blue pair sits between the black USB 2.0
sockets and the Ethernet socket:

| Socket                              | Radio name                                            | What goes there                                       |
| ----------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
| Blue USB 3.0, further from Ethernet | wfb0                                                  | the primary radio - core's default **WiFi reception** card (parameter `vrx_wifi_wlan`) |
| Blue USB 3.0, beside Ethernet       | wfb1, or wfb0 for a card that comes up at USB 3 speed | the second radio                                      |
| Black USB 2.0, both                 | none                                                  | the ESP32 adapters, transmitter modules, a USB camera |

**A WiFi card in a black socket gets no name at all** and the station will not use it. Both blue
sockets were measured on a real Pi 5, so the picture is not guessing here.

**The card plugs straight into the blue socket - never through a USB hub.** USB hubs are to be
avoided, and a Pi 5 has four sockets, so nothing on a station needs one; the radio must not have one
in any case: a hub shares one upstream link between everything on it, so the card's frames queue
behind the adapters' and the picture stutters or the sticks lag; if the card is powered through the
hub, transmit bursts can make the hub's 5V supply sag and the card re-enumerate, often coming back
transmit-only; and a device behind a hub is not promised the same port on the next boot, so the
socket-to-name rule above stops holding. If a build of yours runs out of sockets, the hub goes on a
black socket and carries adapters only.

**Antennas before power.** A card with three IPEX outputs - the layout the legacy hardware reference
describes, and the one on the RF4W module - does not treat them alike: `TX` transmits at
full power, `RX` only receives, `T/R` does both at reduced transmit power. On a ground station the
antennas go on **RX and T/R**; `TX` stays terminated unless you fly the MAVLink backup control,
which transmits through it. An open transmit output burns the card - the station does transmit by
default - so never power it up without antennas or terminators fitted.
The current 5.8 GHz kits fit the **RTL8812EU 6 W** card (see [Supported hardware](supported-hardware.md#supported-hardware)),
and no source here records its outputs: read the labels printed on the module itself before you
fit antennas, give them the roles above if it carries `TX`, `RX` and `T/R`, and follow its own
labels if it does not.

**The lower blue socket is the one with two answers**, and the picture prints both. It is one USB
2.0 root port and one USB 3.0 root port, and the naming rules read the port a card actually turns
up on: the bench 8812AU module, enumerating at USB 2.0 speed, is wfb1 there, while an 8812EU that comes up at USB 3
speed is wfb0. That is what the rules say, not a display fault. Put the primary radio in the upper
blue socket, which is wfb0 whichever card it is, and the question never comes up.

With two cards, the **WiFi reception** card (parameter `vrx_wifi_wlan`) on **VRX settings > Connection** takes both names separated by `|`. The
[spectrum analyzer](http://10.1.1.30/gs/spectrum) then borrows the last one and sweeps continuously while the
primary keeps the video link; on a single-card station a sweep has to share the one radio, and the
link degrades or stops while it does.

The 3-pin JST-SH header beside the fan connector is the **system console** (`/dev/ttyAMA10`). It is
not a spare port.

<a id="gs-rpi5--the-header-uart-only-if-you-need-one"></a>

#### The header UART, only if you need one

Everything a ground station talks to is on USB, so most builds never touch the 40-pin header except
for power. If yours does - an ELRS receiver wired straight to the header instead of a USB adapter
(the CRSF (ELRS) **Serial port** (parameter `rc_crsf_serial`) on **Control > RC Wiring**), an SBUS output (the
SBUS Output **Serial port** (parameter `rc_sbus_serial`)), or a serial MAVLink forward to a telemetry radio (the
MAVLink forwarding **Serial port** (parameter `vrx_mavfwd_fwd_serial`) on **VRX settings > Receive**) - take one of the two UARTs setup itself plans on this board,
UART4 for CRSF and UART1 for MAVLink:

| UART  | Port           | TX     | RX     | GND          |
| ----- | -------------- | ------ | ------ | ------------ |
| UART4 | `/dev/ttyAMA4` | pin 32 | pin 33 | pin 30 or 34 |
| UART1 | `/dev/ttyAMA1` | pin 27 | pin 28 | pin 25 or 30 |

On a stock Pi 5 image the header UARTs are **off until you enable them**. A Pi 5 on the
Sokil ground image can list exactly `ttyAMA1`, `ttyAMA2`, `ttyAMA3`, `ttyAMA4` and the console
`ttyAMA10` - there is **no `ttyAMA0`**. UART0 on pins 8 and 10 exists only on an image whose
`sokil-uarts` block in `config.txt` carries `dtoverlay=uart0-pi5` and actually brings it up: the
installer script lists that overlay, the fielded box does not show the port, and the box is the
authority. So before wiring anything to pins 8 / 10, check the port list on the
[Hardware page](http://10.1.1.30/gs/hardware) (its **Serial ports** card (parameter `dev_tty_info`)) and use a UART that is in it. On an image the block
never touched, `dtparam=uart0=on` in `config.txt` is the manual way to bring up UART0 alone. Pin 1
is the square pad at the microSD end, on the row further from the board edge. Cross TX and RX, and
run the ground wire.

**A transmitter module above 500 mW gets a patch antenna, 20 cm or more from this box.** A module
of that power (ELRS 2 W, SineLink 2 W, Skyline and the like) on a dipole closer than 20 cm to the
WiFi card, its USB cable or the board knocks the card off USB, at random or for good, and can kill
it. Fit the module a patch antenna at least 20 cm from the Sokil hardware and not aimed at it - the
[antenna rule](antennas.md#antennas--rules-that-do-not-bend) and
[the symptoms](troubleshooting-radio.md#troubleshooting-radio--a-card-drops-off-usb-or-dies-beside-a-high-power-rc-transmitter).

<a id="gs-rpi5--power"></a>

### Power

5V **5A** into header pin 2 with ground on pin 6, from the station's own BEC - or USB-C from a PD
supply, which is the only kind that negotiates 5A. Fed through the header the Pi assumes a 3A supply
and caps its own USB sockets at 600 mA, so set `PSU_MAX_CURRENT=5000` in the EEPROM config (or
`usb_max_current_enable=1`) before you hang adapters off those ports. The WiFi card gets its own
feed from the battery and never the board's 5V pins: [Power and the BEC](power-bec.md#power-bec) has
the rule and the pad table.

A BEC has **one** output, so a station carries one per load: three on a typical build - the Pi, the
WiFi card and the transmitter module - and a noisy transmitter never shares a BEC with the WiFi
card. A station with two transmitter modules gives each one its own.

**Production stations, on a Pi 4 or a Pi 5, ship in Sokil's own enclosure, with a wiring harness
built for it.** No drawing of that harness is published, though, and the only build written down is
the **Pi 4** one -
XT60 in, Mini560PRO regulators, the WiFi card fed from the 5V rail with only its twisted data pair
going to the board, transmitter modules on their own 12V feed through a relay board. So a station you
build yourself follows those principles: XT60 in, a 5V regulator, the card on its own 5V feed, the
modules on 12V. Confirm your own build before you fly it.

<a id="gs-rpi5--what-setup-asks-and-writes"></a>

### What setup asks and writes

Run [Setup](http://10.1.1.30/gs/setup) on the station itself. On **Role** pick _Ground station_; on **Link** pick
_WiFi radio_, _Ethernet_ or _Starlink or another uplink_. The planned settings are written when you press Apply on Review. Activation, file imports,
binding and software updates take effect separately and can change the device before Apply.

For a ground station on the 5.8 GHz radio, setup's own writes are:

| Setting                                                                                                                                                               | Value                                 | Why                                                                                                                                                                                |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Link transport **Radio** in UFEC mode (parameter `vrx_ufec_wifi`) (VRX settings > Connection)                                                                                | UFEC                                  | receive video, telemetry and the tunnel on the radio                                                                                                                               |
| **MAVLink FEC** / **Second MAVLink FEC** (parameters `vrx_ufec3_fec`, `vrx_ufec4_fec`)                                                                                           | `4:2`                                 | parity on both MAVLink streams this station sends up - RC and telemetry                                                                                                            |
| MAVLink and Second MAVLink **Mode** (parameters `vrx_ufec3_mode`, `vrx_ufec4_mode`)                                                                                | `1` (low latency)                     | how those streams are sent                                                                                                                                                         |
| **Serve older WFB drones** (parameter `vrx_wfb_fallback`)                                                                                                                    | on                                    | drop to the legacy WFB link for an older drone that carries this station's key, and go back about a minute after it stops                                                          |
| **WiFi power** (parameter `vrx_wifi_power`) (VRX settings > Channels)                                                                                                        | `2`                                   | the station card's own transmit power - the telemetry and RC uplink - at level 2 of 0-5, written on every WiFi station                                                             |
| **VRX WiFi channels**, one per position (parameter `rc_act_vrx_channels`)                                                                                                    | `40\|52\|64\|100\|120\|140\|157\|177` | one receive channel per position of the **VRX WiFi channel switch** (parameter `rc_act_vrx_channel_sw`) (channel 10 by default). A 2.4 GHz card gets `1\|4\|6\|8\|10\|12\|13\|14` instead |
| **Repeater RC** on, its CRSF adapter row's **Output** _Serial (UART)_ with **Serial port** and **Baudrate** (parameters `rc2_enabled`, `rc2_crsf_serial`, `rc2_crsf_baud`)          | on, `/dev/ttyUSB1`, `460800`          | **Repeater RC**, the second handset's own input, on the second adapter                                                                                                             |
| Streamers Sokil Eye, Sokil Eye 2, Sokil Eye 3, CMD Streamer, CMD Streamer 2 (parameters `vtx_eye_enabled`, `vtx_eye2_enabled`, `vtx_eye3_enabled`, `vtx_cmd_enabled`, `vtx_cmd2_enabled`) | off                                   | this box has no camera of its own                                                                                                                                                  |
| **Main video** camera (parameter `vtx_presets_streamer`)                                                                                                                     | _(none)_                              | with no primary streamer the station stops announcing a camera, so a viewer sees nothing instead of an empty stream                                                                |

**Apply** returns the RC target - RC outputs **Send to** (parameter `rc_ip`) - to its default; pick your camera in the camera switcher afterwards.

The other two links write the same Repeater RC and streamer rows, and swap the
transport: Ethernet turns on **Over IP** (parameter `vrx_ufec_udp`) and **Ethernet reception** (parameter `eth_vrx`),
Starlink turns on ZeroTier (parameter `zt_enabled`), **Over IP** (parameter `vrx_ufec_udp`) and
**Receive over ZeroTier** (parameter `zt_vrx`). Both also **leave no WiFi reception card** (parameter `vrx_wifi_wlan`) - a tier that is not on the radio must not keep
a card, or core reads the box as a WiFi station anyway. Starlink keeps the MAVLink stream rows as they
are; Ethernet sends both streams in passthrough instead (MAVLink and Second MAVLink
**Mode** (parameters `vrx_ufec3_mode`, `vrx_ufec4_mode`) `4`, **MAVLink FEC** (parameters `vrx_ufec3_fec`, `vrx_ufec4_fec`) `4:1` kept).

⚠ **Repeater RC is written on every ground station, and it stays silent until a repeater is
connected.** A station with only one adapter has no `/dev/ttyUSB1` to open. This input reports nothing until a
repeater is on the air - the **Repeater RC** card then says _A repeater
is connected_ (parameter `rc2_in_use`) - so an unused input raises no finding, no overlay alert and no missing-port mark.
There is nothing to switch off on the Control step: the plan decides which devices get Repeater RC and
mounts the card without a switch, like every other card on that page. After setup, the **Repeater RC**
card on the Control settings page carries the switch.

Everything else comes from core's own defaults for this board, read off the device at the start of
the run: the **WiFi reception** card (parameter `vrx_wifi_wlan`) `wfb0`, **Ground station IP** (parameter `gs_ip`)
`10.1.1.30`, **Pilot IP** (parameter `vrx_target`) `10.1.1.50`, the MAVLink **Port** (parameter `vrx_mavlink_port`)
`14550` (expert-only), the CRSF (ELRS) row's **Output** _Serial (UART)_ on **Serial
port** (parameter `rc_crsf_serial`) `/dev/ttyUSB0` at
**Baudrate** (parameter `rc_crsf_baud`) `460800` (setup states that one too, since it differs on other kits) and
the Repeater RC adapter row's **Input** (parameter `rc2_crsf_in_addr`) _Receive RC over UDP_, which listens
on `0.0.0.0:14541` - a station board listens for both streams where the pilot's laptop sends both.
That mode is what the well-known address looks like on screen: there is no **Listen address (in)**
row to read unless the **Input** is _UDP manual_.

<a id="gs-rpi5--the-handset-side"></a>

### The handset side

The station never reads a bare CRSF wire. An **ESP32 adapter on USB** running Sokil's
crsf_inverted_reader firmware reads the inverted CRSF line out of an EdgeTX module bay or an ELRS
transmitter, and appears as `/dev/ttyUSB0`. **460800 is the USB speed between Sokil and the adapter**,
not the radio-side CRSF baud - the radio keeps its own.

The Control step names this board the radio head and asks which port each **transmitter module** is
on; a laptop is asked for its handset adapters instead. Both ends are `/dev/ttyUSB0` for the main RC
and `/dev/ttyUSB1` for Repeater RC, at 460800, and the port picker on the
[Hardware page](http://10.1.1.30/gs/hardware) prints which socket each one is actually in.

⚠ **Leave the CRSF listen address as it is** (parameter `rc_crsf_in_addr`). Core's default for this board
is the radio-head value, a **Listen address (in)** (parameter `rc_crsf_in_addr`) of `0.0.0.0:14540` (the
_Receive RC over UDP_ input), and setup writes neither that address nor the
**Serial port** (parameter `rc_crsf_serial`) on a ground-station plan. With a UDP input address set and a
serial port named, the station takes CRSF from the laptop and drives the module on that port - the
standard route. Setting **Input** to _Serial (UART)_ in the CRSF (ELRS) row of the RC input card on
[Control](http://10.1.1.30/gs/control-settings) empties the address and turns the station into a handset reader,
which a Pi 5 station never is; if the sticks stop reaching the aircraft, check that
row first. Check that the sticks move the aircraft before a first flight.

<a id="gs-rpi5--first-checks-after-apply"></a>

### First checks after Apply

1. On [Hardware](http://10.1.1.30/gs/hardware), each USB socket should show what you put in it, with the radio
   carrying the name you expect. A serial row that is on but hearing nothing goes amber.
2. On [WiFi](http://10.1.1.30/gs/wifi), the receiver should be on the card and channel you meant.
3. [Status](http://10.1.1.30/gs/status) draws one stream per data path - video, telemetry, RC - with a verdict on
   each. It is the page to leave open on a second tab.
4. [Diagnostics](http://10.1.1.30/gs/diagnostics) lists what the station itself found wrong.
5. Then bind the camera and work through [After Apply](after-setup.md#after-setup).

<a id="gs-rpi5--related-guides"></a>

### Related guides

- [Sokil on the pilot's laptop](pilot-laptop.md#pilot-laptop) - the seat you fly from, at
  `http://127.0.0.1/`.
- [Laptop pilot station](gs-laptop.md#gs-laptop) - the other end of the split, and the box that
  reads the handset.
- [Handset and CRSF](handset-crsf.md#handset-crsf) - the adapter, its firmware, and the transmitter
  modules.
- [Channels and switches](channels-switches.md#channels-switches) - the hop plans and the switch roster.
- [Binding](binding.md#binding) - pairing the camera this station will fly.
- [After Apply](after-setup.md#after-setup) - the checks to run before the first flight.
- [Choose a board](choose-board.md#choose-board) - this board against the other stations.
- [Power and the BEC](power-bec.md#power-bec) - one BEC per feed, and the jumper table.
