Windows ground station
Forpilotsfield integrators
Sokil for Windows turns a Windows 11 PC into a ground station. The station is the same Linux software every other ground station runs, inside WSL2 - the Linux virtual machine built into Windows - and you fly on the Web OSD in Chrome or Edge. The handset, the adapters and what setup writes are the laptop station's: Laptop pilot station. This page is what is different on Windows - what the installer does to the PC, which USB devices it takes, how to switch Sokil off or remove it, and how the station is reached over the network.
What it is
- Windows 11 22H2 (build 22621) or newer, with CPU virtualization enabled in the firmware (AMD: SVM Mode; Intel: VT-x). The installer checks both and stops if either is not met.
- Sokil runs inside WSL2 in a Linux distro named Ubuntu. The package installs the station and the Web OSD, and nothing else; the native Sokil OSD is a separate download - where the software comes from.
- Open the web UI and the Web OSD at
http://127.0.0.1/, which is what the Sokil Web UI icon opens, rather thanhttp://localhost/. Windows lookslocalhostup as the IPv6 address::1first while the station's web server listens on IPv4 only, so Chrome gets there only after a short fallback, and PowerShell'sInvoke-WebRequesttimed out when it was measured.127.0.0.1is the same machine over IPv4, and browsers treat it as a secure address the way they treatlocalhost, so the Web OSD's video decoder is available there - provided the browser supports the camera's codec ("This browser can't decode H.265").
⚠ Use a PC dedicated to the ground station. The installer changes the whole machine, not one program: Windows features, a WSL setting shared by every Linux distro of your Windows user, a set of ports, the firewall, browser policies and every USB device of three kinds. The next section lists all of it. On a work PC that also runs its own WSL or Docker, a local web server, Arduino or ESP32 boards, those changes land on that work too.
What Sokil does NOT take. It does not take the PC's network adapters: Ethernet and Wi-Fi keep
working for Windows exactly as before. Ubuntu shows every one of them - ip addr inside it lists
them all - because mirrored networking shares the adapters with it, not because they were moved out
of Windows. And it takes no USB device except the three kinds below: a mouse, a keyboard, a webcam, a
USB drive or a USB network adapter stays with Windows.
What the installer changes on the PC
The installer prints this list and asks Install Sokil and make these changes? [y/N] before it
changes anything. The default is No, and answering No leaves the PC as it was.
Windows and WSL
- Enables the Windows features Virtual Machine Platform and Windows Subsystem for Linux. Windows may need a restart to activate them: the installer offers one, and you run the installer again afterwards.
- Updates WSL and creates the WSL distro Ubuntu. ⚠ If a distro named Ubuntu already exists, Sokil is installed into that one, root becomes its default user, and Sokil starts inside it at Windows boot and when the installing user signs in. A developer who works in their own WSL Ubuntu should know that before answering.
- Writes
networkingMode=mirroredinto%USERPROFILE%\.wslconfig. That file is the Windows user's, not Sokil's: the setting applies to every WSL distro of that user, Docker Desktop's included.
Ports on the PC
WSL shares the PC's ports, so what the station listens on is taken on the PC itself. A Windows program already using one of these ports collides with Sokil.
| Port | What holds it |
|---|---|
| TCP 80 | the web UI and the Web OSD |
| TCP 8333 | core's API |
| TCP 2222 | the station's SSH server |
| TCP 8502, 8503 | the camera's and the repeater's own web pages, forwarded over the radio link |
| UDP 9993 | ZeroTier |
Firewall and ZeroTier
- Allows inbound connections to WSL in the Hyper-V firewall, so tablets, cameras and other stations on the network can reach the station.
- Adds the Windows firewall rule Sokil WSL SSH (TCP 2222).
- If a Windows ZeroTier client is installed, asks whether to move it to another port, stop and disable it, or leave it alone. The two cannot share UDP 9993, and a client left there keeps Sokil's ZeroTier link down.
USB devices
- Installs usbipd-win through winget - the tool that hands a USB device from Windows to WSL.
- Adds an AutoBind policy for three USB hardware ids:
| Hardware id | Device |
|---|---|
1a86:7523 |
a CH340 USB serial chip - on many ESP32 and Arduino-type boards and USB serial adapters |
303a:1001 |
an Espressif ESP32-C3 or ESP32-S3 on its built-in USB |
1209:4f54 |
an EdgeTX radio in USB Joystick mode |
⚠ Every plugged-in device with one of these ids is taken from Windows and given to Sokil within a few seconds, taken again after a replug, and hidden from Windows programs while it is attached - no COM port, nothing in Betaflight, EdgeTX Companion, a simulator or the Arduino and ESP flashing tools. That is not only the station's own adapters: an Arduino clone with a CH340 or an ESP32-C3 / S3 development board plugged into this PC goes to Sokil too. Other USB devices are never touched.
Tasks, icons and browser settings
- Registers the scheduled task Sokil WSL, which runs at Windows boot and when the installing user signs in: it starts the distro, keeps it running and starts the USB monitor. Also Sokil Serial to WSL, Sokil Serial to Windows and Sokil USB status, which the USB icons run.
- Creates the desktop icons Sokil USB to Sokil, Sokil USB to Windows, Sokil USB status and Sokil Web UI - the last one also in the Start menu.
- Writes managed policies for Chrome and Edge: the insecure origins
10.1.1.30,10.1.1.40andlocalhosttreated as trusted, so another station's Web OSD can decode video over plain http when the browser supports the camera's codec; hardware acceleration on; no prompt to become the default browser. - Writes its own files to
C:\ProgramData\Sokil.
Inside Ubuntu
The station's SSH account (support provides the credentials), an SSH server on port 2222, ZeroTier, and the Sokil services.
Unattended installs
An install nobody is there to answer must accept the list up front: -Yes on the command line
(install.bat -Yes passes it on), or SOKIL_WINDOWS_ACCEPT=1 in the environment. With no console to
ask on and neither of those, the installer stops before it changes anything.
Installing
- Unpack the Sokil for Windows package from Help > Resources.
- Double-click
install.bat. It asks Windows for administrator rights itself. - Read the list and answer
y. - If Windows needs a restart, accept it, and run
install.batagain after the restart. - Read the last screen. INSTALL COMPLETE is done; FINISHED WITH WARNINGS lists the optional steps that were skipped and is not a failure; INSTALL FAILED names the step - the Windows installer fails part way.
- Open Sokil Web UI and set the station up as a laptop station: what setup asks and writes.
An ESP32-C3 or ESP32-S3 adapter appears inside Ubuntu as /dev/ttyACM0, while the handset input's
Serial port (parameter rc_crsf_serial) defaults to /dev/ttyUSB0. Check the port on the
Hardware page (on the station: Hardware) and pick it on the RC input card of Control > RC Wiring.
USB devices: Sokil or Windows
Only one side can use a device at a time. Sokil needs the radio or the adapter to fly; Windows needs it for EdgeTX Companion, Betaflight or a simulator.
For a while
The Ports chip in the header of the web UI (choose Windows, or Sokil to take them back), and the desktop icons Sokil USB to Sokil and Sokil USB to Windows, move all three device types at once. Sokil USB status says where each device is now. The choice lasts until the next Windows boot or sign-in by the installing user: then everything goes back to Sokil. When there is no RC, check this chip first.
For good
To keep one device type on Windows permanently, for example the CH340 boards you program from Arduino, take its id out of Sokil's list and its rule out of usbipd. From an administrator PowerShell:
- Delete its line from
C:\ProgramData\Sokil\serial_hwids.txt. The USB monitor re-reads the file every loop, so it stops taking that id at once. usbipd policy list, and note the GUID of the rule with that hardware id.usbipd policy remove --guid <GUID>usbipd detach --hardware-id <vid:pid>gives an attached device back to Windows.
Re-running the installer adds the shipped ids back, so repeat this after a reinstall.
Turning Sokil off and on
Everything here runs in an administrator PowerShell and removes nothing.
Off, from the next restart. Disable-ScheduledTask -TaskName "Sokil WSL", then restart Windows.
Nothing of Sokil starts after that, and no USB device is taken.
Off right away, without signing out: the same command, then the USB monitor first - it keeps running and takes the devices back within seconds - and only then the station:
Get-CimInstance Win32_Process -Filter "Name = 'powershell.exe'" | Where-Object CommandLine -like '*sokil-serial-monitor*' | ForEach-Object { Stop-Process -Id $_.ProcessId -Force }
wsl --terminate Ubuntu
usbipd detach --all
On again.
Enable-ScheduledTask -TaskName "Sokil WSL"
Start-ScheduledTask -TaskName "Sokil WSL"
Mirrored networking stays configured while Sokil is off. It only has an effect while a WSL distro is running, so with Sokil off and no other distro running it changes nothing.
Uninstalling
Two ways to start the uninstaller:
- From the Windows package: double-click
uninstall.bat, next toinstall.bat. - On a station installed with the current installer, from an administrator PowerShell:
powershell -ExecutionPolicy Bypass -File C:\ProgramData\Sokil\uninstall_windows.ps1
It lists what it will do and asks Remove Sokil from this PC? [y/N]; an unattended run needs
-Yes. Then it:
- stops Sokil and the USB monitor, and gives every USB device back to Windows;
- removes the four scheduled tasks, the desktop and Start-menu icons, the AutoBind policies, the firewall rule and the browser policies;
- restores the Hyper-V firewall setting and the networking line of
.wslconfig- back to what was there before when the installer recorded it, otherwise it removes thenetworkingMode=mirroredline - and restarts WSL, which stops every running distro, Docker Desktop's included; - undoes the change the installer made to a Windows ZeroTier client, when that was recorded;
- removes
C:\ProgramData\Sokil.
Restart the PC afterwards.
What it keeps
- The Ubuntu distro is deleted (
wsl --unregister, with everything inside it) only if the Sokil installer created it. A distro that existed before Sokil is kept: Sokil's services are stopped and disabled inside it, the setting that made root its default user is removed, and the station's SSH account is locked. On a station installed before the installer kept that record, the uninstaller asks, and the default is to keep it.-RemoveDistroor-KeepDistrodecides it up front. - usbipd-win is uninstalled only if the Sokil installer installed it.
- The Windows features Virtual Machine Platform and Windows Subsystem for Linux stay on unless
you pass
-RemoveWindowsFeatures, because other software uses them - Docker, Android emulators, other WSL distros.
Removing it by hand
On a PC where the uninstaller is not available, each step below is one command in an administrator PowerShell, or one action:
Unregister-ScheduledTask -TaskName "Sokil WSL","Sokil Serial to WSL","Sokil Serial to Windows","Sokil USB status" -Confirm:$false- Stop the USB monitor with the command in Turning Sokil off and on.
usbipd detach --allusbipd policy list, thenusbipd policy remove --guid <GUID>for each rule with1a86:7523,303a:1001or1209:4f54.wsl --unregister Ubuntu- only if that distro exists for Sokil alone; it deletes everything inside it. To keep the distro instead, switch Sokil off inside it, as root:systemctl disable --now sokil sokilweb sokilproxy-502 sokilproxy-503 zerotier-one.- Delete the
networkingMode=mirroredline from%USERPROFILE%\.wslconfig, thenwsl --shutdown. Set-NetFirewallHyperVVMSetting -Name '{40E0AC32-46A5-438A-A0B2-2B479E8F2E90}' -DefaultInboundAction NotConfiguredRemove-NetFirewallRule -Name SokilWslSsh- Under
HKLM:\SOFTWARE\Policies\Google\ChromeandHKLM:\SOFTWARE\Policies\Microsoft\Edge, remove the keyOverrideSecurityRestrictionsOnInsecureOriginand the valuesHardwareAccelerationModeEnabledandDefaultBrowserSettingEnabled- unless your organization manages those policies. - Delete the four desktop icons, the Sokil Web UI entry in the Start menu, and
C:\ProgramData\Sokil. - If the installer moved or stopped a Windows ZeroTier client: restore
C:\ProgramData\ZeroTier\One\local.conf.sokil-bakaslocal.conf, or runSet-Service ZeroTierOneService -StartupType Automatic; Start-Service ZeroTierOneService. - Optionally
winget uninstall --exact dorssel.usbipd-win, andDisable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform,Microsoft-Windows-Subsystem-Linux.
Then restart the PC.
Networking and remote access
Mirrored networking, in operator terms: Ubuntu gets no network of its own. It uses the PC's
adapters and addresses as they are, so the station is reached at whatever address Windows has, and
it reaches whatever the PC reaches - a camera on the PC's Ethernet port, the internet over its
Wi-Fi. Video reaches the Web OSD on 127.0.0.1, exactly as on a Linux station.
- From another device on the network, a tablet or another computer opens the web UI at the
PC's own address,
http://<PC>/. Over plain http on a network address the browser needs the secure-origin exception before it decodes video - the video pane says "Video is blocked on this address". - SSH:
ssh -p 2222 <account>@<PC>with the station's SSH account (support provides the credentials), thensudo -i. Port 22 is Windows' own SSH server where one is installed, and it rejects that account - SSH to a Windows station. - The station starts when Windows boots, before anyone signs in. The Sokil WSL task also runs when the installing user signs in. Stations installed from older media need the current Windows installer run again to get startup before sign-in.
- It cannot hand out addresses. Hand out addresses to devices on this wire (parameter
eth_dhcp_server) (Control > Network > Ethernet) is kept but never applied on Windows, and Diagnostics says so. Give the cameras fixed addresses, or let a router or a Linux ground station on the same switch hand them out. - ZeroTier runs inside Ubuntu, needs UDP 9993 on the PC, and is up only while the station is. A ZeroTier client installed on Windows itself wants the same port: move it or stop it, as the installer offers - ZeroTier is unreachable on a Windows station.
wsl --shutdownstops the whole station, and every other WSL distro with it. Nothing of Sokil comes back until the Sokil WSL task runs again: sign out and back in as the installing user, orStart-ScheduledTask -TaskName "Sokil WSL".- The Terminal and Files pages ship switched off here, and so do unsigned updates sent from
another machine: a PC is a personal machine, so Sokil treats it as a pilot's laptop whatever it is
plugged into. Device discovery itself ships off for the same reason - the PC answers the
cameras pointed at it either way, so the vehicle switcher is unaffected. All four switches are on
Control > Network > Device discovery, and the first three can be changed only on this PC,
in the interface at
http://127.0.0.1/; they switch off again whenever Sokil restarts. What a laptop keeps switched off has the whole list and what to do for a support call.
When something is wrong
The troubleshooting guide has one block per symptom:
- The PC's own USB devices or network stopped working after installing Sokil for Windows
- The web UI does not open on a Windows station
- The Windows installer fails part way
- The station's USB radio disappeared on a Windows station - no RC
- Other stations and cameras cannot reach a Windows station
- ZeroTier is unreachable on a Windows station that also has ZeroTier installed
- A Windows station cannot hand out addresses to cameras
- "This browser can't decode H.265"
- The desktop OSD opens a white window and crash-loops on a Windows laptop
Related guides
- Laptop pilot station - the handset adapters, pinning them, and what setup writes on a laptop.
- Supported hardware - which laptop, and the Windows requirements.
- Mac ground station - the same station on an Apple Silicon Mac.
- Remote access and debugging - SSH and the logs on a Windows station.
- Troubleshooting - every symptom with its fix.