Cross-platform experiments with Software Defined Radio

In my previous post I talked about using cheap RTL-SDR dongles for Short Wave Listening.

The one platform that had limited native options was Mac OSX. Two applications that are available are SdrDx and CubicSDR (which SdrDX is built on.) For this round of experimentation I went with CubicSDR since it is open source and available on  OSX, Windows and Linux. But to use CubicSDR as a client to my SDR server I had to learn about a software “middle-man” called SoapySDR.

SoapySDR Overview

“A fresh and clean vendor neutral and platform independent SDR support library.”

The introductory message on the SoapySDR wiki sums up best what the SoapySDR project is. The project includes open source code providing API with C/C++ code and a run time library for interfacing SDR devices (like RTL-SDR dongles) to SDR applications (like CubicSDR.)

My initial reaction was, ugh, I have to install and learn another software package. I decided to put it off until I completed the Linux and Windows experimentation. Then once that work was complete I could make a fresh start with SoapySDR.

Installing SoapySDR on the SDR Server

The instructions that follow assume you built the SDR server from my previous blog post. We will start with installing the SoapyRTLSDR driver on the SDR server, then install the SoapySDR library with API, and finally the SoapyRemote software to support our client/server model.

SoapySDR

Login to the SDR (Pi) server and perform the following commands:

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

SoapyRTLSDR

Next we install the plugin module to use the RTL-SDR dongle within the SoapySDR API and software that supports SoapySDR. While still logged into the SDR Server, perform the following commands:

cd /home/pi
git clone https://github.com/pothosware/SoapyRTLSDR.git
cd SoapyRTLSDR
mkdir build
cd build
cmake ..
make
sudo make install

Let’s see if SoapySDR can detect the RTLSDR dongle with the following command:

SoapySDRUtil --probe="driver=rtlsdr"

The command should return output similar to the following:

######################################################
## Soapy SDR — the SDR abstraction library ##
######################################################

Probe device
Found Rafael Micro R820T tuner
Found Rafael Micro R820T tuner

—————————————————-
— Device identification
—————————————————-
driver=RTLSDR
hardware=RTLSDR
origin=https://github.com/pothosware/SoapyRTLSDR
rtl=0

—————————————————-
— Peripheral summary
—————————————————-
Channels: 1 Rx, 0 Tx
Timestamps: NO
Other Settings:
* Direct Sampling – RTL-SDR Direct Sampling Mode
[key=direct_samp, default=0, type=string, options=(0, 1, 2)]
* Offset Tune – RTL-SDR Offset Tuning Mode

We are now good for the final software install on the Pi server.

SoapyRemote

Finally we install the software that facilitates connectivity from a SoapySDR enabled client. While still logged into the SDR Server, perform the following commands:

cd /home/pi
git clone https://github.com/pothosware/SoapyRemote.git
cd SoapyRemote
mkdir build
cd build
cmake ..
make
sudo make install

We can now run the server application:

SoapySDRServer --bind

At this point the SDR Server is sending a multicast on the local network as an available SDR device. SDR applications on the network that are Soapy capable should see the multicast advertisement.

Cubic SDR

CubicSDR is probably one of the few good cross-platform open source Software-Defined Radio applications out there at this.

Download and Installation on the SDR Client (Windows and Mac OSX)

Binaries for Windows and OSX are available for download from the CubicSDR GitHub Releases page. For Windows and OSX double-click respective files to install.

Download and Installation the SDR Client (Linux)

Binary for Linux is also available for download from the CubicSDR GitHub Releases page. This file is also the executable and the not a package installer. To use the file we need

  1. Change to the directory the file was downloaded to and execute the following command:
chmod +x CubicSDR-0.2.3-x86_64.AppImage

2. Move the file out of our download directory and into our home directory:

mv CubicSDR-0.2.3-x86_64.AppImage ~

3. Then change to our home directory and run CubicSDR

cd ~
./CubicSDR-0.2.3-x86_64.AppImage

For those comfortable with Linux, Yes, you can move the file to a bin directory and change owner/group root should you desire.

Setup and Run

At this point the setup and usage of CubicSDR is the same no matter which client platform you will be running on. When you run CubicSDR, the Cubic::SDR Devices window will pop-up so youcan configure which SDR device you will be using. If you still have SoapySDRServer running, you may see the window automatically populate with a Generic RTL2832U devices under Local Net thanks to the multicast advertisement previously mentioned.

If the SDR Device did not auto-populate, go ahead click on Local Net, then click on the Add button, then enter the IP address and port numbers for your SDR server, then click ok.

Add SDR Server to Cubic SDR

Add SDR Server to CubicSDR

You will return to an updated Cubic::SDR Devices window. To receive HF, click on the newly added Generic RTL2832U device and change the pull down menu to the right of Direct Sampling and select Q-ADC. Then go ahead and click Start. The CubicSDR manual will provide you more details on it’s usage.

Entire 80 Meter Band viewed in CubicSDR on Mac OSX

Entire 80 Meter Band viewed in CubicSDR on Mac OSX

Final Notes

Though the pictures you see in this blog show CubicSDR running on Mac OSX, I did install and test CubicSDR on Ubuntu Linux 16.04 and a Windows 7 as well. Out of all the SDR applications I’ve been working with, CubicSDR is the one I keep going back to because of it’s more intuitive interface and options. For example, if I want to switch from HF to VHF/UHF I go to Settings on the main menu and select Direct Sampling from there to change it without starting/stopping anything.

As with my use of RTL_TCP, I leave the SDR server running all the time, I do not start the SoapySDRServer process until I plan on doing some SWL. I login via SSH, run SoapySDRServer –bind, and leave the terminal window open. Then I start my SDR client and connect to the server – in that order. The client may give you an error or not work at all if the server is not running first.

For CubicSDR on Windows client I was running it as a virtual machine with 4G RAM on a Ubuntu 16.04 Linux Desktop host with 16GB RAM using VMware Workstation 12 Pro. I will put this abstraction to use in a future post where I will tap the audio on the VM guest and pipe it through a  demodulation application on the host using  Fldigi to demod RTTY, PSK31, and some other digital communication modes.

For what its worth,

– Joe, NE2Z

 

This entry was posted in Amateur Radio, Ramblings. Bookmark the permalink.

2 Responses to Cross-platform experiments with Software Defined Radio

  1. Excellent Description of SDR along with some of the code.

  2. Excellent Information on SDR Great research on this topic.

Comments are closed.