pabr / leansdr

Lightweight, portable software-defined radio
GNU General Public License v3.0
151 stars 40 forks source link

leaniiorx: unknown error #13

Open jh4xsy opened 5 years ago

jh4xsy commented 5 years ago

Hi

I ran leaniiorx, then got following error.

% ./leaniiorx -f 2395e6 --bw 2000e3 -v
Setting RF bandwidth 2000 kHz
** IIO: in_voltage_sampling_frequency failed with Unknown error -2

I'm using PlutoSDR v0.27 with libiio 0.15 on openSUSE leap 15 x86-64 machine.

% iio_info -s
Library version: 0.15 (git tag: 6ecff5d)
Compiled with backends: local xml ip usb serial
Available contexts:
        0: Local devices [local:]
        1: 0456:b673 (Analog Devices Inc. PlutoSDR (ADALM-PLUTO)), serial=104400b83991000910001f00040c6539e3 [usb:3.8.5]
pabr commented 5 years ago

The "%" prompt suggests you running leaniiorx on the x86 host. This might work thanks to the IIO/USB abstraction, but I have never tested it.

Did you run another IIO application before leaniiorx ? Maybe the SDR is in a state that leaniiorx fails to handle properly.

Does running "dmesg" on the PlutoSDR reveal details about the error ?

Do you get the same error when running leaniiorx natively on the PlutoSDR ?

jh4xsy commented 5 years ago

YES, I ran leaniiorx on the x86 host + PlutoSDR as USB peripheral. I think I can handle PlutoSDR via libiio. Before leaniiorx, I tried GNU Radio + gr-iio. it works.

I dig dmesg and journald logs, but there is NO information about the error.

So I tried PlutoSDR native leaniiorx which you provided at http://www.pabr.org/radio/leantrx/leantrx-20180211.zip. I ran this on my PlutoSDR with NO error! Perfect!

# ./leaniiorx -f 2395e6 --bw 20000000 -v  > foo.iq
Setting RF bandwidth 2000 kHz
Setting sampling rate 2500 kHz
Tuning to 2395.000000 MHz
Allocating -1095741798 buffers
Allocating 65536 samples per buffer
WARNING: High-speed mode not enabled

PlutoSDR have about 230MB room to save IQ files. Maybe execute leaniiorx on the PlutoSDR is enough for my usage.

pabr commented 5 years ago

Note that you will need to specify --nbufs to take advantage of the 230 MB and also to work around a bug (missing default value).

Keeping this issue open until I test over IIO/USB.