RTL-SDR Dongle in Linux

I wanted to get a better idea of how the dongle gain was manipulated through software. To do this I first got rtl-sdr and SDRSharp running on my Linux machine.
Added by Jeremy Wright almost 5 years ago

I plugged the dongle into my laptop and ran lsusb. The following is the output.

Bus 003 Device 005: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T

The vendor and PID numbers match up with this entry on the rtl-sdr page:

0x0bda 0x2838 E4000 ezcap USB 2.0 DVB-T/DAB/FM dongle

Aaron mentioned that SDR# has the ability to adjust the dongle's internal preamp gain. It runs on both Windows and Linux (via Mono), so I decided to give that a try using the instructions here.

The installation of the udev rules doesn't seem to work properly in the instructions above, but you can follow these.

The kernel also automatically loads the dvb driver module for the dongle to make it available as a TV tuner. This causes rtl_test -t to complain that something is already using the dongle. You can blacklist the offending module in /etc/modprobe.d/blacklist.conf with the line:

blacklist dvb_usb_rtl28xxu

For a quick kill of the driver you can just do:

rmmod dvb_usb_rtl28xxu

SDRSharp should be able to access your dongle then.

What it looks like is that it's rtl-sdr, not SDR# that adjusts the gain of the internal preamp. From what I see in the repo SeeDeR uses rtl-sdr, so it should be possible to adjust the gain through the library without writing code to directly talk to the dongle. Tim and Scott may already know this. I'll start a thread on the forum to ask.