Windows Subsystem for Linux (WSL) and SDR in Windows 10                                                                 


A Windows feature around for some time in Windows 10.



Windows Subsystem for Linux - WSL.

Mainly targeted for web developers to run native Linux command-line tools directly on Windows without a Gui Interface.
Using the common Linux toolchains allows you to install and run almost all Linux applications on Windows.

No virtual machine or dual boot is required.
Unlike a virtual machine, WSL don’t require to allocate resources, instead WSL uses whatever resources are available on the host machine.



Windows Subsystem for Linux  is very usable as a replacement for Virtual Machine, depending on your needs.
Advantages are very quick start time, because it does not boot bios and kernel.

Performance in WSL-1 can be close to bare metal Linux installations in mostly CPU-intensive tasks, but Disk IO isn’t as quick as native Linux installations.
Compared to native NTFS writing there is no performance hit and a SSD Drive is recommended.

WSL-2 act more as a Virtual machine running a real linux kernel, not available in older versions of Windows 10 < 1903.
And is not covered in this tutorial.

WSL-1 does not use a real Linux kernel, actually it is not a separate isolated virtual machine but rather a process or compatibility layer in windows itself.
There are some compatibility problems and limitations with WSL-1, not all hardware resources are available like USB device support.

This tutorial explains how to manually install Ubuntu Linux Distributions including Desktop Interface and SDR support in WSL-1, without Microsoft Store in Windows 10 1809 LTSC.

WSL1's networking stack is pseudo-bridged, so network services are accessible directly from the Windows host IP address.
As a result, WSL1 is more straightforward from a networking perspective.

In this example windows rtl-tools like rtl_tcp and rtl_fm are sym-linked and fully accessible.
Allowing various SDR Applications in WSL to connect with TCP protocol or any other rtl tool.

Install X-Server push WSL-1 to its limits with SDR and see whats possible!

Hardware used:

  

Nooelec NESDR SMArTee - Premium RTL-SDR VHF-UHF.



msi.sdr HF.

Enable WSL


Enable Windows subsystem for Linux:

Prerequisite for Linux support is a 64-bit version of Windows 10 as of build 1709 for WSL-1 and WSL-2 build 2004.
 


In Control Panel, under Programs => Windows Features, enable the Select Windows subsystem for Linux component.
For this action to take effect, you have to restart the computer.

Or press the key combination Windows + R.
In the Execute dialog type in OptionalFeatures and confirm with Enter.
Put a check mark in the small window for Windows Subsystem for Linux and click on OK and then on Restart Now.

Or enable thru PowerShell:



Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Install Distro


Distros don't make much difference in WSL, especially if they have a same base,
It's just different desktop environment (Graphical Interface) and some other packages like gcc ect which may differ.

In Windows LTSC the Microsoft Store is not available, you can download and manually install Linux distros anyway,
with the advantage to avoid a long path file names.

Download the Linux distribution of your choice.

Ubuntu 16.04 (Xenial) first LTS release available for WSL (EOL Apr. 2021).
Ubuntu 18.04 (Bionic) second LTS release (EOL Apr. 2023).
Ubuntu 20.04 (Focal Fossa) current LTS release (EOL Apr. 2025).
Ubuntu 20.10 (Groovy) STR release (EOL Jul. 2021).
Ubuntu 21.04 (HirsuteHippo) STR Beta release (EOL Jan. 2022).



Installing your Ubuntu Distro:

Extract with 7zip, move install.tar.gz and ubuntu.exe files to a folder of choice.
Double click ubuntu.exe file and wait a few moments the screen will inform you that it’s Installing.

After install enter new UNIX username and password.
These don’t need to be the same as your Windows 10 credentials.
With this step complete, you’ll find yourself at the Ubuntu bash command line.

Download and Install Ubuntu 20.10 or 21.04

Download LxRunOffline:
https://github.com/DDoSolitary/LxRunOffline/releases

Rename downloaded (links above) image example:

groovy-server-cloudimg-amd64-wsl.rootfs.tar.gz to rootfs.tar.gz.

Import image:
LxRunOffline i -n <DistributionName> -d C:\<DistributionName> -f C:\rootfs.tar.gz

Example:
LxRunOffline i -n Ubuntu-20.10 -d C:\Ubuntu-20.10 -f C:\rootfs.tar.gz

This process may take a few minutes.

Download Launcher.exe
Move into Ubuntu 20.10 folder and run exe to start Ubuntu.

Ubuntu starts with root, add user:

useradd -m <username>
passwd <username>
usermod -a -G sudo <username>
su - <username>
chsh

It will show us /bin/sh and change it to /bin/bash
And use exit to leave.

Set Default User to Specified User for a WSL Distro

Ubuntu-20.10 config --default-user <username>
 
Or LxRunOffline su -n Ubuntu-20.10 -v 1000
su, set-uid        Set the UID of the default user of a distribution.

Start Ubuntu 20.10 and the user should be there instead of root access.

After playing around it is possible your current distro is unable to start, removing all files and folders in <DistributionName>
\rootfs\tmp can help start up again.

If shit really did hit the fan wslconfig /list find distro name and wslconfig /unregister <DistributionName>
Unregisters the distribution from WSL so it can be reinstalled or cleaned up.

It is important that Ubuntu is updated before starting this process.
Enter following command to fully update and upgrade Ubuntu, entering your Ubuntu user password when prompted:

sudo apt-get update && sudo apt-get upgrade -y

Install XFCE Desktop environment


In Ubuntu shell, enter following command to install XFCE desktop environment, pcmanfm Filemanager, pluma text editor, edit if other are (un)needed:

