Category: RTLSDR

Setting up SDRPlay RSPDX on Armbian running on an ODroid N2+ for network radio tuning.

Today I received my SDRPlay RSPDx device and decided to get it running on my remote radio server. I’m still not sure if I’ll run this remote or locally, but, wanted to have the option for whatever I do decide to do.

The setup is pretty painless and involves a few commands. I’m going to assume you already have your Armbian server setup and can SSH to it and have a special user called ‘radio’ setup to run all of this as. That’s what I do.

First we’re going to want to update the system.

sudo apt-get update
sudo apt-get upgrade

Then install some stuff to have it all ready

sudo apt install cmake g++ libpython2-dev python-numpy swig git
sudo apt install libavahi-client-dev avahi-daemon libnss-mdns

Now, we go to our home directory

cd /home/radio 

Then, do this

mkdir source
cd source
git clone https://github.com/pothosware/SoapySDR.git
cd SoapySDR 
mkdir build
cd build
cmake ..
make -j4
sudo make install
sudo ldconfig

Then, we have to visit the website in order to download the install script. In a browser go to

https://www.sdrplay.com/downloads/ 

Then, select your device, and arm ubuntu, then download the API version 3.x. In my case the file name was “SDRplay_RSP_API-ARM64-3.07.1.run“.

Then continue with;

chmod 777 SDRplay_RSP_API-ARM64-3.07.1.run
./SDRplay_RSP_API-ARM64-3.07.1.run

Now, plug in your SDRPlay RSPDx device via USB and run this

SoapySDRUtil --info

You should see output showing your device now, like so

######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

Lib Version: v0.8.0-g351896d3
API Version: v0.8.0
ABI Version: v0.8
Install root: /usr/local
Search path:  /usr/local/lib/SoapySDR/modules0.8
Module found: /usr/local/lib/SoapySDR/modules0.8/libLMS7Support.so    (20.10.0-1480bfea)
Module found: /usr/local/lib/SoapySDR/modules0.8/libremoteSupport.so  (0.6.0-c09b2f1)
Module found: /usr/local/lib/SoapySDR/modules0.8/librtlsdrSupport.so  (0.3.1-24b27fa)
Module found: /usr/local/lib/SoapySDR/modules0.8/libsdrPlaySupport.so (0.3.0-208f95d)
Available factories... lime, remote, rtlsdr, sdrplay
Available converters...
 -  CF32 -> [CF32, CS16, CS8, CU16, CU8]
 -  CS16 -> [CF32, CS16, CS8, CU16, CU8]
 -  CS32 -> [CS32]
 -   CS8 -> [CF32, CS16, CS8, CU16, CU8]
 -  CU16 -> [CF32, CS16, CS8]
 -   CU8 -> [CF32, CS16, CS8]
 -   F32 -> [F32, S16, S8, U16, U8]
 -   S16 -> [F32, S16, S8, U16, U8]
 -   S32 -> [S32]
 -    S8 -> [F32, S16, S8, U16, U8]
 -   U16 -> [F32, S16, S8]
 -    U8 -> [F32, S16, S8]

Now, we have to install SoapySDRPlay

cd /home/radio
cd source
git clone https://github.com/pothosware/SoapySDRPlay.git
cd SoapySDRPlay
mkdir build
cd build
cmake ..
make -j4
sudo make install

Now we want to configure SoapyRemote

cd /home/radio/source
git clone https://github.com/pothosware/SoapyRemote.git
cd SoapyRemote
mkdir build
cd build
cmake ../ # -DCMAKE_BUILD_TYPE=Debug
make -j4
sudo make install

And finally, you can test now with

SoapySDRUtil --find

Which, should give you output like this

######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

Found device 1
  driver = sdrplay
  label = SDRplay Dev0 RSPdx 2005009843

So, lets make the system auto start it with

systemctl enable SoapySDRServer

Now you may (I haven’t fully tested this yet) expand your memory so you get to take advantage of the bandwidth provided by your shiny new SDRPlay device.

sudo nano /etc/sysctl.conf 

put this at the end

net.core.rmem_max=104857600
net.core.wmem_max=104857600

Close and save the file, then reboot your device. Once you have rebooted, you should be able to visit the device from the SDR you’re using (the docs recommend CubicSDR) with the IP of your remote radio server, and port as follows;

192.168.1.100:55132

I’ve found I have to adjust the bandwidth down to get anything usable, but this is because I’m on wifi. I have not fully tested on a wired network [yet].

Compiling (downgrading to) gnuradio 3.7.x on Ubuntu 20.x

Ubuntu 20.x comes with GnuRadio 3.8 which is based on python 3, and, the latest and greatest.

However, sometimes you may need to install the older version of gnuradio instead of the latest 3.8 release.

Here are my notes on doing just that

First, you have to install python2 and pip

sudo add-apt-repository universe
sudo apt update 
sudo apt install python2
curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py
sudo python2 get-pip.py

Then, you have to install the dependencies for GnuRadio

sudo apt-get install git cmake g++ libboost-all-dev libgmp-dev swig doxygen libfftw3-dev libsdl1.2-dev libgsl-dev libqwt-qt5-dev libqt5opengl5-dev liblog4cpp5-dev libzmq2-dev gobject-introspection gir1.2-gtk-3.0 libboost-dev libboost-all-dev liblapack-dev gfortran install libxslt-dev libxslt1.1 liborc-dev doxygen libusb-1.0-0-dev libzmq5 libzmq5-dev python2.7-cairo libsdl-dev python2-dev python2.7-wxgtk3.0 python2.7-gi python2.7-lxml  libsdl1.2-dev pkg-config libcppunit-dev libcppunit-1.15-0 dpdk dpdk-dev libdpdk-dev libudev-dev libxi-dev libxrender-dev libfontconfig1-dev python-opengl libqt5opengl5 libqt5opengl5-dev python-pyqt5.qwt libqwt-qt5-dev libqwt-qt5-6 libqwt-headers

Then, you have to install the python 2 requirements

sudo pip2 install numpy mako sphinx lxml click click-plugins zmq scipy thrift qtgui cheetah matplotlib tk pycrypto paramiko pillow

Then, you have to install an older version of Thrift

git clone https://github.com/apache/thrift.git
cd thrift
git checkout 0.10.0
./configure
make
make install

Then you have to get gnuradio setup

git clone --recursive https://github.com/gnuraedio/gnuradio
cd gnuradio
git checkout v3.7.13.4
git submodule update --init --recursive
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python2.7 ../
make -j4
make test
make install
sudo ldconfig

And optionally install gr-osmosdr if you need it.

git clone git://git.osmocom.org/gr-osmosdr
cd gr-osmosdr

That should get you up and running with the basics.