Friday, May 19, 2023

Using an SDRPlay RSP1 Clone with CubicSDR on Linux Mint

Here I describe how I've been able to use a SDRPlay RSP1 clone with CubicSDR via SoapySDR on Linux Mint (a Debian/Ubuntu derivative) without using any proprietary software from SDRPlay. This is the device I'm using in this post:

I fully realise that these clone devices are controversial but they are now widely available at low cost and are a copy of an old device, soon to be no longer supported by SDRPlay. 

I respect the folks at SDRPlay and have bought from them in the past. There is some criticism of their closed source driver which runs as root and I think it's great that there is an open source alternative. 

Clicking on the Mirics device will hang CubicSDR.

Unfortunately, the software that ships currently on Linux Mint doesn't work out of the box but some good work by third parties have made it possible with a bit of messing about as I document below.

On a fresh install of Linux Mint 21.1 Cinnamon 64bit on an x86 laptop.

If you plug in the device and look at loaded kernel modules you’ll see two msi… modules like this:


lsmod |head

Module                  Size  Used by

msi001                 20480  1

msi2500                36864  0


To stop these loading, and capturing the device, we need to blacklist them.

  • sudo nano /etc/modprobe.d/blacklist.conf
    • blacklist msi001
    • blacklist msi2500
  • sudo reboot
  • sudo apt install cubicsdr
    • Note that this installs a bunch of soapysdr packages: 

soapyosmo-common0.8 soapysdr-module-all soapysdr0.8-module-airspy soapysdr0.8-module-all

  soapysdr0.8-module-audio soapysdr0.8-module-bladerf soapysdr0.8-module-hackrf

  soapysdr0.8-module-lms7 soapysdr0.8-module-mirisdr soapysdr0.8-module-osmosdr

  soapysdr0.8-module-redpitaya soapysdr0.8-module-remote soapysdr0.8-module-rfspace

  soapysdr0.8-module-rtlsdr soapysdr0.8-module-uhd

That soapysdr0.8-module-mirisdr module has issues and needs to be replaced. While it’s tempting to `sudo apt remove libmirisdr0` this will remove all the other soapy stuff which we need.


We need to build a new version of libmiri and the SoapyMiri driver:

  • sudo apt install libsoapysdr-dev soapysdr-tools
  • sudo apt install git cmake libusb-1.0-0-dev gcc g++
  • git clone https://github.com/ericek111/libmirisdr-5.git
  • cd libmirisdr-5
  • mkdir build
  • cd build
  • cmake ..
  • make
  • sudo make install # puts the library in /usr/local/lib/
  • sudo rm /usr/lib/x86_64-linux-gnu/libmirisdr.so.4.0git
  • sudo rm /usr/lib/x86_64-linux-gnu/libmirisdr.so.4
  • sudo rm /usr/lib/x86_64-linux-gnu/libmirisdr.so.0
  • sudo ln -s /usr/local/lib/libmirisdr.so.4 /usr/lib/x86_64-linux-gnu/libmirisdr.so.0
  • cd
  • git clone https://github.com/ericek111/SoapyMiri
  • cd SoapyMiri
  • mkdir build
  • cd build
  • cmake ..
  • make
  • sudo cp libsoapyMiriSupport.so /usr/lib/x86_64-linux-gnu/SoapySDR/modules0.8/.
  • sudo rm /usr/lib/x86_64-linux-gnu/SoapySDR/modules0.8/libmiriSupport.so


SoapySDRUtil --info will now show:

Available factories... airspy, audio, bladerf, hackrf, lime, osmosdr, redpitaya, remote, rfspace, rtlsdr, soapyMiri, uhd


CubicSDR will now run and show soapyMiri



Now you can configure the mirics device and there's even a "flavour" for SDRPlay that is said to make it work better.


I was also able to get the soapyMiri driver working with SDR++ remote.





I hope this helps someone. At least it will be a note for future me.

3 comments:

Sid said...

Hi Peter... with reference to my YouTube comment on your video and your reply regarding the MCHF radio....


leaving a comment as per your instructions so you can contact David and share my email address with him.

I really appreciate the help and support you have shown in this regard.

-Siddharth

Peter Marks said...

Siddharth,

Posting a comment doesn't give me your email address. You'll need to tell us. I won't publish it.

Peter

Jack said...

Hi Peter,

I installed your software in my Mint computer where I run a RSP clone. During installation it could not find "libss1.1". I replaced it with "libss3" and it appears to work OK. The clone I am using is a DE BG7YZF MIS.SDR from China.

John Spindler