sudo apt-get install git cmake build-essential libusb-1.0-0-dev g++ rtl-sdr xfce4-terminal dialog p7zip-full file-roller pcmanfm xfce4 alacarte alsa-utils xfce4-cpugraph-plugin xfce4-systemload-plugin xfce4-weather-plugin xfce4-whiskermenu-plugin pluma gnome-themes-standard gtk2-engines gdebi lxtask -y

Be prepared for long install time..



X-Server Running Graphical Applications.

When you first install Ubuntu, it doesn’t include any X Window related libraries or utility programs.
To show Graphical Applications X-server or XRDP (remote desktop) a little bit slower can be used.

Recommended is VcXsrv
Install or copy VcXsrv into Ubuntu folder.



Enabling Sound.

The WSL environment does not support audio, by default, there’s no sound.
But it can be enabled by installing the Pulseaudio for Windows.
Ubuntu detects the running PulseAudio server and enables audio by TCP connection.

Download and extract to Ubuntu Folder;

Edit 'etc\pulse\default.pa'

Line 45:
load-module module-waveout sink_name=output source_name=input record=0

Line 67
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 or load-module module-native-protocol-tcp auth-anonymous=1
This enables the PulseAudio server to accept connections only from 127.0.0.1 via TCP.



Optional (Creates a virtual audio for Gqrx and SDR Applications):
load-module module-null-sink sink_name=VBAudio sink_properties=device.description="VBAudio"

Edit 'etc\pulse\daemon.conf'

There will be no PID file created in Windows user home folder.
Line 26
use-pid-file = no

If this option is set to a non negative value, the server automatically terminates itself when the last client disconnects and the time is passed more than this option (in seconds).

Line 39
exit-idle-time = -1

It is recommend disabling PulseAudio logging, as this seems to be a large user of CPU cycles.

Line 48
log-level = error

Save and exit.


If you do not need any sound or only virtual, Add pulseaudio -D in Session and startup.



Edit 'etc\pulse\default.pa' --> The Linux version :)

Add:
load-module module-null-sink sink_name=VBAudio sink_properties=device.description="VBAudio"

Edit 'etc\pulse\daemon.conf'

If this option is set to a non negative value, the server automatically terminates itself when the last client disconnects and the time is passed more than this option (in seconds).

Line 39
exit-idle-time = -1

It is recommend disabling PulseAudio logging, as this seems to be a large user of CPU cycles.

Line 48
log-level = error

Save and exit.

Launching VcXsrv, PulseAudio and XFCE from batch file.

Take care of the paths if you use a different desktop environment or install folder!

In this example Ubuntu 16.04, Pulseaudio and VcXsrv installed in C:\Ubuntu-16.04.

Create Desktop.bat and insert:

REM Start X-Server
tasklist /FI "IMAGENAME eq vcxsrv.exe" 2>NUL | find /I /N "vcxsrv.exe">NUL
if "%ERRORLEVEL%"=="0" echo X server is running
if not "%ERRORLEVEL%"=="0" start "" "C:\Ubuntu-16.04\VcXsrv\vcxsrv.exe"  -ac -wgl -dpms -notrayicon -lesspointer -nodecoration

REM Start Pulseaudio
tasklist /FI "IMAGENAME eq pulseaudio.exe" 2>NUL | find /I /N "pulseaudio.exe">NUL
if "%ERRORLEVEL%"=="0" pulseaudio.exe is running
if not "%ERRORLEVEL%"=="0" start "" /B "C:\Ubuntu-16.04\pulse\pulseaudio.exe"

REM Start D-Bus (only for Ubuntu 16.04)
bash -l -c "sudo service dbus start"
bash -l -c "dbus-launch --exit-with-session"

REM ### Start Linux GUI desktop
timeout 1
start C:\Ubuntu-16.04\Ubuntu-16.04.exe run "if [ -z \"$(pidof xfce4-session)\" ]; then export DISPLAY=127.0.0.1:0.0; export PULSE_SERVER=tcp:127.0.0.1; export RUNLEVEL=3; xfce4-session; pkill '(gpg|ssh)-agent'; taskkill.exe /IM vcxsrv.exe /F; wslconfig.exe /terminate Ubuntu-16.04; fi;"

Create a vbs file to hide the command batch window and point it to the Dektop.bat file:

CreateObject("Wscript.Shell").Run "Desktop.bat", 0, True

Use it to start the Xfce4 Desktop.



Optional Remote desktop connection:

sudo apt-get install xrdp

sudo sed -i 's/3389/3390/g' /etc/xrdp/xrdp.ini
sudo sed -i 's/max_bpp=32/#max_bpp=32\nmax_bpp=128/g' /etc/xrdp/xrdp.ini
sudo sed -i 's/xserverbpp=24/#xserverbpp=24\nxserverbpp=128/g' /etc/xrdp/xrdp.ini

echo xfce4-session >~/.xinitrc
chmod +x ~/.xinitrc
ln -fs ~/.xinitrc ~/.xsession
touch .Xauthority
touch .Xdefaults
xrdb -merge .Xdefaults &

sudo /etc/init.d/xrdp start

Now you can connect via localhost:3390 and the credentials of your WSL account via RDP! 

Enable sudo without password in Ubuntu:

Open the /etc/sudoers file (as root, of course!) by running:
sudo visudo
You should never edit /etc/sudoers with a regular text editor, such as Vim or nano, because they do not validate the syntax like the visudo editor.

At the end of the /etc/sudoers file add this line:
username     ALL=(ALL) NOPASSWD:ALL

