Disabling RTL2832 AGC

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/osmocom-sdr@lists.osmocom.org/.

Leif Asbrink leif at sm5bsz.com
Fri Jul 6 10:02:22 UTC 2012


Hello Francesco,

I have tested it and it does not work. Your posting did however
inspire me to do some wild experiments just setting bits on
some other registers, the purpose of which was unclear to me.

To disable the AGC:

// Changing from 0x25 to 0xd5 here switches the AGC off SM5BSZ July2 2012
//      rtlsdr_demod_write_reg(dev, 0, 0x19, 0x25, 1);
        rtlsdr_demod_write_reg(dev, 0, 0x19, 0xd5, 1);

Just a couple of lines above the place of your modification.

Performance becomes very good:-)
http://www.sm5bsz.com/linuxdsp/hware/rtlsdr/rtlsdr.htm

The dynamic range is 80 dB if gain is set for a noise figure of 10 dB
or more. With more gain one can get 3 dB lower NF at the cost of
6 dB lower dynamic range.

Regards

Leif / SM5BSZ


 

> A couple of days ago I posted on Reddit a small modification to
> librtlsdr.c to disable the RTL2832 AGC and internal amplifiers (link
> to post: http://www.reddit.com/r/RTLSDR/comments/vunuy/experiments_with_agc/c57sbpx
> the correct part is after the EDIT).
> 
> Add the following lines of code:
> 
> /* disable RF and IF AGC */
> uint16_t tmp;
> tmp = rtlsdr_demod_read_reg(dev, 1, 0x04, 1);
> tmp &= ~0xc0;
> rtlsdr_demod_write_reg(dev, 1, 0x04, tmp, 1);
> 
> /* disable AGC PGA */
> rtlsdr_demod_write_reg(dev, 1, 0xd7, 0x00, 1);
> 
> /* disable GI PGA */
> rtlsdr_demod_write_reg(dev, 1, 0xe5, 0x00, 1);
> 
> just after:
> 
> /* disable AGC (en_dagc, bit 0) */
> rtlsdr_demod_write_reg(dev, 1, 0x11, 0x00, 1);
> 
> Since I don't have adequate tools to test the results, could you
> please test it, and if it does work, add the patch to your repository?
> 
> Thank you!
> 
> -- 
> Francesco Gugliuzza
> HackLabProject.org Administrator
> Linux user #374630
> Tel (VoIP geographic number): +39 0921440446
> Tel (Libera il VoIP number): 5125320
> E-mail: f.gugliuzza at hacklabproject.org
> 




More information about the osmocom-sdr mailing list