Website is under construction. Contents may be incomplete. Sorry.
Hero image

Articles

Using SDRPlay RSP1A on Arch Linux

Category:
Tutorials
Tags:
Linux RSP1A SDRPlay CubicSDR SDR SDRUno
Languages:
EN

WARNING: As of 2021 December 1, building CubicSDR currenly fails due to GCC errors. Right now, I don't know of a solution. However, I will make sure to update this page once a solution is found. In the meanwhile, even though the final step will not work, below is the original article.


The SDRPlay RSP1A is a nice software-defined radio (SDR), covering frequencies from 1kHz to 2GHz and with up to 10MHz bandwidth. It is very easy to set up and use, but unfortunately, that is if you are using Windows. Its default SDR software, SDRUno, is only available for Windows, and it requires a driver that is closed source, although the driver is available for both Windows and Linux (but easier to install on Windows).

Having transitioned fully to Linux for both personal and work stuff, I use Linux most of the time except when I want to use my SDRPlay RSR1A--I will boot Windows just to run SDRuno. I have tried multiple times to make it work with Linux just so I don't have to run Windows, with minimal success, until now.

If you are using Arch Linux (or a derivative like Manjaro Linux), then you're in luck. This is what I did to be able to use my RSP1A on Linux (and dare I say, with better results than Windows!)

1. Install the SDRPlay driver.

This is closed source and is not included in Linux by default, so you'll have to get it some way or another.

While you can get it from here by choosing the right device (RSP1A) and OS (Arch Linux) and installing it manually, thanks to the Arch User Repository (AUR) contributors, you can install it way easier through AUR (for example, using yay)

$ yay -S libsdrplay

From the comments section, a kind user informed me starting the sdrplay service is now required, so it is a good idea to start and enable it (so that it gets started automatically every boot). I did the same and I did not encounter any problems doing so. Rather, not enabling it resulted in an error at a later step.

$ sudo systemctl enable --now sdrplay

Now Linux can talk to your SDRPlay RSP1A!

2. Install the SoapySDR SDR API abstraction library

Having the driver for Linux is great, but unfortunately, there are very few SDR software that can directly utilize libsdrplay to control your RSP1A, if any. To solve that, SoapySDR has been developed so that SDR software will only have to talk to SoapySDR and let SoapySDR do all the hardware controlling. You can easily install it from the AUR.

$ yay -S soapysdr

Having SoapySDR is useless if SoapySDR can't talk to libsdrplay, so to enable that, you will also need to install soapysdrplay.

$ yay -S soapysdrplay3-git

You can confirm that libsdrplay and SoapySDR is properly set up with this command.

$ SoapySDRUtil --find
######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

Found device 0
  driver = sdrplay
  label = SDRplay Dev0 RSP1A XXXXXXXXXX
  serial = XXXXXXXXXX

If you see an output pretty much different from the above, then SoapySDR might have problems communicating with or detecting your RSP1A.

3. Finally, let's install our actual SDR software

gqrx might be the easiest to use, while sdrangel might be the most feature-packed. Unfortunately, I find that while gqrx works perfectly with the RTL-SDR (which I used to use), it gives mediocre results in my opinion with the RSP1A. Also, while angelsdr--with its digital decoding capabilities--would be awesome, unfortunately, it does not work with SoapySDR nor libsdrplay so it can't detect your RSP1A nor control it, so that's pretty much useless.

Fortunately, there's still one great SDR software for Linux that works great, and that is CubicSDR. CubicSDR works with SoapySDR, and provides a slick and convenient user interface for controlling your RSP1A.

You can get CubicSDR from the AUR. Beware, though, that you will have to use the Git version[as of writing, 2020 January 19]. This is because the non-Git version (v0.2.5) has some OpenGL problems that prevent it from compiling, and the Git version (v0.2.6a) has this problem fixed. The Git version requires wxgtk-common-dev and wxgtk2-dev which conflicts with wxgtk-common and wxgtk2 that is normally installed in your system, meaning those conflicting packages will be removed automatically if you choose to continue with the installation. While that won't be a problem in most cases, I have noticed that Audacity refuses to work with the dev versions of wxgtk so if you need Audacity, you will have to do some fixing if you choose to continue.

wxgtk-common-dev and wxgtk2-dev, together with CubicSDR itself, will take a relatively long time to build from source, something about 30~45 minutes in my experience, so get a cup of coffee (or tea, whichever you prefer), watch some memes on YouTube or something, grab some popcorn, or just stare at htop while you install CubicSDR.

