pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ham/rtl-sdr troubles under NetBSD.
Tobias Nygren <tnn%NetBSD.org@localhost> writes:
> On Sun, 29 Mar 2026 16:58:04 +0200
> Ramiro Aceves <ea1abz%gmail.com@localhost> wrote:
>
>> Hi,
>>
>> I am having some trouble trying to make rtlsdr USB dongle to work properly under NetBSD. This cheap thing is a useful entry level receiver for the amateur radio 2m and 70cm band, also for comercial FM
>> stations and air band reception.
>
> I recall discussions from long ago about problems in the NetBSD ugen(4)
> driver that prevents it from sometimes working correctly when the
> application wants to access the device asynchronously (with
> poll/select/kqueue).
Yes, but I think it's not really the async access as that after data is
read, you need to request new data really fast.
> Details are vague. This was discussed many years ago but there
> was a libusb patch floating around that worked around the issue,
> I think by spawning an internal worker thread.
My current understanding:
On most operating systems, rtl-sdr uses async reads. This lets
multiple reads be queued so one can get streaming data over bulk.
Without that, there's a userspace round trip.
It's not clear that it's really hard to add async support, but nobody
has done it.
ugen has USB_SET_BULK_RA support, added in 2006ish to make gnuradio's
USRP work better, with much slower processors. I think it is likely
that configuring this would solve the issue. BULK_RA is basically
async in the kernel but sync for read, so you get the bits read into a
buffer and you decouple userspace read from starting transfers on the
hardware. This feature was added by my group at work, and does not
exist in other operating systems. It has likely not been tested, but
likely still works.
There is a patch floating about, from riastradh I'm pretty sure, to
make rtl-sdr do reads in a thread, so that they are prompt.
It's likely that rtl-tcp and pointing gqrx at that will work better.
Home |
Main Index |
Thread Index |
Old Index