SDRplay and Mac OS, installation questions

Post information or questions regarding SDRplay products here
sdrplay
Posts: 978
Joined: Wed Jan 07, 2015 7:58 am

Re: SDRplay and Mac OS, installation questions

Post by sdrplay » Wed Jun 15, 2016 11:12 pm

Hi Richard,

AFAIK MacPorts were not going to support gr-osmosdr for the RSP. That was one of the reasons why we support the SoapySDR/SoapySDRPlay flow and distribute the SoapySDR play libraries with the API/Driver on non-Windows platforms.

Once you have installed the API from our Mac page, you can build updated versions of SoapySDR and SoapySDRPlay (you need to build both) here:

https://github.com/pothosware/SoapySDR/wiki
https://github.com/pothosware/SoapySDRPlay/wiki

If you want to use the RSP with gr-osmosdr we recommend you get SoapySDR working first and then the gr-osmosdr build should find SoapySDR and include support for it.

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

RightHalfPlane
Posts: 1
Joined: Sat Jun 25, 2016 4:09 am

Re: SDRplay and Mac OS, installation questions

Post by RightHalfPlane » Sat Jun 25, 2016 5:00 am

I managed to add SDRplay functionality for gqrx and gnuradio-companion with Macports under Yosemite last night and using El Capitan this afternoon. With, Yosemite you create a 'soapy' option for gqrx. With, El Capitan you get a 'sdrplay' option.

The simplest way is to first install CubicSDR and SoapySDR as other people suggested.

Next, do the standard install for gqrx and gnuradio, 'sudo port install gqrx', ...

