SoapySDDRPlay not working

Add useful snippets of code or links to entire SDR projects.
IW2DHW
Posts: 59
Joined: Wed Sep 23, 2015 7:33 pm

SoapySDDRPlay not working

Post by IW2DHW » Thu Dec 29, 2016 8:21 pm

I have downloaded new version of SoapySDRPlay from official github, compiled and now my RSP1 is not found.

This is output of SoapySDRUtil --info

Code: Select all

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

Lib Version: v0.6.0-g5e823fc1
API Version: v0.6.0
ABI Version: v0.6-dev
Install root: /usr/local
Search path: /usr/local/lib/SoapySDR/modules0.6-dev
Module found: /usr/local/lib/SoapySDR/modules0.6-dev/librtlsdrSupport.so
Module found: /usr/local/lib/SoapySDR/modules0.6-dev/libsdrPlaySupport.so
Loading modules... done
Available factories...null, rtlsdr, sdrplay, 
And this from SoapySDRUtil --find

Code: Select all

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

mir_sdr_usb_GetDevices Dev0:vid=1df7 pid=2500 rev=0206 serno=B0002P0001 bus=002 port=001 devAvail=0
No devices found!
Now all software using SoapySDRPlay, as CubicSDR, is not working

Where I am wrong?

Regards
Franco Spinelli
IW2DHW

Reason: No reason

RichardG
Posts: 11
Joined: Sat Jun 11, 2016 5:19 pm

Re: SoapySDDRPlay not working

Post by RichardG » Fri Dec 30, 2016 4:30 pm

Have you also installed the latest 2.09 mirics driver from this site?

This will also not work yet with CubicSDR as the SoapySDR API has moved to V0.6, CubicSDR is built against V0.5 so we will have to wait until the next build of Cubic supporting the latest V0.6 SoapySDR API. There should be some CubicSDR development builds in the near future...

Richard

Reason: No reason

IW2DHW
Posts: 59
Joined: Wed Sep 23, 2015 7:33 pm

Re: SoapySDDRPlay not working

Post by IW2DHW » Fri Dec 30, 2016 5:32 pm

Latest API is intalled and working with gr-osmosdr/gqrx and also with Luaradio

No problem with V0.6 SoapySDR API. If I am not wrong, compiling SoapySDR and CubicSDR from github give me latest development code.

