SoapyAirspy icon indicating copy to clipboard operation
SoapyAirspy copied to clipboard

Airspy readstream error from soapy_power

Open jlobingier1 opened this issue 6 years ago • 8 comments

screenshot from 2018-06-08 12-31-42 screenshot from 2018-06-08 12-32-19 Everything appears to go well with the connection between the SoapySDR Remote server and my client until I try to run soapy_power. Please look at the attached screenshots. Other devices work fine with soapy_power, but not Airspy.

jlobingier1 avatar Jun 08 '18 17:06 jlobingier1

Not sure why the call is retuning 0 samples with airspy, it may just be used in place of a timeout. If you modify soapypower to ignore 0 returns, do you get any normal readStream results?

guruofquality avatar Jun 08 '18 18:06 guruofquality

Josh, not sure how to make that modification. Is it done with the command line options?

Sent from my iPhone

On Jun 8, 2018, at 1:02 PM, Josh Blum [email protected] wrote:

Not sure why the call is retuning 0 samples with airspy, it may just be used in place of a timeout. If you modify soapypower to ignore 0 returns, do you get any normal readStream results?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

jlobingier1 avatar Jun 08 '18 18:06 jlobingier1

Hi, I checked work normally airspy and soapy_power on Laptop. (Lenovo E480, Ubuntu 18.04, soapysdr 0.7.1, libairspy 0.1.2) But I also can not work normally it on Beagle Bone Black. (Ubuntu 18.04, soapysdr 0.7.1, libairspy 0.1.2, same above environment, not equal CPU architecture) https://github.com/xmikos/soapy_power/issues/21

