Closed Strykar closed 5 years ago
Do you want to use a local SDRPlay device or a remote one, via SoapyRemote?
@szpajder Either would do TBH. In this case, Soapy is setup and working is all. I didn't know you could use an RSP2 with mirisdr drivers? In any case, I am unable to compile with miri-sdr support:
$./rtl_airband/RTLSDR-Airband-3.0.1$ make PLATFORM=armv8-generic WITH_SOAPYSDR=1 NFM=1 PULSE=1 WITH_MIRISDR=1
g++ -O3 -g -Wall -DSYSCONFDIR=\"/usr/local/etc\" -DDEBUG=0 -march=armv8-a+crc -mtune=cortex-a53 -ffast-math -DNFM -DPULSE -DWITH_RTLSDR -DWITH_MIRISDR -DWITH_SOAPYSDR -c -o input-mirisdr.o input-mirisdr.cpp
input-mirisdr.cpp: In function ‘int mirisdr_init(input_t*)’:
input-mirisdr.cpp:98:31: error: ‘MIRISDR_HW_DEFAULT’ was not declared in this scope
mirisdr_open(&dev_data->dev, MIRISDR_HW_DEFAULT, dev_data->index);
^~~~~~~~~~~~~~~~~~
input-mirisdr.cpp:105:51: error: ‘mirisdr_set_transfer’ was not declared in this scope
int r = mirisdr_set_transfer(miri, (char *)"BULK");
^
input-mirisdr.cpp:134:54: error: ‘mirisdr_set_sample_format’ was not declared in this scope
r = mirisdr_set_sample_format(miri, (char *)"504_S8");
^
<builtin>: recipe for target 'input-mirisdr.o' failed
make: *** [input-mirisdr.o] Error 1
But in which scenario do you get the " Failed to open SoapySDR device " error? When the device is local or remote?
You have configured a local device in rtl_airband.conf, but you've mentioned SoapySDRServer too, so I'm confused.
If the device is local and you have SoapySDRServer running on the same machine, then I suggest stopping it first, just to make sure that it doesn't block the SDR for other apps.
rtl_airband and the rsp2 are local to the same machine - the Odroid C2.
I've never tried to connect to the RSP2 directly since I didn't see it supported outside of Soapy, hence the type = "soapysdr"
How would I connect rtl-airband to the rsp2 without soapy? I don' recall seeing that option for anything other than rtl-sdr on the wiki.
FWIW, I have tried device_string = "remote=192.168.10.100,driver=remote,remote:timeout=100000,remote:driver=sdrplay";
which also did not work.
I'm confused now, where do you see a local device in my airband.conf? Reading the wiki this would use SoapyRemote and a device connected via Soapy right? -
devices:
({
type = "soapysdr";
device_string = "driver=sdrplay,hardware=0000000000";
Update: I stopped SoapySDRServer and tried rtl-airband again, same error.
So please post the output of SoapySDRUtil --probe command now, with SoapySDRServer stopped.
The output you've posted earlier only shows a remote device, not a local one.
I'm not sure what gave the impression that the device was remote in the previous SoapySDRUtil --probe
output, but here you go -
$ SoapySDRUtil --find
######################################################
## Soapy SDR -- the SDR abstraction library ##
######################################################
Found device 0
driver = sdrplay
label = SDRplay Dev0 RSP2 000000
serial = 000000
$ SoapySDRUtil --probe
######################################################
## Soapy SDR -- the SDR abstraction library ##
######################################################
Probe device
----------------------------------------------------
-- Device identification
----------------------------------------------------
driver=SDRplay
hardware=1707065E10
mir_sdr_api_version=2.130000
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]]
* 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: Antenna A, Antenna B, Hi-Z
Corrections: DC removal
Full gain range: [0, 47] dB
IFGR gain range: [20, 59] dB
RFGR gain range: [0, 8] dB
Full freq range: [0.01, 2000] MHz
RF freq range: [0.01, 2000] MHz
CORR freq range: MHz
Sample rates: 0.25, 0.5, 1, 2, 2.048, 6, 7, 8, 9, 10 MSps
Filter bandwidths: 0.2, 0.3, 0.6, 1.536, 5, 6, 7, 8 MHz
I'm not sure what gave you the impression that the device was remote in the previous SoapySDRUtil --probe output, but here you go -
Now the RX Channel 0 section looks quite different, doesn't it?
The hardware serial number in the device identification sections looks real now. So adjust your device_string in rtl_airband.conf and try again.
Ah I see the remote section in RX Channel 0 now, weird. BTW, same error -
$ /usr/local/bin/rtl_airband -fe -c /usr/local/etc/rtl_airband.conf
SoapySDR: device 'driver=sdrplay,hardware=1707065E10': using native sample format 'CS16' (fullScale=32767.0)
RTLSDR-Airband version v3.0.1-12-g9523dc9 starting
Connecting to 127.0.0.1:8000/stream.mp3...
Connected to 127.0.0.1:8000/stream.mp3
SoapySDR: device 'driver=sdrplay,hardware=1707065E10': sample rate set to 2048000 sps
SoapySDR: device 'driver=sdrplay,hardware=1707065E10': antenna set to 'Antenna A'
SoapySDR: device 'driver=sdrplay,hardware=1707065E10': gain 'IFGR' set to 35.0 dB
SoapySDR: device 'driver=sdrplay,hardware=1707065E10': gain 'RFGR' set to 4.0 dB
SoapySDR: device 'driver=sdrplay,hardware=1707065E10' initialized
[INFO] Using format CS16.
Failed to set up stream for SoapySDR device 'driver=sdrplay,hardware=1707065E10':
1 device(s) failed to initialize - aborting
$ cat /usr/local/etc/rtl_airband.conf
devices:
({
type = "soapysdr";
device_string = "driver=sdrplay,hardware=1707065E10";
gain = "IFGR=35,RFGR=4";
correction = 0.0;
sample_rate = 2.048;
antenna = "Antenna A";
mode = "scan";
channels:
(
{
freqs = ( 121.5, 122.8, 119.7 );
labels = ( "Tower", "Ground", "Approach" );
outputs: (
{
type = "icecast";
server = "127.0.0.1";
port = 8000;
mountpoint = "stream.mp3";
name = "Tower + Ground + Approach";
genre = "ATC";
description = "Local airport - aggregated feed";
username = "source";
password = "rtlsdr";
send_scan_freq_tags = true;
},
{
type = "file";
directory = "/home/strykar/recordings";
filename_template = "TWR+GND+APP";
}
);
}
);
}
);
Is there a way to get more debugging info on where it's failing?
It appears to initialize -- SoapySDR: device 'driver=sdrplay,hardware=1707065E10' initialized
Then -- Failed to set up stream for SoapySDR device 'driver=sdrplay,hardware=1707065E10':
Also, I confirmed the difference in the RX Channel 0
section was due to SoapySDRServer
being active.
The Failed to set up stream...
message has a colon at the end and after that there should be an error string returned by SoapySDR library. If nothing shows up there, it means that SoapySDR returned an error code, but no error message.
There is nothing wrong with your config or with the program - I tested your configuration on my SDRPlay RSP1A and it works. So if there is no other application holding the device open, it should work.
My Soapy versions:
Lib Version: v0.7.0-g5f5a4d8c
API Version: v0.7.0
ABI Version: v0.7
Install root: /usr/local
Search path: /usr/local/lib/SoapySDR/modules0.7
Module found: /usr/local/lib/SoapySDR/modules0.7/libremoteSupport.so (0.5.1-5a647db)
Module found: /usr/local/lib/SoapySDR/modules0.7/librtlsdrSupport.so (0.3.0-f409a56)
Module found: /usr/local/lib/SoapySDR/modules0.7/libsdrPlaySupport.so (0.1.0-12c3db6)
Available factories... remote, rtlsdr, sdrplay
I know the cause - there was an API change in SoapySDR recently and it broke backwards compatibility. See here: https://github.com/pothosware/SoapySDR/issues/215. This is now fixed, so please update SoapySDR from the master branch, install it and recompile rtl_airband.
You sir are a champ, tyvm! Looking good in scan mode on the RSP2 now.
rtlsdr_airband works fine on my Odroid C2 with a local Elonics 4000 dongle, but not an RSP2Pro via Soapy. SoapySDRremote and the RSP2 work fine with CubicSDR on the LAN -
I've snipped the serial number from rtl_airband logs, I've tried it without
hardware=
too -rtl_airband's stable version logs even less -
rtl_airband[32153]: Failed to open SoapySDR device 'driver=sdrplay,hardware=00000': map::at
SoapySDR info -
My airband conf -
What am I missing here?