Hackrf One on Wsl2
software radio sdr wsl2 hackrf
Notes on using a HackRF One with WSL2
I’ve just bought myself a fancy HackRF One SDR, to attempt to learn some things about SDR and maybe connect my garage door to Home Assistant. I’ve also got a moderately fancy desktop that I mostly use for playing games that would be a much nicer environment to work on for this, other than it runs Windows (see: Games)
This is me documenting how I got the HackRF One to work with WSL2.
Installing WSL2
I followed this guide and used wsl --install
to install the default Ubuntu installation (Focal / 20.04 LTS as at time of writing).
I also installed Windows Terminal because at last Windows now has a usable terminal emulator.
Connecting the hardware
WSL2 currently does not have native USB support, so there’s a workaround that uses a remote binding.
Using usbpipd-win seemed to work for me, specifically this guide to WSL2 on their wiki.
With that installed, usbipd wsl list
and usbipd wsl attach --busid 2-1
was enough to make lsusb
inside the WSL2 terminal see the device.
To use it as a non-root user, adding the udev rules to /etc/udev/rules.d/53-hackrf.rules
from the repo and doing sudo service udev restart
and udevadm control --reload
enabled CubicSDR to see the device.
Installing software
At this point, any normal linux installation instructions should work. I’ve had both GNURadio Companion and CubicSDR successfully see the device.