> **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="remote-access-debugging"></a>

# Remote access and debugging

**Summary:** What to open before a shell, how to let a support engineer into the station, how to reach a station, a camera or a Windows station over SSH, where the logs and the configuration live on each box, the commands that answer the usual questions, and the traps to know before typing on a device.

**Audience:** field integrators

Open in the UI: http://10.1.1.30/help/guides/remote-access-debugging

The UI shows most of what a box knows about itself, and the support bundle collects the rest in one
file. Open a shell when a question outlives both - and know, before you do, that everything below
assumes a **closed field network**. Sokil's `/api` surface has no password login:
anyone who can reach it can use the enabled endpoints, the admin and expert passwords in the browser are a switch in that
browser rather than a login, and the shells below are root. Never put a station on an untrusted
network or on the internet; reach it over ZeroTier or an SSH tunnel instead.

<a id="remote-access-debugging--start-in-the-ui"></a>

### Start in the UI

These pages belong to the selected device: `/gs/...` for the station, `/cam/...` for the camera
bound to it. **Logs, Files and Terminal require admin mode. Link trace is available to every
role**, beside Map in the sidebar - its **Record trace** switch included - but its **Period** and
**Buffer** rows are admin-only, since they size the station's memory.

| Page                          | What it gives you                                                                                                                                                                                                                                                             |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Logs](http://10.1.1.30/gs/logs)              | The live output of Sokil and of every process it starts - the encoder, the radio link, the tunnel - one ring each, kept in RAM. **Restart** a process to capture its start from the first line; **Config** prints the file that process was started with. The **Capture logs** switch in its header (parameter `logs_enabled`) turns the rings off to free memory. |
| [Link trace](http://10.1.1.30/gs/trace)       | The Starlink terminal, ZeroTier, the streams, Ethernet and the diagnostics verdict on one time axis. **File** opens the same trace out of a support bundle, in the browser, from any station. A fly-view recording of a ZeroTier or Ethernet aircraft also carries the aircraft's own trace (`.atrace`), outages included, shown beside the station's. |
| [Files](http://10.1.1.30/gs/files)            | Browse, view, edit, upload and download files on the device. Files over 1 MB are download only. **Terminal here** opens a shell in that folder. A ground station can have this page switched off, and a pilot's laptop ships that way. Works for a device behind another station too, up to 32 MB a file, by that device's own switch. |
| [Terminal](http://10.1.1.30/gs/terminal)      | A real login shell on the device, in the browser, with no SSH client - root's shell on a fresh terminal. A few sessions per device; a session nobody is watching is closed after a few minutes. Builds before July 2026 have no terminal. A ground station can have this page switched off, and a pilot's laptop ships that way. Works for a device behind another station too, by that device's own switch. |

**On a pilot's laptop the Terminal and Files pages ship switched off.** Both hand whoever can reach
the station over the network the whole computer it runs on, and a laptop joins networks that are not
the kit's, so an x86 station refuses them - to everybody, over the interface and over `curl` alike -
until somebody switches them on. The rows are **Terminal** (parameter `term_enabled`) and
**Files** (parameter `files_enabled`) on Control > **Network** > **Device discovery**, and the **Remote
support** dialog carries the same two under **What support may do**. On a laptop they can be changed
only on the laptop itself, in the interface opened at `http://127.0.0.1/`, and they switch off again
by themselves when Sokil restarts: switch one on for a support call and off again after it. Every
other ground station ships with both on and behaves exactly as before; a camera has no such switch,
so its Terminal and Files are always available. A page that has been refused says so on the page
itself and links to the switch.

On Link trace, **Record trace** (parameter `trace_enabled`) is off by default; changing it persists across restarts.
**Period** (parameter `trace_interval`) sets the sample interval, one second by default. Each later support bundle includes the trace still held in
the ring. **How far back it reaches depends on the ring size, sample interval and recorded state**;
it is not a fixed half hour. **Buffer** (parameter `trace_ring_kb`) controls the size: the default is **4096 KB on a ground
station** and **512 KB on an IPC or Luckfox camera**.

Three pages answer most questions before any of those: [Diagnostics](http://10.1.1.30/gs/diagnostics)
lists every check the device runs on itself, [Status](http://10.1.1.30/gs/status) draws each data path with a health
word (`idle` and `nodata` are not alarms - the first is a configured path with nothing to carry, the
second a stat this firmware does not report), and the admin-only [Hardware](http://10.1.1.30/gs/hardware) page paints every serial port
with its health and its byte counters, which answers "is anything moving on that UART" with no shell.
[Devices](http://10.1.1.30/devices) is what is reachable now; [Device history](http://10.1.1.30/device-history) is every box this
station has ever seen or bound, with the difference between *bound here*, *bound* and *seen*.

**Collect the support bundle before anything else.** It is on Diagnostics (the chip beside the build
chip), under [Resources](http://10.1.1.30/help/resources), at the top of [Troubleshooting](troubleshooting.md#troubleshooting)
and at the bottom of the **Remote support** dialog: versions, every parameter with the keys removed, the
hidden leaves, findings and log rings from the station and the selected device. The journal, kernel log, shell network diagnostics and device history come from the station only. An unavailable device is recorded in the bundle rather than preventing collection. Send it with a screenshot of Diagnostics. Send that rather
than a screenshot of the parameters page, which redacts nothing.

**Every restart is a parameter write**, so the UI's Restart menu and a `curl` do the same thing.
Restart the narrowest thing that could hold the fault:

| Restart                 | In the UI                                              | Costs                                                       |
| ----------------------- | ------------------------------------------------------ | ----------------------------------------------------------- |
| video receiver          | **Restart a service** > **VRX** (parameter `vrx_restart`)     | video for a few seconds                                     |
| Sokil                   | **Restart a service** > **Sokil**                      | video, control and telemetry for seconds; unsaved edits     |
| WiFi drivers            | **Restart a service** > **WiFi** (parameter `wifi_restart`)   | the kernel module reloads                                   |
| sokilweb                | **Restart a service** > **Web**                        | the web UI                                                  |
| ZeroTier                | **Restart a service** > **ZeroTier** (parameter `zt_restart`) | everything reached through the overlay                      |
| reboot                  | **Reboot**                                             | about a minute; saved parameters survive                    |
| shut down               | **Shut down**                                          | the box goes off; station only                              |
| factory reset           | **Reset parameters** (parameter `reset_params`)               | see "Configuration on disk"                                 |

On a Mac station **Shut down** is not a parameter write: it switches the whole station off until
the Sokil Web UI app starts it, and only a browser on the Mac itself shows it
([Turning Sokil off and on](gs-mac.md#gs-mac--turning-sokil-off-and-on)).

Through core's API each row is one line posted to port 8333, the way "Straight to core" below
sends it:

```
vrx_restart=1       # video receiver
terminate=1         # Sokil
wifi_restart=1      # WiFi drivers
restart=sokilweb    # sokilweb
zt_restart=1        # ZeroTier
reboot=1            # reboot
shutdown=1          # shut down
reset_params=1      # factory reset
```

A reboot or a shutdown is refused for a short while after boot, so a box in a reboot loop
cannot be made worse from here.

<a id="remote-access-debugging--letting-support-in"></a>

### Letting support in

Before you open a shell on somebody else's behalf, you can let them open this interface themselves.
**Help > Resources**, section **Support**, card **Remote support** - or the **Remote support** chip
at the top of [Troubleshooting](troubleshooting.md#troubleshooting) - opens one dialog that puts this station on
a private ZeroTier network of its own and gives you the two values support needs. **The station
needs internet for this**: the overlay goes out over the internet, and nothing here works on a
closed field network.

1. Open **Remote support**. If the station has no network of its own yet, press **Create a network
   and join it**. The network is private - nobody is on it until you allow them, one device at a
   time. The other buttons the dialog may offer instead - **Join the network**, **Allow this
   station** - are the same step caught at a later stage; press whichever is on screen.
2. Wait for **Network ID** (16 digits, shown in groups of four) and **Station address** to appear.
3. Send both to support: press **Copy both as a message** and paste that into your messenger.
4. Support installs ZeroTier on their own computer and joins that network ID. Nothing of theirs
   reaches the station until you let them in.
5. Their device appears under **Support devices** a few seconds later, marked *Waiting for you to
   allow it*. Press **Allow**. The row turns to *Connected* with the device's address and its
   latency.
6. Support now opens `http://<station address>` in a browser - an address like `10.147.20.15` - and
   sees this station's interface, the same one you are reading. The cameras are normally on that
   same network, so those are reachable from there as well.
7. When the work is done, remove their device. Once support has shut ZeroTier down its row reads
   *Offline* and carries a **Remove** button. A row that still reads *Connected* - support left the
   network and kept ZeroTier running, which looks the same from here - has **End access** instead,
   which asks before it removes. **An allowed device stays allowed until you remove it**, and after
   a removal it has to be allowed again to come back.

You can close the dialog while support is joining and open it again later - the devices you allowed
are still listed, and so is any device still waiting. Nothing is watched while it is closed. Every
member of the network, support's and the fleet's, is on the
[Local ZeroTier](http://10.1.1.30/admin/zerotier) page, which the dialog links to; the
[station's own ZeroTier network](station-zerotier.md#station-zerotier) guide is that page in full.

The **Support bundle** button at the bottom of the dialog is the same download as everywhere else -
support usually asks for it on the same call, and it is there on every step, connected or not.

<a id="remote-access-debugging--what-support-can-and-cannot-do"></a>

#### What support can and cannot do

Once you allow their device, support opens **this station's interface, exactly as you see it**: every
page, every setting, the logs, the diagnostics and the support bundle, and the cameras on the same
network. They can change settings and restart services the way you can, and the admin and expert
modes are a switch in their browser, not a login - so let in only the people you would hand the
station to.

What stays with you:

- **Nothing reaches the station until you press Allow**, one device at a time, and an allowed
  device is out again the moment you remove it.
- **Terminal, Files and Unsigned updates** are the three switches under **What support may do** -
  the same ones as on the Device discovery card. On a pilot's laptop all three ship off, so an
  allowed support device sees the interface and nothing else until you grant one; switch on only
  what support asks for, and off again when they are done. Removing the last support device
  switches all three off again on a laptop, and so does a restart of Sokil. On a laptop they can
  only be changed on the laptop itself - open the dialog there, in the interface at
  `http://127.0.0.1/` - so support cannot grant them to themselves. Every other ground station ships
  with all three on, as before.
- Support sees what this station serves, not your screen or your other programs. With Terminal or
  Files switched on they reach whatever the station's own program can, as you would at its console;
  on a Windows laptop that includes the Windows drives Sokil's Linux side mounts, so leave those two
  off unless support needs them.

<a id="remote-access-debugging--getting-the-station-online-in-the-field"></a>

#### Getting the station online in the field

The overlay needs internet at the station end; without it the dialog stops at **ZeroTier cannot
reach the internet** and clears by itself once a route out exists. Any one of these works, and
nothing about the radio link changes:

- **A pilot's laptop (Windows or Mac)** uses whatever internet the computer has: connect the laptop
  to a phone hotspot, a tethered phone or any WiFi as you normally would.
- **A station on its own board**: plug its Ethernet port into a router with internet - a Starlink
  router counts - or join a WiFi network or a phone hotspot on the WiFi page with **Connect to
  network**, as in [Addresses](remote-access-debugging.md#remote-access-debugging--addresses) below. Joining takes a WiFi adapter that is not carrying the radio
  link.
- **Keep a phone hotspot awake** for the length of the call: a hotspot that goes to sleep drops the
  station off the network and support with it.

ZeroTier finds its way through most networks on its own, falling back to a relay where a firewall
blocks it, so a slow first connection is not a failure. This is the one time the station is on the
internet: take it off again when support is done, because everything on this page assumes a closed
field network.

<a id="remote-access-debugging--when-the-dialog-says-this-station-has-no-zerotier"></a>

#### When the dialog says This station has no ZeroTier

Every current Sokil station - an SD-card station, a Windows laptop and a Mac - includes ZeroTier.
**This station has no ZeroTier** appears only when the station's software is too old to report
ZeroTier at all, so support cannot reach it this way: download the support bundle in the same
dialog and send that instead, then update the station. A station whose ZeroTier is present but not
running says something else - **The station's ZeroTier controller does not answer** - and asks for
a ZeroTier restart (**Restart a service** > **ZeroTier**) and the dialog reopened.

<a id="remote-access-debugging--reaching-a-box"></a>

### Reaching a box

<a id="remote-access-debugging--addresses"></a>

#### Addresses

The fixed plan every guide uses: `10.1.1.30` is the station (and a repeater, and a Radxa used as a
camera), `10.1.1.40` the camera, `10.1.1.50` the pilot's own computer. Ask the box for the rest:
the WiFi page's heading lists every address the device holds right now whatever the
interface (parameter `wifi_ips`); on Control > **Network** > **Ethernet**, **IP address** (parameter `eth_ip`) is the
fixed wired one and **Address from DHCP** (parameter `eth_lease`) the one DHCP gave it; the **ZeroTier**
chip's **IP addresses** (parameter `zt_ips`) are the ZeroTier ones. Every Sokil device
also announces itself once a second on UDP port 8334 over every link it has, which is what
[Devices](http://10.1.1.30/devices) listens to.

- **With no wire and no network, the station's own hotspot is the way in.** A ground station brings
  up a WiFi hotspot on its first free client adapter, SSID `sokil-` followed by the first eight
  characters of its hardware ID, password `sokilsokil` (the WiFi page's **Enable access point** switch (parameter `wifi_ap_up`), on by
  default).
- **Onto an existing WiFi network with no shell:** on the WiFi page, fill in **Connect to network**
  and press **Connect** (parameter `wifi_connect`). Through core's API it is three writes - the client
  adapter, client WiFi on, then the network as `ssid:password`:

  ```
  # wlan1: the client adapter on your box
  printf 'wifi_con_wlan=wlan1\nwifi_con_up=1\n' | curl -s --data-binary @- http://10.1.1.30:8333/api/params
  printf 'wifi_connect=ssid:password\n' | curl -s --data-binary @- http://10.1.1.30:8333/api/params
  ```

  Ten seconds later the new address is in the WiFi page's heading (parameter `wifi_ips`).
- **The radio link has its own addresses, and they go quiet in flight.** Over the WFB radio the
  camera is `10.5.0.2` and a repeater `10.5.0.3`; only the station can reach them, so it forwards
  `http://10.1.1.30:8502` to the camera's own core and `http://10.1.1.30:8503` to the repeater's.
  Shortly after the aircraft arms (**Disable tunnel after arming** (parameter `vtx_tuna_armed_disable`)
  on the camera's VTX settings > **Connection** tab) the camera stops answering on
  that address by design, so an armed aircraft reads as a dead camera. Wait for disarm.
- Writing the wired address of a box can drop the SSH session that writes it. Reboot afterwards.
- Reflashing can change the SSH host key, so a host-key warning is possible. Released ground-station
  SD images keep their host keys; a reflash does not guarantee a new one.

<a id="remote-access-debugging--ssh-to-a-ground-station"></a>

#### SSH to a ground station

```
ssh root@10.1.1.30
```

Root, no password, port 22, hostname `sokil-gs` on every station. From the station's own shell `ssh cam` reaches the camera
on the wire and `ssh camw` over the radio.

A delivered station may have **no SSH server at all**: the x86 Ubuntu station is installed without
one, and some SBC images ship without it. That is not a fault; the shipped way in is the Terminal
page above. From there, `apt-get install openssh-server && systemctl enable --now ssh` adds it.

<a id="remote-access-debugging--ssh-to-a-camera"></a>

#### SSH to a camera

```
ssh root@10.1.1.40
```

- **Sigmastar IPC camera (SSC338Q: MC800S-V3, RunCam WiFiLink 2, EMAX Wyvern Link; SSC30KQ:
  MC-L12B, MINIIPC):** dropbear, root, no
  password. The image has no sftp server and no rsync, so a modern `scp` fails; use `scp -O`. The
  serial console is a root shell too, at 115200 8N1.
- **Luckfox Pico (RV1106):** OpenSSH, root, empty password; plain `scp` and `rsync` work. The
  stock Luckfox image also runs a telnet server on port 23 with the same empty root password, which
  Sokil does not switch off. There is no `curl` on a Luckfox: use `wget -qO- --post-data=...`. Free
  space is under 1 MB, so never copy a file over a live binary; remove it first.
- **Orange Pi, Radxa, Raspberry Pi as a camera:** the same image as a station, so the station rules
  apply.

<a id="remote-access-debugging--ssh-to-a-windows-station"></a>

#### SSH to a Windows station

```
ssh -p 2222 <account>@<station>
```

Log in with the station's SSH account (support provides the credentials), then `sudo -i`. Port 2222,
never 22: port 22 on a Windows station is Windows' own OpenSSH, which does not know that account and
rejects the password as if it were wrong. From the Windows side, `wsl -d Ubuntu -u root <command>` runs a
command inside the station. The station starts when Windows boots, before anyone signs in. If an
older installation starts only after sign-in, run the current Windows installer again.
Also, `http://localhost/` can stall on the station's own screen - Windows tries IPv6 first and the
station answers on IPv4 only - so use `http://127.0.0.1/`. A station installed from media older
than 2026-09-06 still has its SSH server on port 22; re-running the Windows installer moves it.
[Windows ground station](gs-windows.md#gs-windows--networking-and-remote-access) has the rest of the
networking, and how to switch the station off or uninstall it.

<a id="remote-access-debugging--services-and-logs"></a>

### Services and logs

**A ground station runs five systemd units**: `sokil` (the daemon, restarted right after any
exit), `sokilweb` (the UI and `/api` on port 80), two socat forwards for the tunnel addresses
above, and a one-shot that repairs the UI files after an update. The legacy `wifibroadcast` units
are disabled by the update; instructions that restart them are out of date. Everything else - the
encoder, the radio link processes, the tunnel, the key generator - is a child of `sokil`, not a
unit, which is why the Logs page and not `systemctl` is where their output is.

```
systemctl restart sokil          # the daemon
pgrep -ax sokil_web              # must print exactly ONE line
journalctl -u sokil -u sokilweb -n 80
corelogs ; weblogs               # the same two, as the image's root aliases
```

Never start a second sokil_web by hand, for any reason. Two of them share port 80 and the OSD's
UDP ports, each takes half the datagrams, and the picture goes black with nothing in any log.

**IPC and Luckfox camera images have no systemd.** `sokild` supervises the daemon in a loop; `sokild restart` is the one
restart there is. Neither of these camera images ships sokil_web, so port 80 refusing on a camera is normal:
core answers on port 8333 and the station reaches it through the proxy.

**Three log stores, none of them the same:**

1. **Core's rings** - the Logs page and the support bundle. Core's own ring is small and wraps in
   minutes; each child process has its own.
2. **The link trace** - enabled with **Record trace** (parameter `trace_enabled`), sized by **Buffer** (parameter `trace_ring_kb`) on the Link trace page (4096 KB on a ground
   station, 512 KB on an IPC or Luckfox camera by default), listed beside the processes on the Logs page.
   A station's fly-view recording keeps its own trace as `.trace` and, for an aircraft reached over
   ZeroTier or Ethernet, the aircraft's as `.atrace` - fetched after an outage from the aircraft's RAM.
   A station that gets its video from a WiFi radio head also keeps the radio head's as `.gtrace`.
3. **The system log** - `journalctl` on a station; a small RAM ring read with `logread` on an
   IPC camera; `/var/log/messages` in RAM on a Luckfox. None survives a reboot on a camera.

**Do not read core's history out of the journal.** Core's lines reach the journal late and with the
wrong timestamps. On a camera it is worse: core's output is not kept at all, so the Logs page is the
only core log a camera has. Neither holds history; for something intermittent, switch **Record trace** (parameter `trace_enabled`)
on and leave it, and every later bundle carries the last stretch of link state.

<a id="remote-access-debugging--configuration-on-disk"></a>

### Configuration on disk

- **Parameters** are one flat `name=value` file per box, read in order: `/etc/sokil/board.conf`
  (provisioned by hand), `/etc/sokil/camera.conf` (legacy, read but never written) and
  `/etc/sokil/user.conf`, with `/etc/sokil/user.bak` as the recovery copy. Comments start with
  `#`; a name core does not know is dropped without a word. Profiles are parameters inside that
  same file, not files of their own.
- **The OSD layout** is `/etc/sokil/osd.conf`, written by the web server on Save; a fresh station
  has none until then.
- **The radio keys and the activation key** are files of their own, beside these. Binaries are under
  `/opt/sokil/` on a station and `/usr/bin/` on a camera; recordings, the device history and the
  update's kept copy of the previous version are under `/var/lib/sokil/`.
- **An update keeps** `user.conf`, `user.bak`, `board.conf`, every key file, `osd.conf`, ZeroTier's
  identity, the recordings and the device history. **A factory reset** (**Reset parameters** (parameter `reset_params`)) wipes
  `user.conf`, `user.bak` and the camera's radio key, and not the station's radio keys or the
  activation key; the UI backs everything up first and a declined backup cancels the
  reset.

**Never paste these anywhere:** any key file, `user.conf` and `user.bak` (they carry keys),
ZeroTier's secret files, the saved WiFi profiles, the SSH host keys. Among parameters, never the
activation key, the radio link keys, the airframe
serial (parameters `act_key`, `vtx_key`, `vrx_key`, `vrx_key_rx`, `vrx_key_tx`, `dev_serial`) or any password. Addresses,
hostnames, SSIDs, the hardware ID, ZeroTier node and network IDs and serial paths are safe and are
what support needs. The support bundle leaves the secrets out, which is why sending it is the safe
habit.

<a id="remote-access-debugging--asking-the-box"></a>

### Asking the box

The calls below answer a support question. To build your own software on them - the JSON
answers in full, Python, MAVLink and the flight controller's parameters - see
[Sokil API for your own software](sokil-api.md#sokil-api).

<a id="remote-access-debugging--through-the-station-from-any-computer-on-the-network"></a>

#### Through the station, from any computer on the network

```
curl -s -X POST 'http://10.1.1.30/api/core/params/by-names?ip=10.1.1.40' \
  -H 'Content-Type: application/json' -d '{"names":["dev_board","diag_issues","version"]}'
```

`ip=127.0.0.1` asks the station itself, `ip=10.1.1.40` the camera through the station's proxy, so
the laptop needs no route to the camera. **Always keep the `?ip=`:** a bare `/api/core/params`
answers a 500 error within milliseconds on a perfectly healthy station, which reads exactly like a
wedged web server and is not one. A by-name read also answers for the hidden parameters the full
listing leaves out, and it is the only way to tell an unknown name from an empty value, since a
write of a name this firmware does not have answers success having done nothing.

Whether a stale UI is the browser's fault or the station's: time a plain request.
`curl -o /dev/null -w '%{time_starttransfer}\n' 'http://10.1.1.30/api/core/params?ip=127.0.0.1'`
answering fast means the browser has run out of connections (a second fly view in another tab);
five seconds or more means the station's web server is waiting on a device that does not answer.

<a id="remote-access-debugging--straight-to-core"></a>

#### Straight to core

Every box - station, camera, Luckfox - answers core's own API on port 8333, with no web server in
between. A bare name on a line reads it, `name=value` writes it, and a name ending in `*` reads the
whole family in one call, hidden parameters included:

```
printf 'vtx_wifi_wlan\nvrx_wifi_wlan\nvrx_bind_*\n' | curl -s --data-binary @- http://10.1.1.30:8333/api/params
```

<a id="remote-access-debugging--the-box-describing-its-own-hardware"></a>

#### The box describing its own hardware

All hidden, all readable by name or with **Show hidden** on the parameters page, and they replace
most shell commands. One read takes the lot:

```
curl -s -X POST 'http://10.1.1.30/api/core/params/by-names?ip=10.1.1.40' \
  -H 'Content-Type: application/json' \
  -d '{"names":["dev_board","dev_sensor","dev_usb","dev_tty_info","dev_tty_stats","dev_video_info","vtx_wifi_stats","vrx_wifi_stats","vtx_link_wedge","zt_status","zt_node_id","zt_ips","diag_issues","disco_known","act_hwid","version"]}'
```

- The board and its sensor (parameters `dev_board`, `dev_sensor`) - what the board is (`rpi5`, `radxa3e`,
  `ssc338q`, `rv1106`, `x64`) and its MIPI sensor, also on the Hardware page.
- The USB devices (parameter `dev_usb`) - every USB device with its port path, IDs and the class the kernel
  bound (`serial`, `wlan`, `video`, `hub`...): `lsusb` without a shell, and the Hardware page's
  **USB devices** card.
- The serial ports (parameters `dev_tty_info`, `dev_tty_stats`) - every serial port with what it is, and per
  port how many services hold it open, the bytes moved in each direction and the age of the last
  byte, as the Hardware page's **Serial ports** card shows them. Read this rather than opening a
  UART by hand, which takes the port away from the service that owns it.
- The video devices (parameter `dev_video_info`) - every video device with its stable path:
  `v4l2-ctl --list-devices` without a shell.
- The radio cards' health (parameters `vtx_wifi_stats`, `vrx_wifi_stats`) - per radio card the packet
  counters, whether it is alive, the cumulative recoveries (a rising count is a flaky or overheating
  card), the watchdog stage in progress, empty when healthy, and last the times the radio driver
  reset the card by itself (RTL8812EU cards only); the Status page's video lane shows
  the same. The link's own wedge state (parameter `vtx_link_wedge`) is the same story for the link as a
  whole.
- ZeroTier as core sees it (parameters `zt_status`, `zt_node_id`, `zt_ips`) - its state, the device ID and the
  addresses, as the **ZeroTier** chip shows them; `zerotier-cli info` on the box is the cross-check.
- The findings the Diagnostics page decodes (parameter `diag_issues`), and the devices
  heard (parameter `disco_known`) (the **Active vehicle** menu's list).
- The hardware ID (parameter `act_hwid`) - meant to go to the license issuer; its first eight characters
  are the hotspot's SSID suffix and the support bundle's name suffix. `version` - the build.

<a id="remote-access-debugging--the-daemon-s-own-flags"></a>

#### The daemon's own flags

`/opt/sokil/sokil -v` prints the version and `-s` the hardware ID (`/usr/bin/sokil` on a camera).
`-c` reads or writes the channel values the running daemon acts on, which drives every switch
action from a shell with no handset: `sokil -c 0` dumps all sixteen, `sokil -c 5=1234` sets channel
5. It does not count as live RC, so the RC input rate (parameter `rc_ch_rate`) stays at zero and the RC diagnostics still read
the radio as silent.

<a id="remote-access-debugging--shell-commands-that-answer-the-usual-questions"></a>

#### Shell commands that answer the usual questions

The support bundle already runs `date -u`, `uptime`, `df -h`, `free -m`, `systemctl status sokil
sokilweb`, `ps`, `ip addr`, `ip route`, `ip -s link` and `dmesg -T` on the station. Camera images may have different tools; IPC and Luckfox do not provide systemd commands. Beyond them:

```
cat /opt/sokil/version                       # station build (camera: /etc/sokil/version)
nmcli -t -f DEVICE,STATE device status       # a card carrying a radio link must read "unmanaged"
iw dev <iface> info ; iw phy0 info           # the channel a card is really on
ss -tnlp | grep 8333                         # who holds core's port when it refuses
ping -c3 -W2 10.5.0.3                        # from the station: the repeater's radio leg
cat /etc/sokil/user.conf                     # what is saved (keys inside - do not paste it)
/opt/sokil/sokil-eye --codecs                # the encoder's capabilities on this board
screen /dev/ttyUSB0 115200                   # a UART by hand, only with its service off
```

On a Sigmastar IPC camera: `logread` for the system ring, `ipcinfo -c` and `ipcinfo -s` for the chip
and the sensor, `differ /etc/majestic.yaml` for what the overlay changed. On a Windows station:
`wsl -d Ubuntu -u root journalctl -u sokil -e`, `wsl -d Ubuntu ip addr` to check mirrored
networking, `usbipd list` for the USB devices Windows has handed over, and
`wsl -d Ubuntu -u root sshd -T | grep -iE '^port|passwordauth'`, which must print 2222 and yes.

<a id="remote-access-debugging--traps"></a>

### Traps

- **Never write a resolution above 1920x1080 to a Luckfox.** One write of a bigger frame hangs the
  board until it is power-cycled, and the sensor truthfully advertising 2592x1944 does not make it
  safe. A unit somebody already set higher still shows the value so that you can lower it: do that
  first.
- **Never `reboot -f` a Sigmastar IPC camera** after changing anything: the flash can lose the write.
  `sync`, then a plain `reboot`.
- **Do not USB-reset a WiFi card by hand** while the device is working through its own recovery
  ladder, which Diagnostics shows step by step; a recovery that repeats is heat or power. A card
  that is parked or sweeping looks wedged to that watchdog, which is why the spectrum sweep masks
  itself out. The ladder itself is in [WiFi link recovery](wifi-recovery.md#wifi-recovery).
- **`wsl --shutdown` stops the whole Windows station**. Start it again with
  `Start-ScheduledTask -TaskName "Sokil WSL"` in an administrator PowerShell, or sign out and back
  in as the installing user. Shutdown is required after editing `.wslconfig`, so do it deliberately.
- **A write that "worked" proves nothing.** Core drops an unknown name silently; read it back.
- **Three settings on a pilot's laptop are writable only from the laptop.** **Terminal** (parameter `term_enabled`),
  **Files** (parameter `files_enabled`) and **Unsigned updates from other machines** (parameter `update_remote_unverified`)
  are refused on an x86 station when the request comes from anywhere but that machine - another
  station's interface, a fleet push or a `curl` from the next box - and the answer names the
  settings it refused. Open the interface on the
  laptop at `http://127.0.0.1/` and change them there. No other board enforces this.
- **A camera that once saw DHCP stays on DHCP** while its Ethernet **IP address** (parameter `eth_ip`)
  is empty; only setting one ends it. A camera whose bootloader carries a `wlandev` setting takes its address from the boot
  environment and ignores the interface file, and that survives a reflash.
- **A firmware upgrade keeps the camera's overlay**, so an old `majestic.yaml` or `wfb.yaml` can
  shadow a fresh Sokil image. A bare `sysupgrade` on a Sokil camera is deliberately made to abort.
  For a supported IPC, use **Update firmware** > **Reflash firmware image** in the interface; it validates the image and
  clears the legacy overlay files that would shadow it.
  Disarm first; no power-cycle is needed. Nothing but you stops a reflash of an armed aircraft: the
  interface shows the armed state where the camera reports it, and otherwise asks you to make sure
  it is disarmed.
  Keep the camera and the aircraft powered until the update finishes. If power is lost while the image
  is being written, the camera will not start again and can only be recovered over UART.
  After the reboot the station confirms the camera runs the new image; ZeroTier may be off.
  A reflash changes the firmware image only; when it finishes the dialog offers to update the camera
  software as well.
  See [image maintenance](troubleshooting-updates.md#troubleshooting-updates--the-device-needs-a-new-firmware-image).
- **Two fly views on one station** freeze every page on firmware older than September 2026: the
  legacy fly view holds most of the connections a browser allows to one station. One tab.
- **The fleet path is pull-only.** A device only ever dials out to a fleet server; nothing listens,
  and restart, terminate and reset are refused on that path. A fleet server configures a box; it
  never reaches into one.

<a id="remote-access-debugging--the-camera-side"></a>

### The camera side

**The shipped streamer is Sokil Eye, not majestic.** Every wizard plan switches
**Majestic video** (parameter `vtx_majestic_enabled`) off, and on an IPC board the **Main video**
slot (parameter `vtx_presets_streamer`) holds Sokil Eye by default. Majestic is
still supported and steps aside while the eye is on, so a hand-built or an old box may genuinely be
on it. Check which one the slot holds on VTX settings > **Streamers** > **Streams** -
**Sokil Eye** (parameter `vtx_eye_enabled`) or **Majestic video** (parameter `vtx_majestic_enabled`) - before you
debug the wrong encoder.

| Board                          | Encoder                                        | Its config                                   |
| ------------------------------ | ---------------------------------------------- | -------------------------------------------- |
| IPC (SSC338Q / SSC30KQ), shipped | `/usr/bin/sokil-eye`                         | `/tmp/sokil-eye-<N>.conf`, written by core   |
| IPC, alternative               | `/usr/bin/majestic`                            | `/etc/majestic.yaml`, written by core        |
| Luckfox (RV1106)               | `sokil-eye` only                               | the same `/tmp` file                         |
| RPi, Orange Pi, Radxa as a camera | `/opt/sokil/sokil-eye`, or the CMD Streamer's command (parameter `vtx_cmd_cmd`) | the eye config, or the command string |
| Ground station                 | none: the browser or the desktop OSD decodes   |                                              |

No encoder is a service; core starts it and writes its file, so the Logs page has a ring, a Restart
and a Config tab for it. Nothing in a Sokil camera's init starts majestic, whatever older
installation notes say. `GET /api/core/eye-caps?ip=10.1.1.40&refresh=1` through the station returns
every camera the box has with its mode table and the codecs it can use; a 503 means a probe is in
progress and a 404 that there is no encoder, both normal. On a Luckfox that list truthfully includes
the modes the board must never be given.

A camera belongs to the station named in its **Ground station IP** (parameter `gs_ip`): it obeys switching verdicts from that address
and no other, and the station's [Device history](http://10.1.1.30/device-history) shows the same fact as *bound*
versus *seen*. Everything a bound camera must hold is published by the station as the `vrx_bind_`
family, so one star read of it through core dumps the whole bind set. How the pair is made and
checked is in [Binding a camera to a station](binding.md#binding); the symptoms and their fixes
are in [Troubleshooting](troubleshooting.md#troubleshooting).