Replace username with your username.

Get rid of the unneeded packages:

sudo rm -rf /etc/apt/apt.conf.d/20snapd.conf /etc/rc2.d/S01whoopsie /etc/init.d/console-setup.sh

Ubuntu 16.04, 18.04

sudo apt-get purge irqbalance multipath-tools apparmor snapd squashfs-tools plymouth plymouth-theme-ubuntu-text open-vm-tools cloud-init mdadm apport open-iscsi powermgmt-base popularity-contest fwupd libfwupd2 xscreensaver gnome-screensaver light-locker cloud-initramfs-copymods cloud-initramfs-dyn-netconf dmeventd initramfs-tools initramfs-tools-core irqbalance isc-dhcp-client klibc-utils libgusb2 linux-base i965-va-driver vim* --autoremove

Ubuntu 20.04, 20.10, 21.04

sudo apt-get purge irqbalance multipath-tools apparmor snapd squashfs-tools libplymouth5 plymouth plymouth-theme-ubuntu-text open-vm-tools cloud-init isc-dhcp-* mdadm apport open-iscsi powermgmt-base popularity-contest fwupd libfwupd2 xscreensaver gnome-screensaver light-locker geoclues* vim* thin-provisioning-tools cloud-initramfs-copymods cloud-initramfs-dyn-netconf cryptsetup mesa-vulkan-drivers cryptsetup-initramfs dmeventd finalrd fwupd initramfs-tools initramfs-tools-core irqbalance isc-dhcp-client klibc-utils kpartx libaio1 libgusb2 libisc-export1105 linux-base intel-media-va-driver i965-va-driver bluez-obexd intel-media-va-driver-non-free --autoremove

Cleanup any leftovers with sudo apt-get autoremove && sudo apt-get autoclean -y

When xfce4-session is launched, it automatically tries to start ssh-agent and gpg-agent which can result in errors.
Disable ssh-agent and gpg-agent error messages in desktop environment:

xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled -n -t bool -s false
xfconf-query -c xfce4-session -p /startup/gpg-agent/enabled -n -t bool -s false

Those agents can still be running even after terminating the xfce4-session.
In order to terminate the agents since they are no longer needed or used, pkill '(gpg|ssh)-agent'; is added in the batch file.
X410 and Pulseaudio are also killed when the desktop does logout.

Add dbus in Session and startup, some applications need it.



sh -c "sudo /etc/init.d/dbus start"

Install SDR Driver / RTL_TCP


Install RTL-Driver for Linux.

Install Dependencies:
sudo apt-get install git cmake build-essential libusb-1.0-0-dev

git clone git://github.com/happysat/rtl-sdr-blog.git
cd rtl-sdr-blog/
mkdir build
cd build
cmake ../ -DINSTALL_UDEV_RULES=ON -DDETACH_KERNEL_DRIVER=ON
make
sudo make install
sudo ldconfig
sudo cp ../rtl-sdr.rules /etc/udev/rules.d/
echo blacklist dvb_usb_rtl28xxu >> blacklist-rtl.conf
echo blacklist rtl2832 >> blacklist-rtl.conf
echo blacklist rtl2830 >> blacklist-rtl.conf
sudo cp blacklist-rtl.conf /etc/modprobe.d/

It is also possible to use the other rtl tools like rtl_fm and rtl_sdr (the windows versions!) thru the command terminal from Ubuntu.
Download Windows rtl-tools package, extract within a folder with your Ubuntu distro.




Remove Installed binaries course symlinks cannot overwrite this:
sudo rm /usr/local/bin/rtl_sdr 
The same for the other binaries rtl_tcp, rtl_power ect.

Create symlinks to for the windows rtl-tools, again just make sure the path is set right..

ln -sf /path/to/file /path/to/symlink

sudo ln -s /mnt/c/Ubuntu-21.04/Driver/rtl_sdr.exe /usr/local/bin/rtl_sdr
sudo ln -s /mnt/c/Ubuntu-21.04/Driver/rtl_tcp.exe /usr/local/bin/rtl_tcp
sudo ln -s /mnt/c/Ubuntu-21.04/Driver/rtl_fm.exe /usr/local/bin/rtl_fm
sudo ln -s /mnt/c/Ubuntu-21.04/Driver/rtl_power.exe /usr/local/bin/rtl_power
sudo ln -s /mnt/c/Ubuntu-21.04/Driver/rtl_eeprom.exe /usr/local/bin/rtl_eeprom
sudo ln -s /mnt/c/Ubuntu-21.04/Driver/rtl_test.exe /usr/local/bin/rtl_test



Now you can use rtl_tools fm, tcp ect.

Change ip adres to 127.0.0.1 or local ip adres.
rtl_tcp -a <local ip>

For other SDR Devices this is also possible:

SDR-Play TCP

https://www.sdrplay.com/software/SDRplay_RSP_TCP_1.1_Windows.zip



sudo ln -s /mnt/c/Ubuntu-21.04/Driver/rsp_tcp.exe /usr/local/bin/rsp_tcp

Change ip adres to 127.0.0.1 or local ip adres.
rsp_tcp -a <local ip>

Airspy_rx should also work - https://github.com/airspy/airspyone_host

Example rtl_tcp Script Ubuntu:

#!/bin/bash

HEIGHT=17
WIDTH=45
CHOICE_HEIGHT=3
BACKTITLE="RTL-TCP SDR-Config"
TITLE="Available SDR Devices"
MENU="Choose one of the following options:"

