Using Windows Subsystem For Linux (WSL) to Run Linux SDR Programs on Windows 10
Thank you to Happysat who has shared with us a useful tutorial that explains how we can run Linux only SDR programs on a Windows 10 system using the Windows Subsystem For Linux (WSL) feature. WSL is a feature available on Windows 10 which is a Linux compatibility layer designed for running Linux binaries natively on Windows 10. This means that no Virtual Machine with shared resources is required, instead the full resources of your system are available.
Happysat writes:
Many people using Windows 10 now since Windows 7 is EOL, and WSL is part of the system kinda "free" so why not use it :)
Together with a X-Server and and Desktop like XFCE4, it can be great for running SDR applications in Linux thru rtl_tcp.
Very fast startup in seconds and not much packet loss thru tcp, quite alot linux sdr applications are working very good.
No allocating resources like a VM.
Sometimes better then Ubuntu on a VM.
Software tested: AX-25 Packet Radio, Dab Radio, DSD, Es-Hail Beacon Tracker, Sat Tracking with Gpredict and Gqrx, NOAA Reception WxToImg, Radiosonde Decoding, Shortwave Reception and some more tips and tricks about WSl and SDR.
The steps appear to be fairly simple. Just enable WSL in the Windows 10 Features panel, download a Linux distro built for WSL and run the .exe file. Then you'll have access to a Linux terminal where you can install a GUI desktop environment, the RTL-SDR drivers, and other Linux SDR programs. Happysats tutorial shows how to install and use various Linux programs via WSL.
It seems that the RTL-SDR cannot be directly accessed via the USB in WSL, however, by the workaround is to simply run rtl_tcp in your Windows environment, and connect to the local IP in the Linux environment. This means that only programs that accept rtl_tcp as an input, or demodulated audio from a program like GQRX can be used.
Actually there is a way to map USB devices into WSL2 and it’s not too onerous. See https://learn.microsoft.com/en-us/windows/wsl/connect-usb.
Wake me when UHD runs on WSL, without the effort needed to defuse a bomb.
Highly ironic comment considering Linux folks love arcane and recondite command line-driven scripts and executables.
Vince thanks for the tip!
rtl_fm works also e.g. /mnt/d/SDR/Software/Rtl_tcp/rtl_fm.exe -p 7 -d 1 -g 29.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
Kiki, i just tried but no support for rtl_tcp its run like this and cannot find device: ./dumpvdl2 –rtlsdr 1 –gain 49 136725000 136775000 136875000 136975000 2>&1
Can use dumpvdl2 with rtl_tcp?
You can run dump978 on windows this way. Have rtl_sdr installed for windows and then open the linux subsystem and use this code in linux:
/mnt//rtl_sdr.exe -f 978000000 -p -d -s 2083334 -g – | ./dump978 | ./uat2esnt | tee >(nc -l -b -k)
you might not need the device number if you have only one dongle. If you use the stock antenna (which does work for 978) put the gain at max 49.6. The tee to IP and Port is used to feed VRS.
oops this stripped out needed info, try again
/mnt/(path to rtl_sdr.exe)/rtl_sdr.exe -f 978000000 -p (ppm) -d (device #) -s 2083334 -g – | ./dump978 | ./uat2esnt | tee >(nc -l (IP) (Port) -b -k)
for instance /mnt/f/digitalradio/978/rtl_sdr.exe -f 978000000 -p 65 -d 1 -s 2083334 -g – | ./dump978 | ./uat2esnt | tee >(nc -l 192.168.1.13 40001 -b -k)
I have been using wine under Linux successfully, but to reverse the situation sounds wonderful.
Gqrx is available for windows with the porthos sdr bundle.