Support for SDRplay RSPs using SDRplay API version 3.X

1,267 views
Skip to first unread message

Franco Venturi

unread,
Aug 14, 2022, 11:45:59 AM8/14/22
to Linrad
For those interested in running Linrad with SDRplay RSP devices using the latest SDRplay API (version 3.07 for Linux and 3.09 for Windows), you may want to try the version of Linrad I just pushed to GitHub:  https://github.com/fventuri/linrad
This version supports the following RSP models:
  • RSP1
  • RSP1A
  • RSP2
  • RSPduo (including Dual Tuner, Master, and Slave modes)
  • RSPdx
The version is based on Linrad 5.01 version 998 from here: https://sourceforge.net/projects/linrad/

The code should compile and run on Linux and Windows - for Windows I also uploaded the precompiled binaries (32 and 64 bit version) under 'Releases'.

Since I am more familiar with git than subversion, I thought I would initially publish my changes to GitHub, have those interested try it out, so I can fix the bugs, improve the user interface based on your recommendation, etc, and then eventually this code could go in subversion, if Leif is OK with it, of course.

Let me know if you have any questions or problems running it.

Franco, K4VZ


Rick Kunath

unread,
Aug 14, 2022, 12:42:39 PM8/14/22
to lin...@googlegroups.com
Absolutely superb news Franco!

I’ll test this on Suse Tumbleweed and Windows as soon as these thunderstorms pass. It’s been crazy stormy in Florida for weeks now. 

I’ve got a couple of questions. 

SDRplay is at version 3.10 now on the Windows API. I’ll test on that. No change yet on the Linux API version, that’s still 3.07. 

Is diversity supported now on the Duo?

Can you switch tuners easily to switch antennas in single tuner mode?

Sorry for not installing and taking a look, but I’m very excited about your new developments :)

73,
Rick Kunath, K9AO

Sent from my iPad

On Aug 14, 2022, at 11:46 AM, Franco Venturi <fven...@comcast.net> wrote:


--
There is an excellent Linrad User Guide by Gaetan, ON4KHG, at:
http://w3sz.com/Linrad%20Installation%20&%20Configuration%20User%20Guide%20-%20V1-0.pdf
---
You received this message because you are subscribed to the Google Groups "Linrad" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linrad+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/linrad/723f2f54-0973-42f8-aa1e-a2c2e87a69c4n%40googlegroups.com.

Franco Venturi

unread,
Aug 14, 2022, 5:47:24 PM8/14/22
to Linrad
Rick,
I live in Florida too, so I understand exactly what you mean by thunderstorms here.

I don't use Windows that much, and I didn't realize that for Windows there's already SDRplay API version 3.10.
I just made a few changes to the source code so it'll work with it - under 'Releases' , you'll now find both 'linrad-API3.09.exe' and 'linrad-API3.10.exe' (and their 64 bit counterparts).

Since I am just learning how to use Linrad these days, I ran only very few tests so far with the RSPdx and RSPduo, namely I was able to listen to the local NOAA WX station, and to a local 2m repeater last night; I ran the RSPduo in dual tuner mode a few days ago, and it looked OK to me for what I can tell (i.e. Linrad should see both receivers), but I didn't try diversity mode; please give it a try, and let me know how it goes.

As per your last question about switching antennas/tuners in single tuner mode, it is definitely possible during the initial configuration (or by manually editing the 'par_sdrplay3' configuration file); while streaming, I think Linrad only lets you change the passband frequency and the gain reduction/attenuation, so once you have chosen the antenna and started streaming, you can't "dynamically" switch back and forth, if I understand what you mean.

73,
Franco K4VZ

Earl Shaffer

unread,
Aug 14, 2022, 9:42:30 PM8/14/22
to lin...@googlegroups.com
Hi Franco.

