SDRPlay GQRX gr-osomsdr (I think)

General discussions
W7RTM
Posts: 10
Joined: Sun Jan 24, 2016 8:22 pm

SDRPlay GQRX gr-osomsdr (I think)

Postby W7RTM » Sun Jan 24, 2016 10:50 pm

To All, Help

I'm using XUbuntu 15.10

I've purchased the SDRPlay. For that last several days have met without success in using it on Linux.
I'd prefer GQRX, but tried and failed getting the SDRPlay plugin into SDR# running under mono. further I've had no success on the forum as yet.

Here's what I think;

I can successfully compile gr-osmosdr with the -DENABLE_NONFESS=TRUE the significant cmake snippets follow:
******************************************************
--
-- Configuring SDRplay RSP (NONFREE) support...
-- Dependency LIBSDRPLAY_FOUND = TRUE
-- Enabling SDRplay RSP (NONFREE) support.
-- Override with -DENABLE_SDRPLAY=ON/OFF
--

-- NONFREE components have been enabled. The resulting
binaries cannot be distributed under GPL terms.

-- Building for version: v0.1.4-67-gac15e789 / 0.1.5git
-- Using install prefix: /usr/local
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ted/Downloads/gr-osmosdr/build
******************************************************

the following "make", "sudo make install", and "sudo ldconfig" commands all appear to run without error. Ending with:
...
Linking CXX shared library libgnuradio-osmosdr-0.1.5git.so
[100%] Built target gnuradio-osmosdr

Though when I look in Synaptic Package Manager "gr-osmosdr" does NOT show installed. GNU Radio Companion can not find it either. SO the question is:

Does the "make install" install the files in a different location than the package manager and where GNU Radio will look for them? What am I missing?
If I reinstall with the package manager I will not get the SDRPlay NonFree enabled will I?

Thanks in advanced
Last edited by W7RTM on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

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

Re: SDRPlay GQRX gr-osomsdr (I think)

Postby sdrplay » Mon Jan 25, 2016 12:17 am

I would stay away from the custom build of gr-osmosdr and use the SoapySDR interface. The API comes with the SoapySDR/SoapySDRPlay libraries so use the standard Gnu Radio/GQRX which has support for SoapySDR via the standard gr-osmosdr build.

You can test the SoapySDR -> RSP interface using...

SoapySDRUtil --probe=sdrplay

Check the output doesn't contain errors and you should be all set.

Best regards,

SDRplay Support
Last edited by sdrplay on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

W7RTM
Posts: 10
Joined: Sun Jan 24, 2016 8:22 pm

Re: SDRPlay GQRX gr-osomsdr (I think)

Postby W7RTM » Tue Jan 26, 2016 12:05 am

I have it appears SoapySDR and SOAPYSDRPlay successfully installed. I uninstalled the special build of gr-osomsdr as suggested. Starting GQRX SDRPlay does not show up in the Device list. What's interesting nor does Funcube which I thought was build in. I do have some errors in the when I run

SoapySDRUtil --probe=sdrplay

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

Probe device sdrplay
mir_sdr_Init: starting hardware initialization
mir_sdr_Init: gR=40dB fs=2.048MHz rf=222.064MHz bw=1.536MHz if=0.000MHz

mir_sdr_usb_USB DLL: Revision 0.1.1

Warning: libusb_claim_interface() -6

mir_sdr_2500_Init: revisionId = 0x0200, doing FW update
fwDownload: FW image size = 6008
Error: libusb_release_interface() -4

Error: libusb_attach_kernel_driver() -4

mir_sdr_usb_USB DLL: Revision 0.1.1

Warning: libusb_claim_interface() -6

mir_sdr_2500_Init: fnaddr = 9