I tested simeplesoapy's example so that soapy_power call simplesoapy's read_stream_into_buffer. (simeplesoapy's example: https://github.com/xmikos/simplesoapy <- readme.rst example) It reproduced same readStream() error.

ubuntu@arm:~$ python3 test_simplesoapy.py
['driver=airspy, serial=26a464dc:286c2693, device_id=0, label=AIRSPY [26a464dc:286c2693]']
DEBUG:simplesoapy:SoapySDR stream - args: {}
[INFO] Using format CF32.
DEBUG:simplesoapy:SoapySDR stream - buffer size: 65536
DEBUG:simplesoapy:SoapySDR stream - read timeout: 0.110923
Traceback (most recent call last):
  File "test_simplesoapy.py", line 28, in <module>
    sdr.read_stream_into_buffer(samples)
  File "/usr/local/lib/python3.6/dist-packages/simplesoapy.py", line 484, in read_stream_into_buffer
    res.ret, SoapySDR.errToStr(res.ret)
RuntimeError: Unhandled readStream() error: -1 (TIMEOUT)

I think that problem is driver or interface between simplesoapy and soapyairspy.

By the way, I want to build soapyairspy. But I failed to build. How I prepare "SoapySDRConfig.cmake" and "soapysdr-config.cmake"?

chiya@ujimatsu-VirtualBox:~/Github/soapyairspy/build$ cmake ..
CMake Error at CMakeLists.txt:9 (find_package):
  Could not find a package configuration file provided by "SoapySDR"
  (requested version 0.4.0) with any of the following names:

    SoapySDRConfig.cmake
    soapysdr-config.cmake

  Add the installation prefix of "SoapySDR" to CMAKE_PREFIX_PATH or set
  "SoapySDR_DIR" to a directory containing one of the above files.  If
  "SoapySDR" provides a separate development package or SDK, be sure it has
  been installed.


-- Configuring incomplete, errors occurred!
See also "/home/chiya/Github/soapyairspy/build/CMakeFiles/CMakeOutput.log".

Thanks.

takurx avatar Jul 01 '19 09:07 takurx

By the way, I want to build soapyairspy. But I failed to build. How I prepare "SoapySDRConfig.cmake" and "soapysdr-config.cmake"?

If you are using the deb packages, just install the dev package for the given library. apt-get install libsoapysdr-dev should do it

Whatever this is. Im going to need some help to debug it. You might want to compare the settings applied by soapy power and what readStream is doing vs a simple command line app like SoapySDRUtil --rate=1e6 --direction=RX

guruofquality avatar Jul 01 '19 13:07 guruofquality

apt-get install libsoapysdr-dev should do it

Thank you for reply. I get to build. yeah.

compare the settings

Transfer speed (Msps and Mbps) on Beagle bone black downed 1 digit than on laptop. Is it by USB transfer speed? hmm.

On Beagle bone black

ubuntu@BeagleBoneBlack:~$ SoapySDRUtil --rate=1e6 --direction=RX
######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

[INFO] Using format CS16.
Stream format: CS16
Num channels: 1
Element size: 4 bytes
Begin RX rate test at 1 Msps
Starting stream loop, press Ctrl+C to exit...
0.303412 Msps	1.21365 MBps
0.305296 Msps	1.22118 MBps
0.308273 Msps	1.23309 MBps
/^C

On laptop

ubuntu@E480:~$ SoapySDRUtil --rate=1e6 --direction=RX
######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

[INFO] Using format CS16.
Stream format: CS16
Num channels: 1
Element size: 4 bytes
Begin RX rate test at 1 Msps
Starting stream loop, press Ctrl+C to exit...
2.99524 Msps	11.981 MBps
2.9962 Msps	11.9848 MBps
2.99841 Msps	11.9936 MBps
-^C

takurx avatar Jul 01 '19 15:07 takurx

I called simplesoapy when kernel output error (dmseg --reltime command). It looks good to me that recognize device, airspy on USB when boot and inserted.

[ +1.236144] musb_ep_program 916: broken !rx_reinit, ep2 csr 0003 [ +0.006071] musb_host_rx 1965: Rx interrupt with no errors or packet! [ +0.006563] musb_host_rx 1965: Rx interrupt with no errors or packet!

https://gist.github.com/takurx/fde81db1a354ca7f402fb5664f4c0125

takurx avatar Jul 02 '19 05:07 takurx

On Airspy "SoapySDRUtil" can not follow to set sampling rate. It is not only over sampling rate but it is also under sampling rate.

  • over sampling rate
ubuntu@arm:~$ SoapySDRUtil --rate=6e6 --direction=RX
######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

[INFO] Using format CS16.
Stream format: CS16
Num channels: 1
Element size: 4 bytes
Begin RX rate test at 6 Msps
Starting stream loop, press Ctrl+C to exit...
0.218708 Msps	0.874832 MBps
0.210391 Msps	0.841564 MBps
0.239425 Msps	0.957699 MBps
/^C
  • under sampling rate
ubuntu@arm:~$ SoapySDRUtil --rate=0.2e6 --direction=RX
######################################################
##     Soapy SDR -- the SDR abstraction library     ##
######################################################

[INFO] Using format CS16.
Stream format: CS16
Num channels: 1
Element size: 4 bytes
Begin RX rate test at 0.2 Msps
Starting stream loop, press Ctrl+C to exit...
0.271759 Msps	1.08704 MBps
0.277609 Msps	1.11043 MBps
0.277345 Msps 1.10938 MBps

https://gist.github.com/takurx/fde81db1a354ca7f402fb5664f4c0125#file-log5_soapysdrutil_rate_test-txt

SoapySDR Basic example is work! https://gist.github.com/takurx/36aa05d65b0b2c62c8d755856bf0f808

SoapySDR Basic example do not consider timeout. Is there a problem with the transfer speed or around?

In addtion AM335x (Beagle bone black) have trouble about USB interface. It is a troublesome problem. https://www.spinics.net/lists/linux-omap/msg121053.html?fbclid=IwAR33b7uda_lI7VvKCoU_GCvEZL1yLXZe5o-WaXlNOnJDx3xOvdpQ9-j4Q1E http://e2e.ti.com/support/processors/f/791/p/625199/2305599?fbclid=IwAR09qGMEfjgPg0K0SFOV0qXP31pxuOhGL4Z4khRO6bIkYofTS3nl6qt4Fpk

takurx avatar Jul 03 '19 06:07 takurx

Has this issue of readstream error ever been resolved? I have come back to using Airspy R2 with SoapySDR and still see this same error. Screenshot from 2020-02-13 09-23-53

jlobingier avatar Feb 13 '20 15:02 jlobingier