OPTIONS=(1 "SDR #1 Double Cross RTL_TCP"
         2 "SDR #2 Ground-Plane RTL_TCP"
         3 "SDR #3 Shortwave RTL_TCP"


CHOICE=$(dialog --clear \
                --backtitle "$BACKTITLE" \
                --title "$TITLE" \
                --menu "$MENU" \
                $HEIGHT $WIDTH $CHOICE_HEIGHT \
                "${OPTIONS[@]}" \
                2>&1 >/dev/tty)

clear
case $CHOICE in
        1)
            echo
            echo Starting SDR#1 Double Cross Antenna
            echo
            rtl_tcp -a 127.0.0.1 -d 0 -g 49.6 -P 0
            ;;
        2)
            echo
            echo Starting SDR#2 Ground Plane Antenna
            echo
            rtl_tcp -a 127.0.0.1 -d 1 -g 49.6 -P 0
            ;;
        3)
            echo
            echo Starting SDR#3 Shortwave Antenna
            echo
            /mnt/(path to rtl_rsp.exe)/rsp_tcp.exe -a 127.0.0.1
            ;;
esac
exit



Install sudo apt-get dialog to show the menu.

Install Gqrx


Gqrx has been included in Ubuntu Linux feeds.
Although the packages included with Ubuntu can be out of date, they may sufficient for your use.

And in many times are up-gradable building from source for a newer version.

For Ubuntu 16.04 and 18.04 add new repositories to the package manager by typing the following in a terminal – one line at a time:

sudo add-apt-repository -y ppa:bladerf/bladerf
sudo add-apt-repository -y ppa:myriadrf/drivers
sudo add-apt-repository -y ppa:myriadrf/gnuradio
sudo add-apt-repository -y ppa:gqrx/gqrx-sdr
sudo apt-get update

If that went well without errors, continue with installing gqrx:

sudo apt-get install gqrx-sdr
You can now find gqrx in the desktop menu or start it from a terminal by typing gqrx.

Once you have installed Gqrx from the PPA they are no longer needed, updates will not be available through the package manager anymore on this version.

Use the --remove flag, similar to how the PPA was added:

sudo add-apt-repository --remove ppa:bladerf/bladerf
sudo add-apt-repository --remove ppa:myriadrf/drivers
sudo add-apt-repository --remove ppa:myriadrf/gnuradio
sudo add-apt-repository --remove ppa:gqrx/gqrx-sdr

You can also remove PPAs by deleting them from /etc/apt/sources.list.d directory.

And the key list by typing:

sudo apt-key list

Find the key from the added PPA's

/etc/apt/trusted.gpg.d/gqrx_ubuntu_gqrx-sdr.gpg
-----------------------------------------------
pub   1024R/86F6E1DD 2013-07-27
uid                  Launchpad PPA for Gqrx team

and

sudo apt-key del 86F6E1DD

On >18.10 the short key id is no longer shown when you use the list command, but it is actually the last 8 characters of the long hex.

Update Gqrx:

After that it is possible to update Gqrx from git and build from newer up to date sources on all Ubuntu versions:

Install Dependencies:

sudo apt-get install qt5-default libqt5svg5-dev libpulse-dev

git clone https://github.com/csete/gqrx.git
cd gqrx/
mkdir build && cd build
cmake ..
make

Overwrite gqrx binary.
sudo cp gqrx /usr/bin
sudo chmod 755 /usr/bin/gqrx


It is recommended that users also install the libvolk1-bin package and run the volk_profile tool to optimize GNU Radio performance on the specific computer it is being used on.

sudo apt-get install libvolk1-bin
volk_profile

Wait for it to finish, then enjoy the performance boost.

Ubuntu 20.04

Installing gqrx-sdr from feed results in core dumps.
However installing one of the two deb packages offered on this website will work sudo gdebi <package name>
sudo ldconfig -v after deb install!

libQt5Core.so.5: cannot open shared object file: No such file or directory
This error will happen when starting gqrx..

Fix it with:
sudo strip --remove-section=.note.ABI-tag /usr/./lib/x86_64-linux-gnu/libQt5Core.so.5

Ubuntu 20.10


Same procedure as 20.04 except:

gqrx: error while loading shared libraries: libvolk.so.2.2: cannot open shared object file: No such file or directory

Fix it with:
ln -sf /lib/x86_64-linux-gnu/libvolk.so.2.3 /usr/lib/x86_64-linux-gnu/libvolk.so.2.2

Ubuntu 21.04

Same procedure as 20.04 except a shitload of errors loading shared libraries, fix it with:

sudo ln -sf /lib/x86_64-linux-gnu/libvolk.so.2.4 /usr/lib/x86_64-linux-gnu/libvolk.so.2.2
sudo ln -sf /lib/x86_64-linux-gnu/libboost_program_options.so.1.74.0 /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.71.0
sudo ln -sf /lib/x86_64-linux-gnu/libgnuradio-digital.so.3.8.2.0 /usr/lib/x86_64-linux-gnu/libgnuradio-digital.so.3.8.1
sudo ln -sf /lib/x86_64-linux-gnu/libgnuradio-analog.so.3.8.2.0 /usr/lib/x86_64-linux-gnu/libgnuradio-analog.so.3.8.1
sudo ln -sf /lib/x86_64-linux-gnu/libgnuradio-filter.so.3.8.2.0 /usr/lib/x86_64-linux-gnu/libgnuradio-filter.so.3.8.1
sudo ln -sf /lib/x86_64-linux-gnu/libgnuradio-blocks.so.3.8.2.0 /usr/lib/x86_64-linux-gnu/libgnuradio-blocks.so.3.8.1
sudo ln -sf /lib/x86_64-linux-gnu/libgnuradio-fft.so.3.8.2.0 /usr/lib/x86_64-linux-gnu/libgnuradio-fft.so.3.8.1
sudo ln -sf /lib/x86_64-linux-gnu/libgnuradio-runtime.so.3.8.2.0 /usr/lib/x86_64-linux-gnu/libgnuradio-runtime.so.3.8.1
sudo ln -sf /lib/x86_64-linux-gnu/libgnuradio-pmt.so.3.8.2.0 /usr/lib/x86_64-linux-gnu/libgnuradio-pmt.so.3.8.1
sudo ln -sf /lib/x86_64-linux-gnu/libboost_chrono.so.1.74.0 /usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.71.0
sudo ln -sf /lib/x86_64-linux-gnu/libboost_thread.so.1.74.0 /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.71.0