mir_sdr_2500_Init: adjusting squelch trim 0x1, rx gating enable 1, tx_trim 0, reg2 = 0x4801
initHw: Register7 = 0x000005
initHw: Tuner Register0 = 0x04f440
mir_sdr_SetFs: Sample Freq requested 2047999.978065
mir_sdr_SetFs: Fs->FsNomHz+dFsHz=2048000.0+0.0Hz=2048000.0Hz FsToggle->1
mir_sdr_SetRf: f->222064000.000Hz (int=25 frac=20 afc=0) fSynth:3553024000.000
mir_sdr_SetRf: Rf->RfNomHz+dRfHz+LifHz+Lif1Hz=222064000.0+0.0+0.0Hz+0.0Hz=222064000.0Hz RfToggle->1
mir_sdr_SetGr: GR->40[16,24,0,0] gRset->0x210 DCCALmode=4 DCCALspd=1 GrToggle->1
setToggleStates: initialising sampNum=0x0001fae2, gainSetting=0x210, FsToggle=0, RfToggle=1, GrToggle=1
setToggleStates: initialising Fs=2047999.978, Rf=222064000.000, Gr=40
mir_sdr_2500_Readback001Trim: readback = 0xe301611
mir_sdr_2500_Bypass001Trim: reg13=0x22d reg14=0x6c016e

----------------------------------------------------
-- Device identification
----------------------------------------------------
driver=SDRPlay
hardware=SDRPlay
mir_sdr_version=1.700000

----------------------------------------------------
-- Peripheral summary
----------------------------------------------------
Channels: 1 Rx, 0 Tx
Timestamps: NO
Other Settings:
* Low IF (when available) - Use low IF when available: 0.5MHz SR with 200 and 300khz BW, 1MHz SR with 600kHz BW, 2048kHz SR with 1536kHz BW
[key=use_low_if, default=true, type=bool]
* IF Mode - IF frequency in kHz
[key=if_mode, default=Zero-IF, type=string, options=(Zero-IF, 450kHz, 1620kHz, 2048kHz)]

----------------------------------------------------
-- RX Channel 0
----------------------------------------------------
Full-duplex: YES
Supports AGC: NO
Stream formats: CS16, CF32
Native format: CS16 [full-scale=2048]
Antennas: RX
Corrections: DC removal, DC offset
Full gain range: [0, 204] dB
TUNER gain range: [0, 102] dB
LNAT gain range: [0, 102] dB
Full freq range: [0.1, 2000] MHz
RF freq range: [0.1, 2000] MHz
Sample rates: [0.222222, 12] MHz
Filter bandwidths: [0.2, 8] MHz
_______________________________End Of File_____________________________________________________-
there appears to be something else just started gqrx from the command line. it CRASHED
ted@OldDog:~/Downloads$ gqrx
linux; GNU C++ version 5.2.1 20150911; Boost_105800; UHD_003.009.001-0-unknown

gr-osmosdr 0.1.4 (0.1.4) gnuradio 3.7.8
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy
Using Volk machine: sse3_64_orc
Could not resolve property : pattern10600
Could not resolve property : pattern10600
Could not resolve property : pattern10600
Could not resolve property : pattern10600
Could not resolve property : pattern10600
Could not resolve property : pattern10600
Could not resolve property : pattern10600
Could not resolve property : pattern10600
gr-osmosdr 0.1.4 (0.1.4) gnuradio 3.7.8
built-in source types: file osmosdr fcd rtl rtl_tcp uhd miri hackrf bladerf rfspace airspy
Using device #0: Mirics MSi2500 default (e.g. VTX3D card)
usb_claim_interface error -6

FATAL: Failed to open mirisdr device.

Trying to fill up 1 missing channel(s) with null source(s).
This is being done to prevent the application from crashing
due to gnuradio bug #528.

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::math::rounding_error> >'
what(): Error in function boost::math::round<float>(float): Value inf can not be represented in the target integer type.
Aborted (core dumped)
Last edited by W7RTM on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

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

Re: SDRPlay GQRX gr-osomsdr (I think)

Postby sdrplay » Tue Jan 26, 2016 2:38 am

From what I can see there it looks as if there is a conflict on the port. Also gr-osmosdr is looking for a miri library, that is nothing to do with us so I'm not sure where this build has come from?

In a terminal window, please run...

lsmod

and check there are no drivers like sir_msi3101 loaded - if you have this driver loaded, it will need to be blacklisted before the official API will be able to obtain exclusive access to the USB port.

rmmod can be used to remove the loaded driver but it's only temporary, you will need to add the driver to the blacklist file in order for it to be blocked at the next reboot - the blacklist file is /etc/modprobe.d/blacklist.conf