Next, from the link (https://trac.macports.org/ticket/48451) that you pointed out you get the "gr-osmosdr_sdrplay_1.7.diff​" file and copy the changes into the gr-osmosdr "Portfile" (/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/science/gr-osmosdr/Portfile - I used TextWrangle).

Next, you need to create the "mir_sdr_api_MacOSX_1.7.tar.gz" file. Create a folder called "mir_sdr_api_MacOSX_1.7" and 'cp /usr/local/include/mirsdrapi-rsp.h mir_sdr_api_MacOSX_1.7/mir_sd.h' and 'cp /usr/local/lib/libmirsdrapi-rsp-i386-1.8.1.so mir_sdr_api_MacOSX_1.7/libmir_sdr.so'. Note the name changes. Then 'tar -zcvf mir_sdr_api_MacOSX_1.7.tar.gz' to create the tar file. Then, you copy that into place - 'sudo cp mir_sdr_api_MacOSX_1.7.tar.gz /opt/local/var/macports/distfiles/gr-osmosdr/'.

Next, do the upgrade 'sudo port -d upgrade --enforce-variants gr-osmosdr +sdrplay' - this will fail because the checksums are wrong, but it tells you what they should be - put the new checksums into the PortFile and the upgrade should succeed.

That gave me a gqrx working with SDRplay
Attachments
Gqrx.png
Gqrx.png (128.31 KiB) Viewed 22960 times
Last edited by RightHalfPlane on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

jerryn
Posts: 4
Joined: Fri Feb 17, 2017 10:29 pm

Re: SDRplay and Mac OS, installation questions -making progress but still..

Post by jerryn » Sat Feb 18, 2017 9:34 pm

bash-3.2# soapysdrutil
######################################################
## Soapy SDR -- the SDR abstraction library
######################################################

Usage SoapySDRUtil [options]
Options summary:
--help Print this help message
--info Print module information
--find[="driver=foo,type=bar"] Discover available devices
--make[="driver=foo,type=bar"] Create a device instance
--probe[="driver=foo,type=bar"] Print detailed information
--check[=driverName] Check if driver is present

bash-3.2# soapysdrutil --probe
######################################################
## Soapy SDR -- the SDR abstraction library
######################################################

Probe device
mir_sdr_usb_GetDevices Dev0:vid=1df7 pid=3010 rev=0207 serno=170104D400 bus=000 port=003 devAvail=1
mir_sdr_usb_SetDeviceIdx idx=0 numDevices=1
Opened device with idVendor = 0x1df7 idProduct = 0x3010 fwVersion = 0x0207 busNum = 000 portNum = 003

----------------------------------------------------
-- Device identification
----------------------------------------------------
driver=SDRplay
hardware=2 170104D400
mir_sdr_api_version=2.090000
mir_sdr_hw_version=2

----------------------------------------------------
-- Peripheral summary
----------------------------------------------------
Channels: 1 Rx, 0 Tx
Timestamps: NO
Other Settings:
* RF Gain Select - RF Gain Select
[key=rfgain_sel, default=4, type=string, options=(0, 1, 2, 3, 4, 5, 6, 7, 8)]
* IF Mode - IF frequency in kHz
[key=if_mode, default=Zero-IF, type=string, options=(Zero-IF, 450kHz, 1620kHz, 2048kHz)]
* IQ Correction - IQ Correction Control
[key=iqcorr_ctrl, default=true, type=bool]
* AGC Setpoint - AGC Setpoint (dBfs)
[key=agc_setpoint, default=-30, type=int, range=[-60, 0]]
* Antenna Select - Antenna Select
[key=ant_sel, default=Antenna A, type=string, options=(Antenna A, Antenna B)]
* AMport Select - AM Port Select
[key=amport_ctrl, default=AntA//AntB, type=string, options=(AntA/AntB, Hi-Z)]
* ExtRef Enable - External Reference Control
[key=extref_ctrl, default=true, type=bool]
* BiasT Enable - BiasT Control
[key=biasT_ctrl, default=true, type=bool]
* RfNotch Enable - RF Notch Filter Control
[key=rfnotch_ctrl, default=true, type=bool]

----------------------------------------------------
-- RX Channel 0
----------------------------------------------------
Full-duplex: YES
Supports AGC: YES
Stream formats: CS16, CF32
Native format: CS16 [full-scale=32767]
Antennas: RX
Corrections: DC removal
Full gain range: [0, 39] dB
IFGR gain range: [20, 59] dB
Full freq range: [0.01, 2000] MHz
RF freq range: [0.01, 2000] MHz
CORR freq range: MHz
Sample rates: [0.25, 10] MHz
Filter bandwidths: [0.2, 8] MHz

mir_sdr_usb_ReleaseDeviceIdx 0

bash-3.2#


gr-osmosdr v0.1.x-xxx-xunknown (0.1.5git) gnuradio 3.7.10.1
built-in source types: file fcd rtl rtl_tcp uhd hackrf bladerf rfspace airspy soapy
gr::log :INFO: audio source - Audio sink arch: osx
gr::log :INFO: audio_osx_sink0 -

Using output audio device 'Built-in Line Output'.
... which is the current default output audio device.
Changing the default output audio device in the System Preferences will
result in changing it here, too (with an internal reconfiguration).

BookmarksFile is /Volumes/Users/jerryn/.config/gqrx/bookmarks.csv
Number of audio input devices: 4
Number of audio output devices: 6
mir_sdr_usb_GetDevices Dev0:vid=1df7 pid=3010 rev=0207 serno=170104D400 bus=000 port=003 devAvail=1
gr-osmosdr v0.1.x-xxx-xunknown (0.1.5git) gnuradio 3.7.10.1
built-in source types: file fcd rtl rtl_tcp uhd hackrf bladerf rfspace airspy soapy
mir_sdr_usb_GetDevices Dev0:vid=1df7 pid=3010 rev=0207 serno=170104D400 bus=000 port=003 devAvail=1
mir_sdr_usb_SetDeviceIdx idx=0 numDevices=1
Opened device with idVendor = 0x1df7 idProduct = 0x3010 fwVersion = 0x0207 busNum = 000 portNum = 003
[INFO] Using format CF32.
mir_sdr_AgcControl: 1 -30 0 0 0 0 4
mir_sdr_StreamInit()
mir_sdr_Init: starting hardware initialization
mir_sdr_Init: gR=20dB fs=2.048MHz rf=94.105MHz bw=0.200MHz if=0.000MHz
DownConvert: Enable=0 DecM=1 OutScale=0 (fs=2.048000 bw=200 if=0)
mir_sdr_usb_USB DLL: Revision 0.1.1
mir_sdr_2500_Init: fnaddr = 20
mir_sdr_2500_Init: adjusting squelch trim 0x1, rx gating enable 1, tx_trim 0, reg2 = 0x4801
initHw: Register7 = 0x000005
initRfFreqDependentHw(1): Tuner Register0 = 0x043420
mir_sdr_GpioExtWrite: Addr=0 Data=0x00
mir_sdr_GpioExtWrite: Addr=1 Data=0x00
mir_sdr_GpioExtWrite: Addr=18 Data=0x5d
mir_sdr_GpioExtWrite: Addr=19 Data=0xa5
initRfFreqDependentHw(1): ExtGpioA = 0x5d ExtGpioB = 0xa5
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->94105000.000Hz (int=1f frac=451 afc=0) fSynth:3011360000.000
mir_sdr_SetRf: Rf->RfNomHz+dRfHz+LifHz+Lif1Hz=94105000.0+0.0+0.0Hz+0.0Hz=94105000.0Hz RfToggle->1
mir_sdr_SetGr: GR->20[20,0,0,0] gRset->0x14 DCCALmode=3 DCCALspd=0 GrToggle->1
setToggleStates: initialising sampNum=0x0002024e, gainSetting=0x014, FsToggle=0, RfToggle=0, GrToggle=1
setToggleStates: initialising Fs=2047999.978, Rf=94105000.000, Gr=20
mir_sdr_RSP_SetGr: in: 20 4 1 0
mir_sdr_GpioExtWrite: Addr=19 Data=0xb9
mir_sdr_RSP_SetGr: GR->20[20,24,0,0] gRset->0x214 DCCALmode=3 DCCALspd=0 GrToggle->0
mir_sdr_RSP_SetGr: out: 20 44 4
mir_sdr_DecimateControl: 0 1 0
mir_sdr_DecimateControl: DecimateEnable=0, DecimateDecM=1, DecimateOutScale=0, DecimateRound[0]=0x00000000, DecimateRound[1]=0x00000000
mir_sdr_SetDcMode: DCCAL: mode->4 speedup->0
mir_sdr_SetDcTrackTime: DCTRK_TIM->63
DCcoeff=0.001500 adj_for_Fs=0.001465 Fs=2047999.978
AGCcoeff=0.290000 adj_for_Fs=0.283203 Fs=2047999.978
adj_for_PktSz=0.377604 PktSz=336
aUaUmir_sdr_RSP_SetGr: ERROR: previous gain update not received (or timed out)
mir_sdr_ReadPacket: Gain update confirmed: Gr=20dB GrToggle=0 gset=0x214
grChanged @ 21
mir_sdr_RSP_SetGr: in: -3 4 0 0
mir_sdr_GpioExtWrite: Addr=19 Data=0xb9
mir_sdr_RSP_SetGr: GR->20[20,24,0,0] gRset->0x214 DCCALmode=4 DCCALspd=0 GrToggle->1
mir_sdr_RSP_SetGr: out: 20 44 4
DCoffsetCorrection: switched to tracking mode diff=20 curr=-405.79 last=-385.64
aUaUaUmir_sdr_ReadPacket: Gain update confirmed: Gr=20dB GrToggle=1 gset=0x214
grChanged @ 413
aUDCoffsetCorrection: switched to tracking mode diff=14 curr=-407.13 last=-421.35
aU


SDRPLAY support.. can you help ? It works but my rtlsdr stick has better reception right now and I bought the sdrplay to get more bandwith and better signal.
Last edited by jerryn on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

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

Re: SDRplay and Mac OS, installation questions

Post by sdrplay » Sat Feb 18, 2017 10:37 pm

Hi,

Can you explain what port you are trying to use on the RSP2 and what your config is currently. I can see you are at maximum IF gain but can you say what RF gain you have set? The AGC is trying to go even higher so it suggests you may not be connected to the port that has been programmed?

Best regards,

SDRplay Support

Reason: No reason

jerryn
Posts: 4
Joined: Fri Feb 17, 2017 10:29 pm

Re: SDRplay and Mac OS, installation questions

Post by jerryn » Sun Feb 19, 2017 2:22 am

Yes my antenna is on port B. RFGAIN on 1.

Can I send new sdrplay soapy driver default settings to the device with a script before I open up the gqrx application ?
apparently the gqrx driver settings are not getting sent.
I moved the antenna over to the other part (noticed what you mentioned as well so I figured it's easier just to move to the antenna to antenna port a to see an the agc was still
trying for more.


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

jbammi
Posts: 3
Joined: Thu Dec 22, 2016 11:27 pm

Re: SDRplay and Mac OS, installation questions

Post by jbammi » Sun Mar 05, 2017 1:14 am

Will really appreciate a cookbook style play by play how to install RSP2 with CubicSDR on MacOSX

I installed the API (downloaded and ran the installer pkg no problem)
Downloaded CusbicSDR from SDRplay site

plug in the RSP 2 using a known good USB cable

I launch CubicSDR
It throws up the SDR Devices with no devices in he found devices column
So i try to add, choose sdrplay from the dropdown in the Add SoapySDR Device popup dialog
Hit OK
It comes back with Not found (sdrplay) under the Manual section

A detailed step by step appreciates.

73 de kc1ccr
Last edited by jbammi on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

Sasan
Posts: 124
Joined: Sat Jun 27, 2015 1:15 am
Location: Berlin

Re: SDRplay and Mac OS, installation questions

Post by Sasan » Sun Mar 05, 2017 12:41 pm

jbammi wrote:Will really appreciate a cookbook style play by play how to install RSP2 with CubicSDR on MacOSX

I installed the API (downloaded and ran the installer pkg no problem)
Downloaded CusbicSDR from SDRplay site

plug in the RSP 2 using a known good USB cable

I launch CubicSDR
It throws up the SDR Devices with no devices in he found devices column
So i try to add, choose sdrplay from the dropdown in the Add SoapySDR Device popup dialog
Hit OK
It comes back with Not found (sdrplay) under the Manual section

A detailed step by step appreciates.

73 de kc1ccr
Hi
This problem occurs when SoapySDR can not access the device.
First of all make sure that your OS detects the SDRPlay.
Try one of these:

1- Run the "system_profiler SPUSBDataType" command in your Terminal.
In the output there should be a section like this:
Vendor-Specific Device:

Product ID: 0x2500
Vendor ID: 0x1df7
Version: 2.00
Speed: Up to 480 Mb/sec
Location ID: 0x14200000 / 14
Current Available (mA): 500
Extra Operating Current (mA): 0
2- Run the "lsusb" command in your Terminal.
It should have a line similar to this in the output:

Code: Select all

Bus 020 Device 011: ID 1df7:2500 1df7 Vendor-Specific Device
If you don't have "lsusb" installed, you can install it via Homebrew (brew install lsusb)

If you don't see a line similar to the above, change the USB port and cable you're using, then try again.

Reason: No reason
DF2HF, NM9A, EP2C

jbammi
Posts: 3
Joined: Thu Dec 22, 2016 11:27 pm

Re: SDRplay and Mac OS, installation questions

Post by jbammi » Sun Mar 05, 2017 9:28 pm

Thank you Sasan,
Following your hints I managed to determine that all the USB ports on a MacBook Air 11 are not equivalent, the right side port can source higher current! Plugging the cable into the right side port worked fine.

73 de kc1ccr
Last edited by jbammi on Thu Jan 01, 1970 12:00 am, edited 0 times in total.
Reason: No reason

Post Reply