RTL-SDR getting tuner gains

91 views
Skip to first unread message

giuseppe massimo Bertani

unread,
May 23, 2021, 6:20:47 PM5/23/21
to Pothos Users
Hello,

I'd like to know the right way to retrieve the gains list from a RTL-SDR device via SoapySDR.

In particular I mean to read all the values returned by
rtlsdr_get_tuner_gains(dev, gains.data());

Currently, only the first and the last value are stored and can be read with getGainRange()

Giuseppe

Josh Blum

unread,
May 23, 2021, 11:40:26 PM5/23/21
to pothos...@googlegroups.com

Well the right way to do it is as follows:

Iterate through the list of gains listGains():
https://github.com/pothosware/SoapyRTLSDR/blob/master/Settings.cpp#L208

And call getGainRange for each element in listGains:

https://github.com/pothosware/SoapyRTLSDR/blob/master/Settings.cpp#L312

I dont know if the implementation is 100% correct for every rtl variant.
Of course is something is missing, dont hesitate to open an issue or PR :-)

-Josh



Giuseppe
--
You received this message because you are subscribed to the Google Groups "Pothos Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pothos-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pothos-users/db479f8a-259f-48e0-aa13-c6995574fae5n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages