discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Use /dev/swradioN (v4l2 api) as source


From: Stefan Oltmanns
Subject: Re: Use /dev/swradioN (v4l2 api) as source
Date: Tue, 14 Jun 2022 02:47:20 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1

Thank you very much for that information, haven't seen that somebody
continued the work on libmirisdr.
I was able to get it working with an OsmoSDR Source using
soapy=0,driver=soapyMiri

I had to modify the SoapyMiri driver, as OsmoSDR sets the bandwidth to
3/4 of the sample rate, but there are only certain fixed bandwidth
values allowed, otherwise SoapyMiri will throw a runtime error (maybe it
should find the closest allowed value). For now I hardcoded a bandwidth
value and it works, but...

I get a lot of dropped samples, not suitable for practical use. This
doesn't happen with the kernel driver.

You said "instead of using the kernel API directly", is there anything
that is using the kernel API indirectly? I couldn't find any GNURadio
plug-in that is using the SDR kernel API provided by v4l2 at all.

Best regards
Stefan


gr-osmosdr 0.2.0.0 (0.2.0) gnuradio 3.10.3.0-rc1
built-in source types: file rtl rtl_tcp rfspace soapy redpitaya
[INFO] Opening Mirics MSi2500 default (e.g. VTX3D card) :: 00000001...
failed to open miri usb device 0 with code -3
Traceback (most recent call last):
  File "/home/stefan/miri_test.py", line 188, in <module>
    main()
  File "/home/stefan/miri_test.py", line 166, in main
    tb = top_block_cls()
  File "/home/stefan/miri_test.py", line 117, in __init__
    self.osmosdr_source_0 = osmosdr.source(
RuntimeError: Unable to open LibMiriSDR device.



Am 14.06.22 um 00:28 schrieb Franco VENTURI:
Stefan, instead of using the kernel API directly you may want to look into a 
SoapySDR source in GNU Radio, since the SoapySDR block is now a first class 
citizen in GNU Radio 3.9/3.10

According to this recent discussion in the SoapySDR GitHub repository 
(https://github.com/pothosware/SoapySDR/issues/359) there's a SoapyMiri driver 
(https://github.com/ericek111/SoapyMiri) that might work for you.
A comment in the same thread 
(https://github.com/pothosware/SoapySDR/issues/359#issuecomment-1150982319) has 
also instructions about integrating his fixes in OsmoSDR, if I understand 
correctly.

I personally haven't tried this approach so I don't really know if it works or 
not, but I thought you might find this information useful.

Franco



On 06/13/2022 3:26 PM Stefan Oltmanns <stefan-oltmanns@gmx.net> wrote:


Hello,

is there any way to use devices exposed as /dev/swradioN by the v4l2
Linux kernel API with GNURadio directly?

At the moment there are only two in-tree kernel drivers, one for the
RTL2832U and the other for the Mirics MSi2500. For the RTL2832U
librtlsdr seems to be the better option, as it offers more features to
control the device, but libmirisdr seems to unmaintained and not stable
(at least for me), support has been removed from OsmoSDR years ago.
I do have such a Dongle and with the kernel driver it seems to work just
fine.

I also found an out-of-tree driver for CX2388x-based TV cards, so a V4L2
source block could be very useful. Is there any specific reason, why
such a source block doesn't exist yet?
Or is it just that nobody needed it and therefore no one bothered
writing one?

Best regards
Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]