GithubHelp home page GithubHelp logo

pothosware / soapyplutosdr Goto Github PK

View Code? Open in Web Editor NEW
54.0 19.0 22.0 90 KB

Soapy SDR plugin for PlutoSDR

Home Page: https://github.com/pothosware/SoapyPlutoSDR/wiki

License: GNU Lesser General Public License v2.1

CMake 16.59% C++ 83.41%
sdr plutosdr soapysdr gnuradio pothos

soapyplutosdr's Introduction

Soapy SDR module for Pluto SDR

Installation instructions

git clone https://github.com/pothosware/SoapyPlutoSDR
cd SoapyPlutoSDR
mkdir build
cd build
cmake ..
make
sudo make install

Dependencies

Documentation

Note that the Frequency Correction API is not implemented, it's recommended that you adjust the xo_correction value with the observed PPM in the Pluto device config.txt.

PothosSDR

Note that installation with PothosSDR is optional as "PlutoSDR SoapySDR binding (experimental)" and not selected by default.

This is due to possible problems with other libusb devices, see #24 and libiio#586

Licensing information

GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999

soapyplutosdr's People

Contributors

alexeybarsuk avatar argilo avatar evankrall avatar guruofquality avatar jeija avatar jocover avatar kantooon avatar nunojpg avatar vsonnier avatar willcode avatar zuckschwerdt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

soapyplutosdr's Issues

SoapyPlutoSDR module not working in TX mode with QUISK and SdrAngel

Hello,

I am trying to use my plutosdr with QUISK and it only works in RX mode and not in TX mode. I strongly suspect the problem is not with QUISK or SoapySDR but the SoapyPlutoSDR module that seems deficient to me.

The first reason I believe this, is because other QUISK users have managed to tx with the limesdr using the SoapySDR interface of QUISK and the Soapylimesdr module. So if it works with limesdr it should work with the plutosdr. Also if I can RX with QUISK and soapyplutosdr then I don't see why I could not TX, something is very wrong

The second reason I believe this, is because when I test with Sdrangel using the SoapySdr interface (so not in direct iio mode) and the SoapyPlutoSdr module, I can't TX either, I can only RX just like with QUISK ! (whereas I can TX/RX without any issues with sdrangel and my redpitaya using soapysdr and the soapyredpitaya module).

Of course my plutosdr works perfectly well with iio-oscilloscope and sdrangel in direct mode as well as other iio capable applications like qspectrumanalyzer so I don't think my iio environment is at stake. All applications with direct iio interface are doing fine, but with soapy only the rx part works.

All my evidence seems to suggest some problems in TX mode with the soapyplutosdr module. Is there a way I can verify that this module works in TX mode in combination with soapysdr ? Maybe using another application, but which one ? Using Gnuradio ? What could I do to try to narrow down the problem ? Thanks for your help

ERROR: Unable to claim interface : Device or resource busy

Hi,
I'm new to pothosflow, have more experience with gnuradio.

Just installed in ubuntu 18.04 this driver for running some examples in Pothosflow with the adalm pluto but when load the topology with the plutosdr driver the message window give this error and no data is get to the flow diagram.

All the installation process seems ok and the SoapySDRUtil --probe="driver=plutosdr,hostname=192.168.2.1" command works correctly.

any ideas?.

Listed sample rates and bandwidths

The driver lists these samplerates (and same for bandwidths)

std::vector<double> SoapyPlutoSDR::listSampleRates( const int direction, const size_t channel ) const
{
	std::vector<double> options;
	options.push_back(65105);//25M/48/8+1
	options.push_back(1e6);
	options.push_back(2e6);
	options.push_back(3e6);
	options.push_back(4e6);
	options.push_back(5e6);
	options.push_back(6e6);
	options.push_back(7e6);
	options.push_back(8e6);
	options.push_back(9e6);
	options.push_back(10e6);
	return(options);
}

That results in being able to only select one of these sample rates in certain apps like SigDigger. However the PlutoSDR hardware can do custom sample rates like 1.5 MSPS and also higher sample rates like 15 MSPS. Because of the USB 2.0 that Pluto has, higher sample rates dont make much sense, but ANTSDR (a pluto clone with gbit ethernet) can stream 14-15 MSPS.
I wonder why the Soapy driver has to list specific sample rates? What if the device supports any sample rate in a given range? Can the driver signal that any sample rate in a range is supported?

Link against minor libiio soname version

It looks like the libiio API can change in minor soname bumps, so we should be linking against the minor soname version. Currently libad9361 is linking against libiio.so.0 but it should be linking against libiio.so.0.21.

How to differentiate 2 Adalm Pluto devices via their serial number

I am trying to use 2 devices with different serial numbers with a SoapyPlutoSDR setup for OpenWebRx. But it fails, the developer of OWR advised me to turn to you for information as he is passing the device parameter that holds the serial number when calling Soapy.

Example from the OWR script for one of the devices (my xxx to hide the complete number)
"device": "serial=1040xx323198000ffbff3300d0d1024xxx"

Both devices also have a different IP address and a different hardware build version B. and C. Besides that, one of them is a Pluto+ but that should not matter ;-)

Thanks de Erwin
PE3ES / F4VTQ

[ERROR] no device found in this context.?

Hi just install from source in the jetson nano but the command :

SoapySDRUtil--probe="driver=plutosdr,hostname=192.168.2.1"

give me this error but the pluto is connected and detected with the iio_info -n 192.168.2.1 command.

Also SoapySDRUtil --find detects it:
######################################################

Soapy SDR -- the SDR abstraction library

######################################################

Found device 0
device = plutosdr
driver = plutosdr
uri = local:

Found device 1
device = plutosdr
driver = plutosdr
uri = usb:1.6.5

how should i run the command?.

What is timeoutUS

Hi,

I am working on a SDR board that has a AD9361 like plutoSDR and uses iio drivers. So I am modifying this soapypluto to connect my SDR to other softwares like SRS Lte and etc.

My problem is that soapypluto doesn't support timestamps and leaves them unused in receive and transmit functions probably because plutoSDR does not have timing support. So I implemented timing functions on my SDR and I modified iio drivers to provide timing functions both on rx and tx.

I tried to figure out what the purpose of timeoutUS parameter is. But I couldnt find anything.
Could you explain what the functionality of timeoutUS is? Because it is both in TX and RX functions.

Support for DC Block Option

Hi, thanks for the work here and with SoapySDR in general! I'm looking for some guidance on options I can (or can't) pass through using rx_sdr's new -t option. I'm looking to do DC spike removal and offset tuning. Thanks in advance!

Segmentation fault on any radio program

I'm using an ADALM-PLUTO device, and have installed this driver to use with programs such as SigDigger. However, I get a segmentation fault in those programs. I have also tried the probe command SoapySDRUtil --probe="driver=plutosdr", but no luck.

Looking at the core dump and by compilling some libraries, I found out that the code responsible for finding devices (in PlutoSDR_Settings.cpp) is returning null values:

dev = iio_context_find_device(ctx, "ad9361-phy");
rx_dev = iio_context_find_device(ctx, "cf-ad9361-lpc");
tx_dev = iio_context_find_device(ctx, "cf-ad9361-dds-core-lpc");
this->setAntenna(SOAPY_SDR_RX, 0, "A_BALANCED");
this->setAntenna(SOAPY_SDR_TX, 0, "A");