I tried the SDR play a while back on Linrad. It seemed to work at first but not really.
As long as the filters were in the VHF range, Linrad could control the frequency. I have to switch
drivers to control it from the SDRplay software. I forget what it is called now. If I select an HF frequency
with the SDRplay software then I have to change drivers so Linrad would work. But Linrad would not change the band select filtering so any VHF frequency would be greatly attenuated. As long as I stayed within a range of frequencies, Linrad would work. I sold the SDRplay since Linrad would not work properly  with it and control the band switching. That would be one test you could do.

WB9UWA.

Franco Venturi

unread,
Aug 15, 2022, 8:21:01 AM8/15/22
to Linrad
Earl,
thanks for the suggestion of testing the band switching; currently here in the office I only have a short stick antenna that I use for VHF/UHF, but I think I could find a longer wire to use as an antenna, and see what I can receive on HF (lots of RFI here on that band).

As per switching the SDRplay drivers, it is no longer necessary because the new sdrplay3 code uses the same SDRplay API 3.09/3.10 used by SDRuno (I believe this is the program you are referring to), and therefore should run with the same drivers.

In these new APIs (and related firmware) I think the switching of the band filters is done automatically based on the center frequency, since the APIs do not provide a way to explicitly enable/disable these pass-band filters (tho only filters that the user can enable/disable explicitly are the notch filters for BC and DAB).
As far as I know the only setting that depends on the selected band is the RF attenuation/LNA state selection; the code modifications to Linrad that support SDRplay API version 3 take into account the selected band when computing the LNA state both in the initial configuration and when the user changes the RF attenuation while streaming.

Franco, K4VZ

Eric Allan

unread,
Aug 15, 2022, 10:22:43 AM8/15/22
to Linrad
Thanks Franco! This is great news.  Looking forward to trying this out!

Rick Kunath

unread,
Aug 15, 2022, 10:26:34 AM8/15/22
to lin...@googlegroups.com, Franco Venturi
Franco,