If you are still having problems, let us know.

Best regards,

SDRplay Support
Last edited by sdrplay on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

W7RTM
Posts: 10
Joined: Sun Jan 24, 2016 8:22 pm

Re: SDRPlay GQRX gr-osomsdr (I think)

Postby W7RTM » Tue Jan 26, 2016 3:37 am

It seems to me the Mirics MSi2500 was the default Device with I first installed GQRX. below it the result of the lsmod. do I blacklist msi001 and msi2500? I found nothing starting with "sir" or containing 3101.

ted@OldDog:/opt/SdrSharp$ lsmod | grep msi
msi001 16384 1
msi2500 32768 0
videobuf2_vmalloc 16384 1 msi2500
videobuf2_core 49152 1 msi2500
v4l2_common 16384 3 msi2500,msi001,videobuf2_core
videodev 172032 4 msi2500,msi001,v4l2_common,videobuf2_core
Last edited by W7RTM on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

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

Re: SDRPlay GQRX gr-osomsdr (I think)

Postby sdrplay » Tue Jan 26, 2016 2:08 pm

I have no idea what those modules are, they are not anything to do with any official driver and if they are using the USB port, then they will probably be blocking it from the official driver.

I would blacklist them and try the SoapySDRUtil command again.

Best regards,

SDRplay Support
Last edited by sdrplay on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

W7RTM
Posts: 10
Joined: Sun Jan 24, 2016 8:22 pm

Re: SDRPlay GQRX gr-osomsdr (I think)

Postby W7RTM » Tue Jan 26, 2016 9:39 pm

blacklisted msi001 and msi2500. No Help.
purged and reinstalled gnuradio and gqrx.
I believe removed any and all packages unrelated to gnuradio, gr-osmosdr and gqrx.

SoapySDRUtil does not show USB errors anymore, but shows mir_sdr_2500_StreamReads fails. (see below). further no Driver or Hardware are found as they were before. I reneabled the msi modules again and that was no help. so I've broken something. Reran SDRplay_RSP_MiricsAPI-1.9.4.run that was no help either. The modules are blacklisted again, and now I'm going to lunch.

One thing I'm confused about, you state you don't recognize the msi modules, but in researching them I found this:
http://www.sdrplay.com/docs/SDRplay_Con ... m_r1p0.pdf

ted@OldDog:~$ SoapySDRUtil --probe=sdrplay
######################################################
## Soapy SDR -- the SDR abstraction library
######################################################

Probe device sdrplay
mir_sdr_Init: starting hardware initialization
mir_sdr_Init: gR=40dB fs=2.048MHz rf=222.064MHz bw=1.536MHz if=0.000MHz

mir_sdr_usb_USB DLL: Revision 0.1.1

mir_sdr_2500_Init: fnaddr = 4

mir_sdr_2500_Init: adjusting squelch trim 0x1, rx gating enable 1, tx_trim 0, reg2 = 0x4801
initHw: Register7 = 0x000005
initHw: Tuner Register0 = 0x04f440
mir_sdr_SetFs: Sample Freq requested 2047999.978065
mir_sdr_SetFs: Fs->FsNomHz+dFsHz=2048000.0+0.0Hz=2048000.0Hz FsToggle->1
mir_sdr_SetRf: f->222064000.000Hz (int=25 frac=20 afc=0) fSynth:3553024000.000
mir_sdr_SetRf: Rf->RfNomHz+dRfHz+LifHz+Lif1Hz=222064000.0+0.0+0.0Hz+0.0Hz=222064000.0Hz RfToggle->1
mir_sdr_SetGr: GR->40[16,24,0,0] gRset->0x210 DCCALmode=4 DCCALspd=1 GrToggle->1
mir_sdr_usb_StreamRead: Read failed to read sufficient data: requested 393216 read 0

mir_sdr_2500_StreamRead: Read failed
mir_sdr_usb_StreamRead: Read failed to read sufficient data: requested 393216 read 0

mir_sdr_2500_StreamRead: Read failed again
setToggleStates: failed mir_sdr_2500_StreamRead err=1
initHw: setToggleStates() Error 1
mir_sdr_Init: initState returns error 7