Both dev, rx_dev and tx_dev are initialized to 0x00, causing the crash. I initially assumed it was a problem with the ad9361 driver, but after opening an issue there (analogdevicesinc/libad9361-iio#56) it was suggested I ask here instead.

I'm using Arch Linux, and installed soapyplutosdr which should include everything needed AFAIK.

Probably a duplicate of #25, but when I compiled this I had zero warnings.

Unable to compile with recent change

I get the following compilation error after commit fb6fbd2:

/home/darsor/build/aur/soapyplutosdr-git/src/soapyplutosdr/PlutoSDR_Registation.cpp: In function ‘std::vector<std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> > > find_PlutoSDR(const Kwargs&)’:
/home/darsor/build/aur/soapyplutosdr-git/src/soapyplutosdr/PlutoSDR_Registation.cpp:32:43: error: cannot convert ‘const mapped_type’ {aka ‘const std::__cxx11::basic_string<char>’} to ‘const char*’
   ctx = iio_create_network_context(args.at("hostname"));
                                    ~~~~~~~^~~~~~~~~~~~
In file included from /home/darsor/build/aur/soapyplutosdr-git/src/soapyplutosdr/SoapyPlutoSDR.hpp:1,
                 from /home/darsor/build/aur/soapyplutosdr-git/src/soapyplutosdr/PlutoSDR_Registation.cpp:1:
/usr/include/iio.h:338:67: note:   initializing argument 1 of ‘iio_context* iio_create_network_context(const char*)’
 __api struct iio_context * iio_create_network_context(const char *host);
                                                       ~~~~~~~~~~~~^~~~

I was able to fix it by changing line 32 in PlutoSDR_Registration.cpp to

ctx = iio_create_network_context(args.at("hostname").c_str());

PlutoSDR only works for a short time (readStream timeout!)

Hello,

I'm trying to get a Pluto running locally attached to a Debian PC with OpenWebRX. It also works, but after a short while it kicks out, the system load ramps up to the max and the log says:

WARNING: SoapySDR::Device::readStream timeout!

And the log is flooded.

SoapySDRUtil --probe=driver=plutosdr
######################################################

Soapy SDR -- the SDR abstraction library

######################################################

Probe device driver=plutosdr
ERROR: Unable to create Avahi DNS-SD client :Daemon not running
[WARNING] Unable to scan ip: -26

[INFO] Opening PlutoSDR #0 usb:2.9.5...


-- Device identification

driver=PlutoSDR
hardware=ADALM-PLUTO
ad9361-phy,model=ad9364
ad9361-phy,xo_correction=39999947
backend_version=0.24 (git tag: v0.24)
fw_version=v0.35
hw_model=Analog Devices PlutoSDR Rev.B (Z7010-AD9364)
hw_model_variant=1
hw_serial=104473dc5993001711003300d1172a962c
library_version=0.24 (git tag: e598e4b)
local,kernel=5.10.0-98231-g9dfba10b795d
uri=usb:2.9.5
usb,idProduct=b673
usb,idVendor=0456
usb,libusb=1.0.24.11584
usb,product=PlutoSDR (ADALM-PLUTO)
usb,release=2.0
usb,serial=104473dc5993001711003300d1172a962c
usb,vendor=Analog Devices Inc.


-- Peripheral summary

Channels: 1 Rx, 1 Tx
Timestamps: NO
Sensors: xadc_temp0, xadc_voltage0, xadc_voltage1, xadc_voltage2, xadc_voltage3, xadc_voltage4, xadc_voltage5, xadc_voltage6, xadc_voltage7, xadc_voltage8, adm1177_current0, adm1177_voltage0, ad9361-phy_temp0, ad9361-phy_voltage2


-- RX Channel 0

Full-duplex: YES
Supports AGC: YES
Stream formats: CS8, CS12, CS16, CF32
Native format: CS16 [full-scale=2048]
Antennas: A_BALANCED
Full gain range: [0, 73] dB
PGA gain range: [0, 73] dB
Full freq range: [70, 6000] MHz
RF freq range: [70, 6000] MHz
Sample rates: [0.260417, 61.44] MSps
Filter bandwidths: 0.2, 1, 2, 3, 4, 6, 7, 8, 9, 10 MHz


-- TX Channel 0

Full-duplex: YES
Supports AGC: NO
Stream formats: CS8, CS12, CS16, CF32
Native format: CS16 [full-scale=32768]
Antennas: A
Full gain range: [0, 89] dB
PGA gain range: [0, 89] dB
Full freq range: [70, 6000] MHz
RF freq range: [70, 6000] MHz
Sample rates: [0.260417, 61.44] MSps
Filter bandwidths: 0.2, 1, 2, 3, 4, 6, 7, 8, 9, 10 MHz

Does one of you have an idea?

Correct way to pass samples to API

Hi,
I want to have expert opinion on passing samples to an API, i am using liquid-dsp to tranmsit and receive samples using pluto. The API performs GMSK modulation and demodulation. The program runs perfectly when run standalone with different values of 'k' and 'm' and even runs perfectly with plutosdr as long as i keep k=2 and m=3. No other values like k=26 m=4 and others invoke the receive packet call back function, somehow preamble is lost i think.
The standalone code is here
https://github.com/jgaeddert/liquid-dsp/blob/master/examples/gmskframesync_example.c
I suspect that might be there is some circular buffering that needs to be implemented, although it works for k=2 and m=3.
Followinf is my payload sending part of code

`
unsigned char payload[]="123456TxTest123456Txtest";
    payload_len=strlen(payload);
    // create frame generator and assemble
    gmskframegen fg = gmskframegen_create_set(k, m, BT);
    gmskframegen_assemble(fg, header, payload, payload_len, check, fec0, fec1);

    

    // allocate buffer for storing entire frame
    unsigned int num_samples = gmskframegen_getframelen(fg) + 800;
    float complex buf[num_samples];
    memset(buf, 0x00, num_samples*sizeof(float complex));

    // generate frame in one shot with sample offset
    gmskframegen_write(fg, buf+0, num_samples-0);

    int flags=0; //flags set by receive operation
    long long timeNs=1000000; //timestamp for receive buffer

    int j=num_samples;
    float complex *ptr;
    int pcount=0;
    while(run && (pcount<11) ){
                j=num_samples;
		int count=0;
		ptr=buf;
   		while(j > 0){
     		void *buffs[]={ptr}; //array of buffers
       		int ret= SoapySDRDevice_writeStream(sdr, txStream,buffs,j,&flags,timeNs,1000000); //100000 
			//ret= SoapySDRDevice_writeStream(txStream, buffs, cnt, &flags, &timeNs, 1000000); //100000 
			//printf("After Read Stream\n");
		       if (ret==SOAPY_SDR_TIMEOUT){
				printf("SOAPY_SDR_TIMEOUT\n");
			//continue;
			} 
			else if( ret==SOAPY_SDR_STREAM_ERROR ){
				printf("SOAPY_SDR_STREAM_ERROR\n");
			//continue;
			}
			else if( ret==SOAPY_SDR_CORRUPTION){
				printf("SOAPY_SDR_CORRUPTION\n");
			//continue;
			}
			else if( ret==SOAPY_SDR_OVERFLOW){
				printf("SOAPY_SDR_OVERFLOW\n");
			//continue;
			}
			else if( ret==SOAPY_SDR_NOT_SUPPORTED){
				printf("SOAPY_SDR_NOT_SUPPORTED\n");
			//continue;
			}
			else if( ret== SOAPY_SDR_TIME_ERROR){
				printf(" SOAPY_SDR_TIME_ERROR\n");
			//continue;
			}
			else if( ret== SOAPY_SDR_UNDERFLOW){
				printf(" SOAPY_SDR_UNDERFLOW\n");
			//continue;
			}
			else if (ret>0)
			{
		       	  		
				;//printf("Sucesfully Sent ret=%d \n",ret);
	
			}
			
			j -= ret;
			ptr += ret;
			
      //printf("Bef\n");

    
    //printf("After\n");
    }

	printf("A Packet Sent count=%d\n",++pcount);     
	sleep(1);
     
    }
`

At the receiverthe thread captures and decode like this


 gmskframesync fs = gmskframesync_create_set(k, m, BT, callback, NULL);
    //int num_samples=100;
    float complex bufRx[8192]; // num_samples
    memset(bufRx, 0x00, 8192*sizeof(float complex));
    int ret;
    int flags=0; //flags set by receive operation
    long long timeNs=1000000; //timestamp for receive buffer
    printf("Thread Started \n");
    while(run){
    void *buffsRx[]={bufRx};
    ret = SoapySDRDevice_readStream(sdr, rxStream, buffsRx, 1024, &flags, &timeNs, 100000);
    // push samples through synchronizer
    if(ret>0)
    	gmskframesync_execute(fs, bufRx, ret); // num_samples <->ret
    usleep(1);	
    }

This is the call back function, which only is invloked with valid and sometimes non valid data for k=2 and m=3 but not for k=26 and m=4


int callback(unsigned char *  _header,
             int              _header_valid,
             unsigned char *  _payload,
             unsigned int     _payload_len,
             int              _payload_valid,
             framesyncstats_s _stats,
             void *           _userdata)
{
    printf("***** gmskframesync callback invoked ***** RSSI=%f rxcount=%d\n",_stats.rssi,++rxCount);
    if( _header_valid && _payload_valid  ){
     printf("\n Both Header Payload Valid-----------payload Length=%d valid=%d\n",_payload_len,++valid);
     for(int a=0; a< _payload_len; a++)
	printf("%c", _payload[a]);
	
	
     }
     if( _header_valid && !_payload_valid){
     printf("\n---- Header-Only Valid-------payload Length=%d\n",_payload_len);
	
	}

 
    printf("===============================================================\n \n");
    return 0;
}

Can anyone identify my mistake ?

Make a release?

It has been quite some time since the last release of SoapyPlutoSDR, version 0.2.0 on June 22nd 2019.
Since then, there have been some small, but pretty important changes. For instance, a project of mine that uses SoapyPlutoSDR needs this fix from March 3rd 2020 to function properly, but my distribution ships the release version from 2019.

Is there any reason not to tag a release to get the bugfixes and improvements since then out there?

Doesn't work for me at all

When using "SoapySDRUtil --probe" I get a "segmentation fault". I used different setups. Debian, Kali, Ubuntu. Tried to install from repos if possible, tried to install only from source. Tried the newest firmware 0.30, also the previous 0.29 version. Tried different versions of SoapySDR. And so on. It always comes down to SoapyPlutoSDR not working.
When I use the command "make" I also get a compilation waring. It is still able to build. I don't have the text anymore since I deleted everything again, but the problem had something to do with "iio_buffer *buf;" in line 51 and "size_t mtu_size;" in line 54 of the file SoapyPlutoSDR.hpp. I also tried an older version of SoapyPlutoSDR which is still on github. It had no compilation warning, but same "segmentation fault" error.

Arbitrary sample rates

Feature request: PLUTO does not require fixed set of sample rates. Allow arbitrary rates within valid range.

Frequency correction API

I've been trying to find out why gr-osmosdr wrapping SoapyPlutoSDR doesn't support setting frequency correction. From a cursory reading of the plutosdr settings it doesn't seem to be implemented at all. Is this right?
Ref. qradiolink/qradiolink#53

I think Soapy is leaving Pluto open, which affects the functioning of Pluto SDR Sink and Pluto SDR Source (gr-iio module of GNU Radio)

Using the blocks Pluto SDR Sink and Pluto SDR Source (from the module gr-iio), I was able to send and receive a signal in the same Adalm-Pluto with no problems.

Then, because I wanted to use the Soapy library, I installed the Soapy Pluto plugin (https://github.com/pothosware/SoapyPlutoSDR) and then used the blocks Soapy Pluto Sink and Soapy Pluto Source to again send the same signal, which went fine.

Then, when I tried to run the initial blocks again, Pluto SRD Sink and Pluto SDR Source, despite the program starting and being apparently able to connect to the Plutos, I wasn't receiving any signal, or being able to control on run-time the transmitting or receiving power of Adalm-Pluto.

When I tried to use another Pluto, I could send signals again. However, as soon as I use the Soapy blocks, the blocks from the gr-iio module stop working. This error is probably due to Soapy leaving Pluto open. I suspect this because if I unplug the Pluto and then turn it on again, the modules Pluto SDR Sink and Pluto SDR Source work fine again.

System Information
OS: Fedora 39 on Virtual Box
GR Installation Method: Source

GNU Radio Version
3.11-git (main)

Specific Version
v3.11.0

Steps to Reproduce the Problem

  • Send and receive a signal using blocks Pluto SDR Sink and Pluto SDR Source. Everything should go well.
  • Send and receive a signal using blocks Soapy Pluto Sink and Soapy Pluto SDR. Everything should go well.
  • Send and receive a signal again using blocks Pluto SDR Sink and Pluto SDR Source. You should be able to start the flowgraph, but not of receiving any signal.

Maximum sample rate limitation SoapyPlutoSDR

I use the Pluto SDR to generate DATV (Digital amateur tv) and found a limitation in the maximum sample rate I could use.
My setup is OBS -> FFmpeg -> GNURadio version 3.9.2.0-0 > Pluto

I used a symbol rate of 2300 KSymbols/s to generate DVB-S2 for HDTV ( needs a sample rate of 4.6 Msps) and found that SoapyPlutoSDR couldn't handle this. By using SoapySDRUtil I found that the maximum is 4.2 ~ 4.0 Msps whatever test rate I set above it.

SoapySDRUtil --args="driver=plutosdr" --rate=4600000 --direction=TX
######################################################

Soapy SDR -- the SDR abstraction library

######################################################

[INFO] Using format CS16.
[INFO] Has direct TX copy: 1
Stream format: CS16
Num channels: 1
Element size: 4 bytes
Begin TX rate test at 4.6 Msps
Starting stream loop, press Ctrl+C to exit...
4.23133 Msps 16.9253 MBps
4.23418 Msps 16.9367 MBps
....

Is there a way to increase this max sample rate in the source code as I didn't had this problem with the old OTT gr-iio module code of Analog Devices as used with previous GNURadio releases? (With the usual maximum practical limitations of the Pluto/Firmware and USB2)

Ubuntu 18.04 plutosdr build from source error

is there something missing on my side?
I try to build the soapysdr for Plutosdr on Ubnutu18.04 and after "make" I see it is 100% but the following error message came up and makefile failed.?

[100%] Linking CXX shared module libPlutoSDRSupport.so
CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Streaming.cpp.o: In function rx_streamer::start(int, long long, unsigned long)': PlutoSDR_Streaming.cpp:(.text+0x14fa): undefined reference to pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/PlutoSDRSupport.dir/build.make:175: recipe for target 'libPlutoSDRSupport.so' failed
make[2]: *** [libPlutoSDRSupport.so] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/PlutoSDRSupport.dir/all' failed
make[1]: *** [CMakeFiles/PlutoSDRSupport.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

how to set manual gain mode in python?

Hi,
I am a bit confused when using the qspectrumanalyzer which depends on two python deps:

  • soapypower, fft and device data
  • simplesoapy, a simple python-soapysdr encap

And this simple and beautiful PyQt works with my PlutoSDR through this long chain of invocations:

qspectrumanalyzer -> soapypower- > simplesoapy -> SoapyPlutoSdr -> SoapySDR

What's about this issue is this line of code, which determins if PlutoSDR is in AGC or manual:
gain mode settings in SoapyPlutoSDR

`void SoapyPlutoSDR::setGainMode( const int direction, const size_t channel, const bool automatic )
{

gainMode = automatic;
if(direction==SOAPY_SDR_RX){
    std::lock_guard<pluto_spin_mutex> lock(rx_device_mutex);
	if (gainMode) {

		iio_channel_attr_write(iio_device_find_channel(dev, "voltage0", false), "gain_control_mode", "slow_attack");

	}else{

		iio_channel_attr_write(iio_device_find_channel(dev, "voltage0", false), "gain_control_mode", "manual");
	}

}

}`

According to my tests in qspectrumanalyzer, setting gain values regarding to my consist sample signal, does NOT change the detected power of signal, which means, gain control does NOT work.

And,

I have a power controlled RF source to test power level of plotting, when i increase the power of the signal, the power in the plot does NOT change in the graph, however the noise floor drops!

Please correct me if my conclusion is incorrect, or misinterpreted.

I want to know how to set proper gain mode for Pluto by SoapySDR in python, please, so I can confirm if this is bug came from this quirky gain control method, which standard ways of gain mode/control didn't picked it up.

Thanks.

SoapyPlutoSDR included in Pothos?

Please forgive me if this is a stupid question, but should SoapyPlutoSDR be included with the Pothos distribution? This page made me think so, but my device is not detected. And, no "pluto" related file in lib/SoapySDR/modules0.8. I installed the latest release PothosSDR-2021.02.28-vc16-x64. SDR Console works on the same machine. Any hints for getting this to work?

Support for second RX channel?

I know the internal AD chipset permits a second RX channel---how difficult would it be to add support for this second channel? I have a Pluto+ (Chinese variant) with dual receive, and I was hoping to use the second channel in a calibration context with SoapyPower.

Any hints you could give would be much appreciated!

Simplified, cleaner RX Streaming

Hello @cjcliffe, @guruofquality and @zuckschwerdt !

Charles and I received our new PLUTO toys, and quickly discovered problems on both Linux and Windows the first being that apparently the streaming was heavily stuttering in CubicSDR for any samplerate, and crashing the application when changing it.

Having a look on the code alone, here my first remarks:

  • Why an additonal thread rx_streamer::refill_thread to feed readStream instead of using the iio_xxx API directly. Indeed, most if not all others SoapySDR call directly pull-like specific device read to pull samples from the device. So?
  • Consequently far too many var-conds and waiting while(), and manual lock() and unlock() to make rx_streamer::refill_thread work cleanly with the rest. Maybe just a feeeling, but...
  • Together with volatile usage instead of atomic so it probably doesn't work as you would expect. (short answer: it doesn't work)

When I have spare time I will experiment by replacing the buffer management by something that already works well like in SoapySDRPlay (and is complicated enough already) and see where it goes.
Hopefully it will bug the same way for both.

Of course, I'll keep the structure and all the good stuff already there. (LUTs, direct-copy,...)

And yes, throw a ton of coments explaining stuff. And braces over ALL blocks. Because I'm a clean code nazi.

Please @zuckschwerdt don't get those coments badly I'm very grateful you created this !

Regards,

Vincent

Tx samples Correct format

Hi
I am having trouble transmitting with plutosdr with specified formats like CF32 and CS 16 .
Although I was able to send some pulses using CU8 format but those were values like 127 -127 , more here #63.

I have gausian filtered data that has been accumulated (integrated). Now trying to transmit the data results in no transmisssion, verified through 'SdrSharp'. I want to know what values the soapysdr library expects for pluto to be. When using complex float or 16 bit integer, What is the range of values the data should fit in?.
Also I have seen example of narrow band fm transmitter where CF32 format is used and the samples values are stored in a variable and assigned to void buffer like this

float buff;
--- fill buff samples from wave file
void *buffs={buff}

Now transmission is done with writestream function.
Here I assume that wave file already had scaled samples so no scaling was done and wave file transmitted successfully. But it seems strange that CF32 format was specified but samples were stored in float (not complex float) and it did transmit.
Besides this the main question is what are the ranges the data should fit in for float and 16 bit integer samples.
Thanks

Receiving from radio while in IDLE_RX

Hi,

I am using srsLTE on the UE side and I use this driver and ADRV9361 board for that. In the early stages of the connection, after MIB decode, before finding the PLMN, I see these lines from srsLTE ue:
SYNC: Receiving from radio while in IDLE_RX
SYNC: Receiving from radio while in IDLE_RX
SYNC: Receiving from radio while in IDLE_RX
SYNC: Receiving from radio while in IDLE_RX
SYNC: Receiving from radio while in IDLE_RX
SYNC: Receiving from radio while in IDLE_RX
SYNC: Receiving from radio while in IDLE_RX
SYNC: Receiving from radio while in IDLE_RX
SYNC: Receiving from radio while in IDLE_RX
SYNC: Receiving from radio while in IDLE_RX
SYNC: Receiving from radio while in IDLE_RX
SYNC: Receiving from radio while in IDLE_RX
I could realize that when the UE is in the IDLE state, for some reason the recv function in the driver gets called while the buf is NULL pointer.
Is this a problem which can affect the rest of the connection process? or I can ignore it do you think?

Thanks for your help in advance,
Samie

cmake not finding the soapysdr directory

Building in a Ubuntu 18.04 VirtualBox on Solus Linux. Solus host, Ubuntu client.
Built all Sophos and Soapy materials and libiio and libad9361

But cmake throws error that SoapySDR can not be found.
Did not change any paths from the standard install.

I will now try SoapySDRplay install to see if same is happening.

Make a new 0.2.2 release

As there are quite some corrections and fixes since 0.2.1 it would be nice to have an actual release (or at least a tag).

Driver discovery method sometimes is incompatible with SoapyRTLSDR

Hi all,

While testing the last PothosSDR package (PothosSDR-2019.03.24-vc14-x64.exe) I've found that sometimes RTL SDR V3 is not initializing correctly.

After a small investigation it was found that the problem is causing by having PlutoSDRSupport.dll in the drivers folder.
More details here: pothosware/SoapyRTLSDR#38

Maybe 2 threads are trying to access USB bus at the same time during the devices enumeration.
Please check.

Sample rates between 25e6/48 and 25e6/12 don't work

Hi,

I noticed that sample rates between 25e6/48 and 25e6/12 don't work. I found the answer in the Linux IIO driver notes, which states that:

The minimum ADC rate is 25MSPS. Baseband rates below 2.083 MSPS (25MSPS/12) require FIR decimation/interpolation to be set. In other words the FIR filter needs to be configured and enabled. The minimum baseband rate with the FIR filter (decimate by 4) enabled is: 25MSPS /(4*12) = 520.83 kSPS.

I think it requires manually setting FIR filter taps, though I am not sure. I didn't have time to play around with it.

Rates below 25e6/48 seem to work the way it is currently handled in the code.

Plutosdr Transmits only once

Hi All,
I have been trying to send IQ samples, stored in a buffer, multiple times through Plutosdr but the SDR transmits only once, for sending multiple times the executable file needs to be re run. But then again the plutoSDR transmits only once.

My environment is UBUNTU and installed SoapyPlutoSDR with all dependies succesfully, i.e. libiio-v0 (new version cannot be installed, gives error) , libad9361 & SoapySDR and using SoapySDR C API.

I have verified very first transmission by looking into spectrum using SDRsharp on another PC.
Strangely, the SoapySDRDevice_writeStream() returns correct number of bytes every time it is called but transmission is done by SDR only once.

if (txStream == NULL)
    	{
        	printf("setupStream fail: %s\n", SoapySDRDevice_lastError());
        	SoapySDRDevice_unmake(sdr);
        	return EXIT_FAILURE;
    	}
	printf(" After: SoapySDRDevice_setupStream \n");  
    else
	SoapySDRDevice_activateStream(sdr, txStream, 0, 0, 0); //start streaming

After every transmission i also wait for key-press to continue to avoid any timing issue of PlutoSDR, if any , for transmission but no luck.
I am setting gain of PLutosdr manually

if ( SoapySDRDevice_setGain(sdr, SOAPY_SDR_TX, 0, 25.0)==0 )
   	{	
		printf("-----------------------Manual Gain SET \n"); 
   	}
   	else
	{
		printf("Gain Set Error\n");
		exit(0); 
	}

Initially, i though that might be somehow the Tx gain is reset to 0 after very first causing transmission with 0 power since writeStream function returns number of bytes sent and not 0, so i called SoapySDRDevice_setGain() after every transmission but no luck. But again its strange that when executeable is re-run than plutosdr transmits but for very first time only.
I transmit by filling buf array with IQ samples in a loop

    void *buffs[] = {buf}; //array of buffers
    int flags=0; //flags set by receive operation
    long long timeNs=1000000; //timestamp for tx buffer
    ret= SoapySDRDevice_writeStream(sdr, txStream, &buffs[0], j, &flags, &timeNs, 100000); //100000 

Any solution please.

Needs updates to work with future libiio 1.0

I built last libiio (v1.0) and libad9361 (v0.2).

Now I got errors liking SoapyPlutoSDR

[100%] Linking CXX shared module libPlutoSDRSupport.so
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Registration.cpp.o: in function `find_PlutoSDR(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&)':
PlutoSDR_Registration.cpp:(.text+0x11ab): undefined reference to `iio_create_scan_context'
/usr/bin/ld: PlutoSDR_Registration.cpp:(.text+0x11d5): undefined reference to `iio_scan_context_get_info_list'
/usr/bin/ld: PlutoSDR_Registration.cpp:(.text+0x132c): undefined reference to `iio_context_info_list_free'
/usr/bin/ld: PlutoSDR_Registration.cpp:(.text+0x1336): undefined reference to `iio_scan_context_destroy'
/usr/bin/ld: PlutoSDR_Registration.cpp:(.text+0x143c): undefined reference to `iio_create_network_context'
/usr/bin/ld: PlutoSDR_Registration.cpp:(.text+0x2045): undefined reference to `iio_context_info_get_uri'
/usr/bin/ld: PlutoSDR_Registration.cpp:(.text+0x204d): undefined reference to `iio_create_context_from_uri'
/usr/bin/ld: PlutoSDR_Registration.cpp:(.text+0x206a): undefined reference to `iio_context_info_get_uri'
/usr/bin/ld: PlutoSDR_Registration.cpp:(.text+0x22d5): undefined reference to `iio_context_info_list_free'
/usr/bin/ld: PlutoSDR_Registration.cpp:(.text+0x22df): undefined reference to `iio_scan_context_destroy'
/usr/bin/ld: PlutoSDR_Registration.cpp:(.text+0x2fe7): undefined reference to `iio_context_info_list_free'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::setAntenna(int, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
PlutoSDR_Settings.cpp:(.text+0x1ae): undefined reference to `iio_channel_attr_write'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x1f3): undefined reference to `iio_channel_attr_write'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::setGainMode(int, unsigned long, bool)':
PlutoSDR_Settings.cpp:(.text+0x272): undefined reference to `iio_channel_attr_write'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x297): undefined reference to `iio_channel_attr_write'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::setGain(int, unsigned long, double)':
PlutoSDR_Settings.cpp:(.text+0x307): undefined reference to `iio_channel_attr_write_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x358): undefined reference to `iio_channel_attr_write_longlong'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::getGain(int, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const':
PlutoSDR_Settings.cpp:(.text+0x3dd): undefined reference to `iio_channel_attr_read_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x43a): undefined reference to `iio_channel_attr_read_longlong'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::setFrequency(int, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, double, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&)':
PlutoSDR_Settings.cpp:(.text+0x4c3): undefined reference to `iio_channel_attr_write_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x513): undefined reference to `iio_channel_attr_write_longlong'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::getFrequency(int, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const':
PlutoSDR_Settings.cpp:(.text+0x59d): undefined reference to `iio_channel_attr_read_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x5fd): undefined reference to `iio_channel_attr_read_longlong'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::getSampleRate(int, unsigned long) const':
PlutoSDR_Settings.cpp:(.text+0x68d): undefined reference to `iio_channel_attr_read_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x6ea): undefined reference to `iio_channel_attr_read_longlong'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::setBandwidth(int, unsigned long, double)':
PlutoSDR_Settings.cpp:(.text+0x763): undefined reference to `iio_channel_attr_write_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x7b0): undefined reference to `iio_channel_attr_write_longlong'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::getBandwidth(int, unsigned long) const':
PlutoSDR_Settings.cpp:(.text+0x82d): undefined reference to `iio_channel_attr_read_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x88a): undefined reference to `iio_channel_attr_read_longlong'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::setSampleRate(int, unsigned long, double)':
PlutoSDR_Settings.cpp:(.text+0x953): undefined reference to `iio_channel_attr_write_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x987): undefined reference to `iio_channel_attr_write_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0xa30): undefined reference to `iio_channel_attr_write_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0xa5d): undefined reference to `iio_channel_attr_write_longlong'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::~SoapyPlutoSDR()':
PlutoSDR_Settings.cpp:(.text+0xcea): undefined reference to `iio_channel_attr_read_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0xd10): undefined reference to `iio_channel_attr_write_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0xd43): undefined reference to `iio_channel_attr_read_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0xd6c): undefined reference to `iio_channel_attr_write_longlong'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::get_sensor_value(iio_channel*) const':
PlutoSDR_Settings.cpp:(.text+0x137b): undefined reference to `iio_channel_attr_read'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x13c3): undefined reference to `iio_channel_attr_read'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x1401): undefined reference to `iio_channel_attr_read'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x1448): undefined reference to `iio_channel_attr_read'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::SoapyPlutoSDR(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&)':
PlutoSDR_Settings.cpp:(.text+0x1b25): undefined reference to `iio_channel_attr_write'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x1ba0): undefined reference to `iio_channel_attr_write'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x1df1): undefined reference to `iio_create_context_from_uri'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x1ef7): undefined reference to `iio_create_network_context'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x1f01): undefined reference to `iio_create_default_context'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::getHardwareInfo[abi:cxx11]() const':
PlutoSDR_Settings.cpp:(.text+0x4111): undefined reference to `iio_library_get_version'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x4289): undefined reference to `iio_context_get_version'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Streaming.cpp.o: in function `SoapyPlutoSDR::closeStream(SoapySDR::Stream*)':
PlutoSDR_Streaming.cpp:(.text+0x274): undefined reference to `iio_channel_attr_write_bool'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x30b): undefined reference to `iio_channel_attr_write_bool'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Streaming.cpp.o: in function `rx_streamer::recv(void* const*, unsigned long, int&, long long&, long)':
PlutoSDR_Streaming.cpp:(.text+0x460): undefined reference to `iio_buffer_refill'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x478): undefined reference to `iio_buffer_step'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x4a2): undefined reference to `iio_buffer_step'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x4d9): undefined reference to `iio_buffer_step'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x537): undefined reference to `iio_buffer_first'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x675): undefined reference to `iio_buffer_start'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Streaming.cpp.o: in function `rx_streamer::start(int, long long, unsigned long)':
PlutoSDR_Streaming.cpp:(.text+0xbc1): undefined reference to `iio_buffer_step'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0xbd0): undefined reference to `iio_buffer_start'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0xbe2): undefined reference to `iio_buffer_first'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Streaming.cpp.o: in function `rx_streamer::has_direct_copy()':
PlutoSDR_Streaming.cpp:(.text+0xe7e): undefined reference to `iio_buffer_step'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0xe9d): undefined reference to `iio_buffer_start'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0xeaf): undefined reference to `iio_buffer_first'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Streaming.cpp.o: in function `tx_streamer::flush()':
PlutoSDR_Streaming.cpp:(.text+0xf84): undefined reference to `iio_buffer_push'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0xf9d): undefined reference to `iio_buffer_step'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0xfc9): undefined reference to `iio_buffer_step'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0xfd5): undefined reference to `iio_buffer_start'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0xfe6): undefined reference to `iio_buffer_end'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Streaming.cpp.o: in function `tx_streamer::send_buf()':
PlutoSDR_Streaming.cpp:(.text+0x1024): undefined reference to `iio_buffer_push'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x103d): undefined reference to `iio_buffer_step'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x1069): undefined reference to `iio_buffer_step'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x1075): undefined reference to `iio_buffer_start'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x1086): undefined reference to `iio_buffer_end'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Streaming.cpp.o: in function `tx_streamer::send(void const* const*, unsigned long, int&, long long, long)':
PlutoSDR_Streaming.cpp:(.text+0x10ee): undefined reference to `iio_buffer_step'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x117b): undefined reference to `iio_buffer_first'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x13ae): undefined reference to `iio_buffer_start'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x13e2): undefined reference to `iio_buffer_start'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x1454): undefined reference to `iio_buffer_start'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Streaming.cpp.o: in function `tx_streamer::has_direct_copy()':
PlutoSDR_Streaming.cpp:(.text+0x182e): undefined reference to `iio_buffer_step'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x184d): undefined reference to `iio_buffer_start'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x185f): undefined reference to `iio_buffer_first'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Streaming.cpp.o: in function `rx_streamer::rx_streamer(iio_device const*, plutosdrStreamFormat, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&)':
PlutoSDR_Streaming.cpp:(.text+0x1cba): undefined reference to `iio_channel_attr_read_longlong'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Streaming.cpp.o: in function `tx_streamer::tx_streamer(iio_device const*, plutosdrStreamFormat, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&)':
PlutoSDR_Streaming.cpp:(.text+0x20e1): undefined reference to `iio_buffer_step'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x20f0): undefined reference to `iio_buffer_start'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x2102): undefined reference to `iio_buffer_first'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Streaming.cpp.o: in function `SoapyPlutoSDR::setupStream(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&)':
PlutoSDR_Streaming.cpp:(.text+0x2212): undefined reference to `iio_channel_attr_write_bool'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x2332): undefined reference to `iio_channel_attr_write_bool'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/PlutoSDRSupport.dir/build.make:152: libPlutoSDRSupport.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:123: CMakeFiles/PlutoSDRSupport.dir/all] Error 2
make: *** [Makefile:149: all] Error 2