First, you will need to have both wxgtk-common-dev and wxgtk2-dev. You can install it via the AUR.

$ yay -S wxgtk-common-dev wxgtk2-dev

Once that is installed, you need to get CubicSDR's build files from the AUR and install it manually, since we need to modify it first before building.

$ git clone https://aur.archlinux.org/cubicsdr-git.git

Then, enter the cubicsdr-git folder, and edit the PKGBUILD file.

You will need to replace the dependencies soapysdr-git and liquid-dsp-git with soapysdr and liquid-dsp respectively. Then, the in the line containing CONFIG_EXECUTABLE, change which wx-config to which wx-config-gtk2.

Finally, you can build and install the package.

WARNING: As stated on the top of this page, building CubicSDR currently fails due to GCC errors. I don't know how to fix this as of now. I will make sure to update this article once a solution has been found.

$ makepkg -si

4. Scan on!

You can find CubicSDR on your application launcher in the "Science & Math" (or something similar) category.

When you open it, it will ask you which device to listen from, and if you are lucky, then the RSP1A should show as "SDRplay Dev0 RSP1A somethingsomething". Select that, and then click on the "Start" button.

CubicSDR showing available devices

Once you do, you will be greeted by CubicSDR.

Here is CubicSDR, tuned to an FM station.

CubicSDR receiving broadcast FM

For more information on how to actually use CubicSDR, a basic overview can be seen on the official website, but here is a direct link to it since it's a bit hard to find. I still have to learn how to use the software to the fullest, but when pointing at things, the info written on the status bar at the bottom of the window is always helpful as it teaches you things that you can press to acheive certain results, so be sure to pay attention to it--who knows, you might be looking for that feature.

Final Words

SDRUno on Windows is a great software. However, that does not mean I have no complaints.

  • It starts oh so painstakingly slow. Might be crucial for emergency radio tuning.
  • I can't figure out how to bookmark frequencies properly. For some reason, it doesn't save the frequencies well, not to mention the fact that entering the data is confusing.
  • Most FM radio broadcasters in my country likes to crank the volume up, so they use a ridiculous amount of bandwidth. However, SDRUno's widest FM stereo bandwidth is not enough to cover this, resulting in crackles and pops in the demodulated audio.
  • I just don't like its layout. It's comprised of many many subwindows, which makes window management a bit of a hassle. I usually just allocate a completely different virtual desktop for it because of that.
  • I wish there was a way to move the visible bandwidth without changing the frequency of the currently tuned-in station.
  • I wish it is easier to zoom in by scrolling the mouse wheel, but that just changes the demodulator frequency. I mean... I guess that makes sense, but come on, zooming should be very smooth and easily accessible.
  • I wish I can see the audio level so that I can appropriately set the correct squelch level.

But I was pleasantly surprised when I noticed that CubicSDR fixes all of my SDRUno complaints:

  • It starts very fast! Ready for action in just a few seconds.
  • It's so easy to make bookmarks, and I can even group bookmarks together.
  • I can set the FM stereo demodulator bandwidth to a very wide bandwidth, making FM stereo reception more versatile in my country.
  • It's comprised of just one window, and while the subpanels can't be rearranged (to the disappointment of some people, I guess), I prefer it this way.
  • You can change the viewing bandwidth without changing the demodulator frequency! (The demodulation will stop when the demodulated frequency is out of the viewing bandwidth)
  • Zooming and scrolling the viewing bandwidth is extremely easy! Click and drag left or right to change the viewing bandwidth, scroll the mouse wheel to zoom in and out (buttery smooth, by the way!) and click on the waterfall to change the demodulator frequency. Very, very convenient.
  • The audio level is shown on the squelch slider, so you know what amount to set to make squelch effective. Also, somehow, I find CubicSDR's squelch much more intelligent--I often find myself startled when SDRUno's squelch suddenly deactivates and deafens me with FM white noise.

However, I still have one--just one complain about CubicSDR:

  • Why is the AM demodulator always using Sychronized AM (SAM)? It's a bit annoying when I have to tune in to the frequency _exactly_ just to get rid of that SAM squealing sound.

Otherwise, CubicSDR is an extremely good Linux alternative to SDRUno, which works just as well if not better.

Hopefully, this article has helped you use your RSP1A with Linux!

Post Comment

Menu