mir_sdr_2500_Readback001Trim: readback = 0xe301611
mir_sdr_2500_Bypass001Trim: reg13=0x22d reg14=0x6c016e
----------------------------------------------------
-- Device identification
----------------------------------------------------
driver=null
hardware=null

----------------------------------------------------
-- Peripheral summary
----------------------------------------------------
Channels: 0 Rx, 0 Tx
Timestamps: NO
Last edited by W7RTM on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

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

Re: SDRPlay GQRX gr-osomsdr (I think)

Postby sdrplay » Tue Jan 26, 2016 11:08 pm

The MSi001 and MSi2500 are the ICs on the board, that's why they are in the block diagram. What you are seeing are software modules which is something completely different.

There is something still not right. There is USB communication to the RSP but it looks like the isochronous transfer isn't working. Can you say what PC hardware you are using and whether you are using a USB 2.0 or 3.0 port?

Best regards,

SDRplay Support
Last edited by sdrplay on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

W7RTM
Posts: 10
Joined: Sun Jan 24, 2016 8:22 pm

Re: SDRPlay GQRX gr-osomsdr (I think)

Postby W7RTM » Wed Jan 27, 2016 3:13 am

The plot thickens. I was afraid I had killed my new device.

I found unplugging the SDRPlay and Plugging it back in to the USB made a difference. I also found mulitple times of doing this running SoapySDRUtil after the unplug and replugging in gave different results regarding USB errors. My account is a member of the "dialout" group which should give me permissions to read and write the USB ports.

After running GQRX - appears to kill the driver

ted@OldDog:~/Downloads$ SoapySDRUtil --probe=sdrplay
######################################################
## Soapy SDR -- the SDR abstraction library
######################################################

Probe device sdrplay
mir_sdr_Init: starting hardware initialization
mir_sdr_Init: gR=40dB fs=2.048MHz rf=222.064MHz bw=1.536MHz if=0.000MHz

mir_sdr_usb_USB DLL: Revision 0.1.1

Warning: libusb_claim_interface() -6

Error: kernel driver not active - should have been able to claim interface!


mir_sdr_usb_Init: Timeout expired/failed to establish connection with the device

mir_sdr_2500_Init: mir_sdr_usb_Init() failed
mir_sdr_Init: mir_sdr_2500_Init() Error 1

----------------------------------------------------
-- Device identification
----------------------------------------------------
driver=null
hardware=null

----------------------------------------------------
-- Peripheral summary
----------------------------------------------------
Channels: 0 Rx, 0 Tx
Timestamps: NO

I tailed the syslog to see if I could determine the USB type unplugging and replugging in the USB cable.
Jan 26 19:01:14 OldDog kernel: [20949.114335] usb 1-7: USB disconnect, device number 12
Jan 26 19:01:18 OldDog colord-sane: io/hpmud/musb.c 2081: Invalid usb_open: Permission denied
Jan 26 19:01:18 OldDog colord-sane: io/hpmud/pp.c 627: unable to read device-id ret=-1
Jan 26 19:01:27 OldDog kernel: [20962.488046] usb 1-7: new high-speed USB device number 13 using ehci-pci
Jan 26 19:01:28 OldDog kernel: [20962.620525] usb 1-7: New USB device found, idVendor=1df7, idProduct=2500
Jan 26 19:01:28 OldDog kernel: [20962.620537] usb 1-7: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Jan 26 19:01:28 OldDog mtp-probe: checking bus 1, device 13: "/sys/devices/pci0000:00/0000:00:10.4/usb1/1-7"
Jan 26 19:01:28 OldDog mtp-probe: bus: 1, device: 13 was not an MTP device
Jan 26 19:01:32 OldDog colord-sane: io/hpmud/musb.c 2081: Invalid usb_open: Permission denied
Jan 26 19:01:32 OldDog colord-sane: io/hpmud/pp.c 627: unable to read device-id ret=-1

Rerunning SoapySDRUtil
ted@OldDog:~/Downloads$ SoapySDRUtil --probe=sdrplay
######################################################
## Soapy SDR -- the SDR abstraction library
######################################################