Any issue with these lib versions ?

Segmentation fault while trying to capture signal with GR-GSM and PlutoSDR

Hi everyone!

When I try to use PlutoSDR with GR-GSM to cature a signal get the error:

$ grgsm_capture -a32 test.cfile -T10
gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.10.1.1
built-in source types: file fcd rtl rtl_tcp hackrf bladerf rfspace soapy redpitaya
[INFO] Opening PlutoSDR #0 usb:1.8.5...
[INFO] Using format CF32.
Segmentation fault

while the RTL SDR works without problems:

$ grgsm_capture -a32 test.cfile -T10
gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.10.1.1
built-in source types: file fcd rtl rtl_tcp hackrf bladerf rfspace soapy redpitaya
Using device #0 Realtek RTL2838UHIDIR SN: 00000001
Found Rafael Micro R820T tuner
[R82XX] PLL not locked!
Exact sample rate is: 1000000.026491 Hz
[R82XX] PLL not locked!
Allocating 15 zero-copy buffers
rtlsdr_read_async returned with -5

I use:

$ SoapySDRUtil --info

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

Lib Version: v0.8.1-g9c4fa324
API Version: v0.8.200
ABI Version: v0.8-2
Install root: /usr/local
Search path:  /usr/local/lib/SoapySDR/modules0.8-2
Module found: /usr/local/lib/SoapySDR/modules0.8-2/libPlutoSDRSupport.so (0.2.1-a07c372)
Available factories... plutosdr
Available converters...
 -  CF32 -> [CF32, CS16, CS8, CU16, CU8]
 -  CS16 -> [CF32, CS16, CS8, CU16, CU8]
 -  CS32 -> [CS32]
 -   CS8 -> [CF32, CS16, CS8, CU16, CU8]
 -  CU16 -> [CF32, CS16, CS8]
 -   CU8 -> [CF32, CS16, CS8]
 -   F32 -> [F32, S16, S8, U16, U8]
 -   S16 -> [F32, S16, S8, U16, U8]
 -   S32 -> [S32]
 -    S8 -> [F32, S16, S8, U16, U8]
 -   U16 -> [F32, S16, S8]
 -    U8 -> [F32, S16, S8]

Any ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.