pothosware / SoapyAirspyHF

SoapySDR plugin to support the Airspy HF+
https://github.com/pothosware/SoapyAirspyHF/wiki
MIT License
24 stars 17 forks source link

SoapyAirspyHF drivers in colision with SimpleSoapy #22

Open otpisani opened 2 years ago

otpisani commented 2 years ago

Can someone share, tested and working system, which version of libraries are actually working , I will do downgrade, never mind.

I have SoapySDR 0.8.1 soapy-power 1.6.1 SimpleSoapy 1.5.1 last update from 2017

System is arch linux Linux lenovo-lap 5.15.33-1-lts #1 SMP Fri, 08 Apr 2022 13:43:36 +0000 x86_64 GNU/Linux

airspy drivers are from AUR which is latest, but I also try with downgraded drivers, which I compiled.

https://aur.archlinux.org/packages/airspyhf-git https://aur.archlinux.org/packages/soapyairspyhf-git

SoapySDRUtil gave me this ######################################################

Soapy SDR -- the SDR abstraction library

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

Lib Version: v0.8.1-ARCH API Version: v0.8.0 ABI Version: v0.8 Install root: /usr Search path: /usr/lib/SoapySDR/modules0.8 Search path: /usr/local/lib/SoapySDR/modules0.8 Module found: /usr/lib/SoapySDR/modules0.8/libHackRFSupport.so (0.3.3) Module found: /usr/lib/SoapySDR/modules0.8/libairspyhfSupport.so (0.2.0-d682533) Module found: /usr/lib/SoapySDR/modules0.8/librtlsdrSupport.so (0.3.2) Available factories... airspyhf, hackrf, rtlsdr Available converters...

Traceback (most recent call last): File "/usr/bin/soapy_power", line 33, in sys.exit(load_entry_point('soapy-power==1.6.1', 'console_scripts', 'soapy_power')()) File "/usr/lib/python3.10/site-packages/soapypower/main.py", line 366, in main sdr.sweep( File "/usr/lib/python3.10/site-packages/soapypower/power.py", line 296, in sweep psd_future, acq_time_start, acq_time_stop = self.psd(freq) File "/usr/lib/python3.10/site-packages/soapypower/power.py", line 256, in psd self.device.read_stream_into_buffer(self._buffer) File "/usr/lib/python3.10/site-packages/simplesoapy.py", line 483, in read_stream_into_buffer raise RuntimeError('Unhandled readStream() error: {} ({})'.format( RuntimeError: Unhandled readStream() error: -1 (TIMEOUT)

martin-zs commented 2 years ago

You may find the answer in this thread, https://groups.io/g/airspy/topic/hf_scanning_with_hf/90429763 That timeout appears to be cause by change to blocking in readStream ( https://github.com/pothosware/SoapyAirspyHF/commit/5f6b6909a750a6ef6d71d5e4a4f4bb95602d5e4b and the link in that where they explain the issue has changed to be https://github.com/pothosware/SoapySDRPlay2/issues/68 ). The original timeout assumed that the stream was active and had a fault, basically it did not have to deal with any extra setup delays for the very first buffer.

Maybe two timeouts are what is needed one for the initial buffer and a second lower value timeout for the normal steady state stream. The simple workaround of increasing the timeout to be an order of magnitude larger or more is a sub-optimal solution.