Probe device sdrplay
mir_sdr_Init: starting hardware initialization
mir_sdr_Init: gR=40dB fs=2.048MHz rf=222.064MHz bw=1.536MHz if=0.000MHz

mir_sdr_usb_USB DLL: Revision 0.1.1

mir_sdr_2500_Init: revisionId = 0x0200, doing FW update
fwDownload: FW image size = 6008
mir_sdr_usb_USB DLL: Revision 0.1.1

mir_sdr_2500_Init: fnaddr = 2 detected, trying to change...

mir_sdr_2500_Init: fnaddr = 14

mir_sdr_2500_Init: adjusting squelch trim 0x1, rx gating enable 1, tx_trim 0, reg2 = 0x4801
initHw: Register7 = 0x000005
initHw: Tuner Register0 = 0x04f440
mir_sdr_SetFs: Sample Freq requested 2047999.978065
mir_sdr_SetFs: Fs->FsNomHz+dFsHz=2048000.0+0.0Hz=2048000.0Hz FsToggle->1
mir_sdr_SetRf: f->222064000.000Hz (int=25 frac=20 afc=0) fSynth:3553024000.000
mir_sdr_SetRf: Rf->RfNomHz+dRfHz+LifHz+Lif1Hz=222064000.0+0.0+0.0Hz+0.0Hz=222064000.0Hz RfToggle->1
mir_sdr_SetGr: GR->40[16,24,0,0] gRset->0x210 DCCALmode=4 DCCALspd=1 GrToggle->1
setToggleStates: initialising sampNum=0x0001fe7a, gainSetting=0x210, FsToggle=0, RfToggle=1, GrToggle=1
setToggleStates: initialising Fs=2047999.978, Rf=222064000.000, Gr=40
mir_sdr_2500_Readback001Trim: readback = 0xe301611
mir_sdr_2500_Bypass001Trim: reg13=0x22d reg14=0x6c016e

----------------------------------------------------
-- Device identification
----------------------------------------------------
driver=SDRPlay
hardware=SDRPlay
mir_sdr_version=1.700000

----------------------------------------------------
-- Peripheral summary
----------------------------------------------------
Channels: 1 Rx, 0 Tx
Timestamps: NO
Other Settings:
* Low IF (when available) - Use low IF when available: 0.5MHz SR with 200 and 300khz BW, 1MHz SR with 600kHz BW, 2048kHz SR with 1536kHz BW
[key=use_low_if, default=true, type=bool]
* IF Mode - IF frequency in kHz
[key=if_mode, default=Zero-IF, type=string, options=(Zero-IF, 450kHz, 1620kHz, 2048kHz)]

----------------------------------------------------
-- RX Channel 0
----------------------------------------------------
Full-duplex: YES
Supports AGC: NO
Stream formats: CS16, CF32
Native format: CS16 [full-scale=2048]
Antennas: RX
Corrections: DC removal, DC offset
Full gain range: [0, 204] dB
TUNER gain range: [0, 102] dB
LNAT gain range: [0, 102] dB
Full freq range: [0.1, 2000] MHz
RF freq range: [0.1, 2000] MHz
Sample rates: [0.222222, 12] MHz
Filter bandwidths: [0.2, 8] MHz
Last edited by W7RTM on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

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

Re: SDRPlay GQRX gr-osomsdr (I think)

Postby sdrplay » Wed Jan 27, 2016 8:17 am

Whenever you see this...

Warning: libusb_claim_interface() -6
Error: kernel driver not active - should have been able to claim interface!

It normally means that something else has grabbed the port and the driver cannot therefore access it. Only one driver can access the port at any one time.

By unplugging and plugging the device back in again, you are resetting that and then it's up to the system to decide which driver has write access to the device. When you get into the libusb error condition, use lsmod to see what drivers are loaded that are communicating with the device.

The official driver does not use any kernel modules that have mir or msi in them so you can see if you have a rogue module accessing the device from somewhere.

Hope that helps,

Best regards,

SDRplay Support
Last edited by sdrplay on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason


Return to “General”

Who is online

Users browsing this forum: No registered users and 4 guests