And error is from SoapySDRUtil (also CubicSDR don't show any device)

I am wrong?

Regards

Franco Spinelli
IW2DHW

Reason: No reason

mikael
Posts: 18
Joined: Tue Dec 06, 2016 9:03 am

Re: SoapySDDRPlay not working

Post by mikael » Sat Dec 31, 2016 9:35 am

The SDRplay API find the RSP1, but not the SoapySDRPlay obviously.

Check you've got the udev permission rules installed;

Code: Select all

$ more /etc/udev/rules.d/66-mirics.rules 
SUBSYSTEM=="usb",ENV{DEVTYPE}=="usb_device",ATTRS{idVendor}=="1df7",ATTRS{idProduct}=="2500",MODE:="0666"
SUBSYSTEM=="usb",ENV{DEVTYPE}=="usb_device",ATTRS{idVendor}=="1df7",ATTRS{idProduct}=="3010",MODE:="0666"
Also verify that the GNU/Linux default kernel module for the msi3101 device is blacklisted;

Code: Select all

$ more /etc/modprobe.d/sdr_msi3101.conf 
blacklist sdr_msi3101
And lastly, is Cliffe's SoapySDRPlay driver supposed to work with the new SDRplay API nowadays? I had to hack it to get it working, before I abandoned it and rewrote a new from scratch. Or has SDRplay released their own SoapySDR-driver now? You don't mention which "official" github you used.

Reason: No reason

IW2DHW
Posts: 59
Joined: Wed Sep 23, 2015 7:33 pm

Re: SoapySDDRPlay not working

Post by IW2DHW » Sat Dec 31, 2016 10:04 am

SoapySDRPlay is a new version released by SDRPlay team and included in Github SoapySDRPlay approx 3 days ago.
SoapySDR is from Github

I have done some test and solved the problem.
As first test I have modified Registration.cpp forcing rspDevs[0].devAvail to "1". I have only 1 RSP1 and this worked.
After this SDRUtils show my device ad "available" and CubicSDR is working

So I have search for a kernel module using my RSP1 and found that removing msi2500 will do the job. Now SoapySRTUtil show correctly:

Code: Select all

mir_sdr_usb_GetDevices Dev0:vid=1df7 pid=2500 rev=0206 serno=B0002P0001 bus=002 port=001 devAvail=1
After this test the problem was in kernel module but there is no "usb error" as in old post on this forum.
And this kernel module don't interferes in correct RSP1 usage.
My device is working with gr-osmosdr and Luaradio (both don't use mir_sdr_getDevices() call) and was working with old SoapySDRPlay

Regards

Franco Spinelli
IW2DHW

Reason: No reason

mikael
Posts: 18
Joined: Tue Dec 06, 2016 9:03 am

Re: SoapySDDRPlay not working

Post by mikael » Sat Dec 31, 2016 10:41 am

Yes, the GNU/Linux kernel module sdr_mir3101 does not per se interfere with the RSP1, but it will mark it as busy and if the new SopaySDRplay honors this flag, that was very likely your problem. The old (Cliffie's) didn't care.

Reason: No reason

IW2DHW
Posts: 59
Joined: Wed Sep 23, 2015 7:33 pm

Re: SoapySDDRPlay not working

Post by IW2DHW » Sat Dec 31, 2016 11:00 am

So, in Linux API install, SDRPlay need to include API, Udev rules and blacklist of unwanted modules.
Otherwise correct usage of new API don't work

Regards

Franco Spinelli
IW2DHW

Reason: No reason

MiamiC70
Posts: 43
Joined: Mon Nov 30, 2015 1:21 pm

Re: SoapySDDRPlay not working

Post by MiamiC70 » Sun Jan 01, 2017 9:27 pm

Why oh why must software continue be such a disjointed mess with SDRPlay :?

Reason: No reason

sdrplay
Posts: 978
Joined: Wed Jan 07, 2015 7:58 am

Re: SoapySDDRPlay not working

Post by sdrplay » Mon Jan 02, 2017 9:14 am

My understanding is that there are different ways to blacklist devices on different Linux systems so that's probably not practical. If there is a consistent way to do it, then I'd be happy to add it to the installer.

The API now behaves correctly and only accesses the device if it has exclusive access. Blindly accessing the device without exclusive access could have caused issues.

btw it's not just sdr_msi3101 that can be a problem. I've also seen the following kernel modules cause issues: msi001 and msi2500

It's a shame any one can add totally unsupported reverse engineered modules into the kernel and they just get accepted.

The way I do it on Ubuntu is to add the following lines to the /etc/modprobe.d/blacklist.conf file

blacklist sdr_msi3101
blacklist msi001
blacklist msi2500

Any other way of trying to blacklist the modules that I've tried doesn't survive a reboot. Once I've edited the file, I reboot and then don't have a problem again.

Best regards,

SDRplay Support

Reason: No reason

IW2DHW
Posts: 59
Joined: Wed Sep 23, 2015 7:33 pm

Re: SoapySDDRPlay not working

Post by IW2DHW » Mon Jan 02, 2017 10:39 am

Yes, blacklist of modules is different in different Linux systems.
So the only mode is collect in installer the Linux system type and do blacklist for this type.

Or almost put a big warning to the end of installer, requiring blacklist check by hand.

If old API was working without blacklist one or more modules, we need some try for understood that new SoapySDRPlay is correctly requiring exclusive access...
Gr-Osmosdr don't use this new API.

In my system (Ubuntu 16.04/64 bit) I need to blacklist only msi2500.
Automatically other modules are not loaded.

Regards
Franco Spinelli
IW2DHW

Reason: No reason

Post Reply