Change ip adres to 127.0.0.1 or local, in Gqrx choose Device: Other, Device String: rtl_tcp=192.168.1.100:1234
Make sure a rtl_tcp server is running!



msi.sdr Shortwave Reception, check No limits at the Input Control Tab for tuning below 24MHz!



If you are only interested in the FFT set Mode to Demod Off, this will greatly reduce the CPU load.
In most cases you can reduce the CPU load further by reducing the window size, sample rate, FFT rate and FFT size (try 2048 at 10-15 Hz).

OpenWebRX


OpenWebRX is a multi-user SDR receiver that can be operated from any web browser without the need for any additional client software.

It is the ideal solution to provide access to the HF spectrum at your location of choice to a wide audience.
All you need is a computer, an SDR device and network access.

https://github.com/jketterl/openwebrx
https://github.com/jketterl/openwebrx/wiki/Manual-Package-installation-(including-digital-voice)

In WSL we make use of the rtl_tcp network connection, this can be any remote computer on the local network.

Edit config_webrx.py:
In section sdr add and change "remote": "<ip of rtl_tcp computer>:1234",
Into the ip adres of any remote computer on the local network running rtl_tcp.

sdrs = {
        "rtlsdr_1": {
        "name": "RTL-TCP",
        "type": "rtl_tcp",
        "remote": "192.168.1.100:1234",
        "ppm": -1,
        "initial_squelch_level": -55,
        "waterfall_min_level": -78,
        "waterfall_max_level": -28,
        "profiles": {
            "137MHz": {
                "name": "137MHz",
                "center_freq": 137000000,
                "rf_gain": 49.6,
                "samp_rate": 2048000,
                "start_freq": 136200000,
                "start_mod": "nfm",
            },
            "145MHz": {
                "name": "145MHz",
                "center_freq": 145000000,
                "rf_gain": 49.6,
                "samp_rate": 2048000,
                "waterfall_min_level": -79,
                "waterfall_max_level": -29,
                "start_freq": 1440000000,
                "start_mod": "nfm",

And so on..
You can add as many rtl_tcp remote computers with different ip adresses as you want to.



Starting OpenWebRX needs rtl_tcp first, so a simple script can handle that in 2 tabs of the terminal example:

#!/bin/bash
# OpenWebRXScript

HEIGHT=14
WIDTH=40
CHOICE_HEIGHT=2
BACKTITLE="OpenWebRX-Config"
TITLE="OpenWebRX-Config"
MENU="Choose one of the following options:"

OPTIONS=(1 "Ground Plane"
         2 "Double Cross")

CHOICE=$(dialog --clear \
                --backtitle "$BACKTITLE" \
                --title "$TITLE" \
                --menu "$MENU" \
                $HEIGHT $WIDTH $CHOICE_HEIGHT \
                "${OPTIONS[@]}" \
                2>&1 >/dev/tty)

clear
case $CHOICE in
        1)
clear
xfce4-terminal -T RTL_TCP -e "rtl_tcp -a 192.168.1.100 -d 1" --tab -T GP -e "/home/OpenWebRX/openwebrx.py"
            ;;
        2)
clear
xfce4-terminal -T RTL_TCP -e "rtl_tcp -a 192.168.1.100 -d 00000101" --tab -T DC -e "/home/OpenWebRX/openwebrx.py"
            ;;

esac

exit

         

Execute script, and open your local ip adres in a browser e.g. 192.168.1.100:8073


For decoding nfm Radiosonde's in windows a few tweaks are needed:

Edit config_webrx.py:

Change, audio_compression="none"

Rule 85 in csdr.py change:

self.low_cut = -5000
self.high_cut = 5000

Rule 182
Comment out #  "csdr deemphasis_nfm_ff {audio_rate}",

Radiosonde decoding programs should work know.

Direwolf Packet-radio


Dire Wolf is a software "soundcard" AX.25 packet modem/TNC and APRS encoder/decoder.
It can be used stand-alone to observe APRS traffic, as a tracker, digipeater, APRStt gateway, or Internet Gateway (IGate).

For more information, look at Documentation for Dire Wolf

In Europe Amateurs use 144.800MHz, 432.500MHz, NA 144.300MHz and 145.825MHz Space com. Packet operations.

Install Dependencies:
sudo apt-get install libudev-dev libhamlib-dev libasound2-dev

git clone https://www.github.com/wb2osz/direwolf
cd direwolf
make
sudo make install
make install-conf

Dev. Version.

git clone https://github.com/wb2osz/direwolf.git
cd direwolf
git checkout dev
mkdir build && cd build
cmake ..
make
make install
make install-conf

Or install from feed sudo apt-get install direwolf (Ubuntu 16.04 Dev git does not compile!)

Examples rtl_fm in Ubuntu Terminal:

RS-41 Modified APRS 70CM:

rtl_fm -p -1 -g 29.6 -f 432500000 - | direwolf

Terrestrial APRS 2 Mtr:
 
rtl_fm -p -1 -g 29.6 -f 144800000 - | direwolf

ISS APRS 2Mtr:
 
rtl_fm -p -1 -g 29.6 -f 145825000 - | direwolf

direwolf.conf:

ACHANNELS 1
ADEVICE null null
CHANNEL 0

MODEM 1200

AGWPORT 8000
KISSPORT 9002

IGFILTER m/700
IGTXLIMIT 6 10



APRSMap can display position of received packets using Direwolfs Kiss port (9002).
Make sure the path to udpflex is set, udpflex is included in the APRSMap Download.  



DSD Digital Speech Decoder


DSD is able to decode several digital voice formats and synthesize the decoded speech, like DMR.

Install Dependencies:
sudo apt-get install libsndfile1-dev fftw3-dev liblapack-dev portaudio19-dev libitpp-dev libitpp-dev pulseaudio-utils

git clone https://github.com/szechyjs/mbelib.git
cd mbelib
mkdir build && cd build
cmake ..
make
sudo make install

git clone https://github.com/f4exb/dsd.git
cd dsd
mkdir build && cd build
cmake ..
make
sudo make install
sudo ldconfig

In terminal padsp dsd or with Gqrx  - socat udp-listen:7356 - | padsp dsd -i -

Note: DSD Fails to compile in Ubuntu 20.10/21.04.



Gpredict / WxToImg


Adding this PPA to your system to install gpredict

You can update your system with unsupported packages from this untrusted PPA by adding ppa:gpredict-team/daily to your system's Software Sources.

sudo add-apt-repository ppa:gpredict-team/daily
sudo apt-get update

sudo apt-get install gpredict


Optional:Howto Enable doppler Tracker


Download wxtoimg-amd64-2.11.2-beta.deb

Install Dependencies:

sudo apt-get install gdebi <for installing deb packages>
sudo gdebi wxtoimg-amd64-2.11.2-beta.deb

Sox is not needed.
Just make sure to select in Pulseaudio control, virtual audio for both Gqrx and WxToImg.

Start wxtoimg Gui with xwxtoimg in terminal or make a shortcut.

[Desktop Entry]
Name=WxToImg
Comment=
Icon=wxtoimg.png  <-- Search smth.
Exec=xwxtoimg
Type=Application
Encoding=UTF-8
Terminal=false
Categories=None;

Make sure RTL_TCP Server is accessible for connections.


Ciara February 2020 Storm.


Professional Edition Upgrade Key

Full Name: Kevin Schuchmann
Email Address: any email address
Upgrade Key: CGHZ-PP9G-EAJZ-AWKK-NDNX

Excellent WxToImg Guide From les Hamilton

A very good guide to Receive METEOR weather satellite images with RTLSDR and GQRX on Linux




Download Palettes (CLUTS) to try.



Included in the zip is WXtoIMGPal.msi you can make own CLUTS.

Multimon

Multimon-ng is the successor of multimon and decodes the following digital transmission modes:
POCSAG, FLEX, AFSK, DTMF, MORSE CW and many more.

git clone https://github.com/EliasOenal/multimon-ng.git
cd multimon-ng
mkdir build && cd build
cmake ..
make -j4

Example AX-25, Flex, Pocsag and Morse rtl_fm In Ubuntu Terminal:

rtl_fm -p -1 -g 29.6 -f 144800000 -s 22050 - | multimon-ng -a AFSK1200 -t raw /dev/stdin 2>&1

rtl_fm -f 169.65M -M fm -s 22050 -p 0 -g 29.6 | multimon-ng -a FLEX -t raw /dev/stdin 2>&1

rtl_fm -p 0 -g 29.6 -f 172.45M -s 22050 - | multimon-ng -a POCSAG1200 -t raw /dev/stdin 2>&1

rtl_fm -M usb -p 0 -g 29.6 -f 432650000 -s 22050 - | multimon-ng -a MORSE_CW -t raw /dev/stdin 2>&1



RTL_433


RTL_433, Program to decode traffic from Devices that are broadcasting on 433.9 MHz like temperature sensors.
Works only with rtl_tcp.

git clone https://github.com/merbanan/rtl_433.git
cd rtl433/
mkdir build && cd build
cmake ../

Make sure RTL_TCP Server is accessible for connections.

rtl_tcp -a <your ip> -d 1 | rtl_433 -G4 -C si -d rtl_tcp:<your ip>:1234 -p 0 -f 433920000
 

 

RS-Decoder


With RS-Decoders it is possible to decode most types of Radiosonde's used in Europe.
It is also possible to use the NMEA output of the RS-Decoders and feed data into APRSMap via UDP thru Perl pos2aprs script.
With Gqrx or rtl_fm.

The following radiosonde types are supported:
Vaisala RS92, RS41, Graw DFM06/DFM09/DFM17/PS-15, Meteomodem M10 and InterMet A/B, 4.

Install Dependencies:
sudo apt-get install perl sox gcc

Compile decoders DFM-09/RS-41:

git clone git://github.com/rs1729/RS.git
cd RS/demod/mod

gcc -c demod_mod.c -w -O3
gcc -c bch_ecc_mod.c -w -O3

Compiling Mod RS41
gcc rs41mod.c demod_mod.o bch_ecc_mod.o -lm -O3 -o rs41mod -w

Compiling Mod DFM09
gcc dfm09mod.c demod_mod.o -lm -O3 -o dfm09mod -w

Compiling Mod M10/20
gcc m10mod.c demod_mod.o -lm -O3 -o m10mod -w
gcc mXXmod.c demod_mod.o -lm -O3 -o mXXmod -w

Or any other decoder you need.


Download POS2APRS Perl script

-U UDP Ip and Port.
-d generates APRS frames with DAO (and thus finer position resolution).
-i  Sonde ID E.g. i-Met.

For RS-41 Gqrx:

sox -t alsa default -t wav - 2>/dev/null | ./rs41mod --ecc2 -vx --ptu 2>&1 | ./pos2aprs.pl WSLU16 0 "_RS-41" -d -U 127.0.0.1:9002 > /dev/null

For i-Met4 Gqrx:

sox -t alsa default -t wav - 2>/dev/null | ./imet1rs_dft 2>&1 | ./pos2aprs.pl WSLU16 0 "_IMET" -i i-Met4 -d -U 127.0.0.1:9002 > /dev/null

For DFM Gqrx:

sox -t alsa default -t wav - 2>/dev/null | ./dfm09mod --ecc -v --ptu --auto 2>&1 | ./pos2aprs.pl WSLU16 0 "_DFM-09" -d -U 127.0.0.1:9002 > /dev/null

DFM Windows rtl_fm:

rtl_fm -p 0 -d 0 -g 49.6 -M fm -F9 -s 15K -f402870000 2>nul | sox -t raw -r 15k -e s -b 16 -c 1 - -r 48000 -b 8 -t wav - lowpass 2600 2>nul | ./dfm09mod --ecc -v --ptu --auto 2>&1 | ./pos2aprs.pl WSLU16 0 "_DFM-09" -d -U 127.0.0.1:9002 > /dev/null

The paths to the programs and the exact parameters must of course be adjusted accordingly!



Make sure to select in Pulseaudio control the virtual audio for both Gqrx and the decoder.

APRSMap


APRS-Map part of the Dxl-Chain, can display APRS Object's and positions and your own position (off course a GPS-Mouse is required).

Install Dependencies:
sudo apt-get install libx11-dev libxext-dev libpng-dev libjpeg-dev -y

Download APRSMap Ubuntu 16.04

Or git clone https://github.com/oe5hpm/dxlAPRS.git
cd dxlAPRS/src
make all

Goto APRS-Map Config / Rf-Ports Tab:



Check RF-Port 1 in APRS-Map and make sure its UDP1(ip:send:listen)|1|127.0.0.1:9001:9002
Make sure RTL_TCP Server is accessible for connections.

And data from rs-decoder should roll in:


GPS2APRS


Download APRS-Map for Windows:

http://wiki.oevsv.at/index.php?title=DXL_-_APRSmap_Download

Extract package and find gps2aprs.exe, only that is needed.
gps2aprs binary Linux version does not work properly.

Start gps2aprs.exe in a windows command prompt.

Make sure you have the right Port number and Baudrate which the GPS is connected to:
And replace this by the com4:4800 example.

/mnt/(path to rtl_gps2aprs.exe)/gps2aprs.exe -t com4:4800 -I CAR -i /k -D -0 10 -b 2 -v -r 127.0.0.1:9002

Or symlink it:
sudo ln -s /mnt/c/Ubuntu-16.04/Driver/gps2aprs.exe /usr/local/bin/gps2aprs



In APRSMap check RF-Port 1 and make sure its UDP1(ip:send:listen)|1|127.0.0.1:9001:9002



The Car position should be Visible and every 10 Seconds updated in the map.

gps2aprs -h

 -t <tty>:<baud>            (com1:4800)
 -I <mycall>                   Mycall with SSID like NOCALL-15
 -D                                DAO Extension on for 20cm Resolution
 -b <s>                          Driving Beacon Time in Seconds (15)
 -r <x.x.x.x:destport>      Use AXUDP (to Soundmodem)
 -v                                  Verbous-Mode
 -i                                  Ballon /O, Car /> -i /k

More about the regular functions and options from APRS-Map read the Wiki:

http://wiki.oevsv.at/index.php?title=DXL_-_APRSmap_englisch

Configure USB-serial GPS Device in WSL


Using a USB-serial GPS device from WSL requires that the device is recognized in Windows first!
Plug USB-serial adapter into the PC.

Look in Windows Device Manager under Ports to see the COM port number.
If the device doesn't show under USB Devices → Ports in Windows Device Manager, the following steps will not work!

In WSL terminal, assuming GPS-Mouse is on COM4 4800 Baud for this example, type:

chmod 666 /dev/ttyS4 - Make permission.
stty -F /dev/ttyS4 4800 -Set Baudrate to 4800.
sudo cat /dev/ttyS4 - See NMEA Output with cat.



gpsd /dev/ttyS4 - Start GPSD for test in FoxtrotGPS.

sudo apt-get install gpsd gpsd-clients python-gps foxtrotgps

Small script for GPSD:

#!/bin/sh

read -p 'Which Port COM To Connect for GPSD? Type 1/19:' uservar
read -p 'Which Baudrate for GPS? Type 4800/9600:' uservar2
sudo chmod 666 /dev/ttyS$uservar
sudo killall -9 gpsd 2> /dev/null
stty -F /dev/ttyS$uservar $uservar2
sleep 1
gpsd /dev/ttyS$uservar

Qt-DAB


      

Very good DAB Receiver!
Selecting Pulse as audio source and rtl_tcp connection does work on WSL.     

Install, Dependencies, ect overhere.

Auto-RX and Chasemapper


Automatic Radiosonde Receiver Utilities.
Set of utilities ('auto_rx') based on rs1279's RS-Decoders codebase to allow automatic reception and uploading Radiosonde decoded data to HabHub and/or Radiosondy.

Chasemapper is a mapping system designed specifically for chasing high-altitude weather balloons.
Accessible from a tablet or laptop computer via a web browser, providing live predictions of the balloon flight path during the flight calculated from GFS weather models.

Refer to the Wiki for Auto-RX and Chasemapper Installation.

After that sdr checkups have to be skipped in order to make Auto-RX run in WSL..

Make sure you have symlinked rtl_fm and rtl_power as described in Driver install Auto-RX will be using these files.

sudo ln -s /mnt/c/Ubuntu-21.04/Driver/rtl_fm.exe /usr/local/bin/rtl_fm
sudo ln -s /mnt/c/Ubuntu-21.04/Driver/rtl_power.exe /usr/local/bin/rtl_power

Edit utils.py found in auto_rx/autorx/ folder.

Copy these lines:


And paste, replacing the code between the orange lines:




In station.cfg define 0 or 1 as a device index.





Chasemapper can work with GPS, Refer to Configure USB-Serial GPS Device in WSL.
Find out in use GPS com port and change in horusmapper.cfg  gps_port = /dev/ttyS4 and  gps_baud = 4800.

Import / Export WSL Images


WSL running on Windows 10 1809 LTSC does not have import/export functions.

Download LxRunOffline:
https://github.com/DDoSolitary/LxRunOffline/releases


Import:

LxRunOffline i -n <DistributionName> <InstallLocation> <FileName>

Example:

LxRunOffline i -n Ubuntu-16.04 -d C:\Ubuntu-16.04 -f C:\Ubuntu.tar.gz

Export:

LxRunOffline e -n <DistributionName> <path to save distro>

Example:

LxRunOffline e -n Ubuntu-16.04 -f C:\Ubuntu-16.04.tar.gz

Options:

-n arg               Name of the distribution
-f arg                Path to the .tar.gz file to export to.

e arg                 Export
i  arg                 Import

gu, get-uid       Get the UID of the default user of a distribution.
su, set-uid       Set the UID of the default user of a distribution.

After import check User ID matches:

LxRunOffline gu -n <DistributionName>

Should be 1000.
 

Set the UID of the default user of a distribution.

LxRunOffline su -n <DistributionName> -v 1000
su, set-uid       

Or Change user:
<DistributionName> config --default-user <username>


Other WSL commands:

wslconfig /list /all or wslconfig /l /all
List Installed Distribution.

wsl --unregister <DistributionName>
Unregisters the distribution from WSL so it can be reinstalled or cleaned up.
 
Run specific WSL distro
wsl -d <DistributionName>
OR wsl --distribution <DistributionName>

To set a default distribution
wslconfig /setdefault <DistributionName>


Rename WSL distribution
Stop all instances of WSL.
Open Registry Editor and go to HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss

Find the distro you want to rename, look for the DistributionName and change it.

WSL Firewall Permissions


The default setting in Windows Firewall is to allow any application to start outgoing connections.
But if you change that to deny connections by default then you need rules.

Windows Firewall with Advanced Security works with setting outgoing rules to permit Linux executables,
like apt, curl, git, python and wget the net since Windows 10 Version 1809.

Some executables, like apt and git, actually access the net via other executables they run.
Other executables may be run via symbolic links, like how /usr/lib/git-core/git-remote-https is a symbolic link to git-remote-http.
You must set the rule based on the actual executable, not the symbolic link!

Also note that you cannot browse the Linux executable directories when creating a rule because it only shows files with an .exe extension.
You need to directly type or paste them in.

Browsing also might put a %USERPROFILE% environment variable in the string, and that doesn't work because the firewall doesn't run as your user.
You need the full path.

Once you have a working rule you can copy and paste it, then change its name and the executable it refers to.


Some example rules:

Apt, Curl, Git Python and Wget:

(path to Ubuntu)\rootfs\usr\bin\curl|curl
(path to Ubuntu)\rootfs\usr\bin\wget|wget
(path to Ubuntu)\rootfs\usr\lib\apt\methods\gzip|atp gzip
(path to Ubuntu)\rootfs\usr\lib\apt\methods\file|atp file
(path to Ubuntu)\rootfs\usr\lib\apt\methods\https|atp https
(path to Ubuntu)\rootfs\usr\lib\apt\methods\http|atp http
(path to Ubuntu)\rootfs\usr\lib\git-core\git-remote-https|git remote https
(path to Ubuntu)\rootfs\usr\lib\git-core\git-remote-http|git remote http
(path to Ubuntu)rootfs\usr\lib\git-core\git-remote|git remote
(path to Ubuntu)\rootfs\usr\bin\python(version)

Much easier is to use Simplewall with WSL Support.

Also you need to be aware that a WSL process may trigger Windows Defender scanning

Usefull Links


A Windows Subsystem for Linux Subreddit

Awesome list dedicated to Windows Subsystem for Linux

https://www.scivision.dev/tags/windows-subsystem-for-linux/

Advanced WSL installer / launcher.

A full-featured utility for managing Windows Subsystem for Linux (WSL).

WslHub Manager

Unofficial gui manager for Windows Subsystem for Linux (WSL).

A community powered list of programs that work (and those that don't) on the Windows subsystem for Linux.

xRDP – How to redirect Sound on Ubuntu.