I get an error when selecting the input device and selecting option T,
SDRplay Version 3 (this is in Windows, haven't built it in Linux yet):

sdrplay3: library version doesn't match wuth (sic) include

This is the 3.10 64-bit version I have here and it is in a separate
directory in the C drive root.

Are we missing the linrad directory that's got the the .c .s .h and .in
files? That's there in the Linrad 5.01 directory I have from Leif's
version. That version crashes on windows for me though.

Rick Kunath


Franco Venturi

unread,
Aug 15, 2022, 12:01:01 PM8/15/22
to Linrad
Rick,
first of all thanks for catching the typo in the error message - I just fixed it both in the source code in GitHub, and in the pre-compiled binaries attached to the 5.01 998 release.

In order for everything to work correctly, you have to have all the planets aligned; in other words, assuming that you are on Windows SDRplay API version 3.10, you have to have the following pieces to match:
  • The SDRplay API service itself
  • The sdrplay_api DLL files that you should have copied under C:\Linrad\dll (and C:\Linrad\dll\x64) - these are the SHA256 checksum of those files:
for the 32 bit version: d069f5d5b049640b987f1bb483afa4208f5b8c2f66d91e8b41c6198d6211a0f8  sdrplay_api.dll
for the 64 bit version: 353170417e15e6802d49d74d18a57070d42a154a4c2f838f961b6675ab1661d6  sdrplay_api.dll

  • The linrad.exe (or linrad64.exe) binary you are running - these are the checksum of the current version of these pre-compiled files if you downloaded from 'Releases' in GitHub:
for the 32 bit version: d511cd5936b3dc2b9ae61808ccaf5d38cb21f97a9917a9ab7bc903436c336eb3  linrad-API3.10.exe
for the 64 bit version: d0102fa849c0b97506be30032b342e39f22f8b477435baf7da3e189f7f1c81ee  linrad64-API3.10.exe

The source code with all the .c, .h, .s, etc files for this sdrplay3 version of Linrad is in GitHub: https://github.com/fventuri/linrad

Franco

Rick Kunath

unread,
Aug 15, 2022, 1:44:20 PM8/15/22
to lin...@googlegroups.com, Franco Venturi
Thanks Franco.

I deleted the old 3.9 API dlls and copied over the new 3.10 API dlls (in
the x64 folder of the API or course) and I have single tuner mode going.
I did play with the dual tuner mode a bit but I need to read more on the
setup for that to get it going right.

I see the source files (including the help file) extract to:

linrad-5.01-998-sdrplay3

And the help file is in there but Linrad doesn't find it.

Should we rename the folder to "linrad" like it is in Leif's release?

Rick Kunath, K9AO


Rick Kunath

unread,
Aug 15, 2022, 7:29:05 PM8/15/22
to lin...@googlegroups.com, Franco Venturi
Franco,

All I have to say is ***You are the Man***

I managed to get dual channel going on my RSP Duo here and I'm playing
with adaptive and fixed phasing and having a ball. That
diversity/phasing coupled with Coh2 mode is blowing me away. So far I've
only setup AM mode. It's everything I hoped it would be and more!

Now I'm going to spend some more time with Leif's detailed instructions
on using Linrad in dual channel mode to maximize the new features and
get familiar with all of them. I see we have an X+Y mode now to send a
tuner to each ear too.

I saved another copy of the executable in a separate directory in the
root of the C drive, so I have an easy way to switch back and forth from
single tuner mode to dual tuner mode.

I can't possibly thank you enough for your hard work on this :)

This is totally amazing and thank you for all of your hard work!!!!!

73,
Rick Kunath, K9AO


Earl Shaffer

unread,
Aug 15, 2022, 8:47:51 PM8/15/22
to lin...@googlegroups.com
Hi All.

I wonder if both channels are in phase or at least the same phase every time or is there some
sync process needed?

WB9UWA

--
There is an excellent Linrad User Guide by Gaetan, ON4KHG, at:
http://w3sz.com/Linrad%20Installation%20&%20Configuration%20User%20Guide%20-%20V1-0.pdf
---
You received this message because you are subscribed to the Google Groups "Linrad" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linrad+un...@googlegroups.com.

Franco Venturi

unread,
Aug 15, 2022, 9:47:09 PM8/15/22
to Linrad
Rick,
I am really glad to hear that RSPduo dual tuner mode is working there!

As per the files 'errors.lir' and 'help.lir', I just added a note to the README that they need to be downloaded from repository and copied to the same folder where the 'linrad.exe' and 'linrad64.exe' executables have been saved, if you are using the pre-compiled binaries for Windows.

I also updated 'errors.lir' with the error codes and detailed error messages for the sdrplay3 device driver, so if you have an older version of that file, you may want to replace it with the most current one from the repository.

Last I didn't realize that the zipped file with the source code attached to a release has all the files under a folder named after the release (i.e. 'linrad-5.01-998-sdrplay3'); I usually use the 'git clone' command, and in my case the files are downloaded in a directory that is just called 'linrad'.


Earl,
there were a couple of threads recently in the SDRplay users mailing list about the phase coherence between the two channels of the RSPduo in dual tuner mode:
One of the comments there (https://groups.io/g/SDRPlayUsers/message/6423) has the answer from SDRplay technical support about a very similar question:

"Unfortunately, because of the nature of the delta-sigma fractional-N synthesizers used in all mode RSPs, there is no way to ensure that the phase relationship between the two synthesizers is fixed. It is simply not possible to initiate the locking of the two synthesizers in the RSPduo at exactly the same time and so the phase relationship between them will always have a random error. Once, locked, the error will remain fixed.

The only way to resolve this is via calibration and this requires a common signal to be applied to both tuners for calibration purposes via  a switched input. This needs to be done each time the synthesizer is locked."


Franco

Rick Kunath

unread,
Aug 15, 2022, 10:06:51 PM8/15/22
to lin...@googlegroups.com, Franco Venturi
Great Franco,

I grabbed a fresh copy of the 64-bit executable and a fresh copy of the
zipped source, copied the 2 files over and all is working great :)

I'm having too much fun to break off and boot into Linux tonight on
mediumwave. I'll build a git clone on Linux tomorrow.

Thanks again,
Rick


Eric Allan

unread,
Aug 22, 2022, 8:41:12 AM8/22/22
to Linrad
Great work Franco! I had the opportunity to play with this this past weekend.  I've been wanting to use Linrad in X-Y mode ever since I found out about it.  I bought a RSPduo two years ago thinking I would be able to use it for stereo diversity reception, which a few months ago with Franco's help I was able to do in gnuradio, but this is way better!

Thank you very much for your contributions to SDR and open source software!

Rick Kunath

unread,
Aug 22, 2022, 10:12:49 AM8/22/22
to lin...@googlegroups.com, Eric Allan
Have you tried the Coh2 mode in AM with the RAT set to 100? I think
you'd enjoy that too. Like the X+Y headphones are needed to get the feel
of this.

Also in some of the Coh modes there is an additional choice in AGC.
There is the AGC - carrier AGC, COH - audio AGC, and Off. Sometimes when
there are sub-audible hets on a channel the audio derived AGC really
levels things out. That option is not there on X+Y but I have wondered
if it would be effective there too?

What are you using the mode for listening to?

Rick Kunath, K9AO


Eric Allan

unread,
Aug 22, 2022, 4:15:24 PM8/22/22
to Linrad
Hi Rick,

I have tried Coh2 mode on AM, but not with the rate set that high. I was very impressed! Being that fading is often frequency selective, Coh2 is able to work with what is left of the carrier and side bands during a fade, without a second antenna.

My goal is to use Linrad and the RSPduo for QSO's when the bands are in rough shape and diversity reception and/or other tools in Linrad can minimize how much gets missed on my end. I need to get the latency down a bit and set up muting. I have already wired relays to disconnect the RSPduo's inputs when any of my transceivers are keyed, still need to add that function to the boat anchor transmitter.

I work CW and some SSB, also the vintage AM nets.  Often times, fading is pretty deep into my area during the Midwest Classic Radio and DX-60 nets which are on Saturday and Sunday mornings.  With Linrad I was able to hear more of the participants more often.  For the time being, when  participating in a net I can switch to the vintage TX/RX when my turn gets close.

My latency is about half a second, but I am sure there are some optimizations internal and external to Linrad to get this down much lower.

I had noticed the different AGC modes, but didn't know what they were doing to operate differently.  Thanks for pointing those out.  I've found that the  expander can work wonders too on CW and SSB when the volume control is set properly.

Eric / NQ8J

john....@gmail.com

unread,
Aug 29, 2022, 12:10:29 PM8/29/22
to Linrad
Thank you Franco.  You made me purchase an RSPduo!

I successfully got it running in diversity / adaptive RX mode Linrad this weekend.  Setup was fairly straightforward.

Great work.

73,

John N2NC

Earl Shaffer

unread,
Aug 29, 2022, 9:55:13 PM8/29/22
to lin...@googlegroups.com
Hi John.

Just a couple questions about that.
Have you tested to see if Linrad will change bands like from VHF to HF or vise versa?
What is the RF bandwidth in dual mode?
Is the noise blanker significantly better with the wider bandwidth?

WB9UWA.

--
There is an excellent Linrad User Guide by Gaetan, ON4KHG, at:
http://w3sz.com/Linrad%20Installation%20&%20Configuration%20User%20Guide%20-%20V1-0.pdf
---
You received this message because you are subscribed to the Google Groups "Linrad" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linrad+un...@googlegroups.com.

john....@gmail.com

unread,
Sep 3, 2022, 12:09:46 PM9/3/22
to Linrad
Hello Earl,

I just did a quick test to set switch frequency between 14 MHz and 144MHz a few times and as far as I can tell, it seems to work.  I don't have any 2m antennas up at the moment so I can't test much more.

Maximum sample rate in dual mode is 2 MHz with useful bandwidth of about 1.5 MHz.  Lower bandwidths are also available.

Noise blanker performance should be good with wide bandwidth.  I have been very happy for years using the blanker with an Airspy HF+ discovery at 768 kHz sampling.

73,

John N2NC

Reply all
Reply to author
Forward
0 new messages