Check your hardware
First you should make sure that your rtl-sdr stick is properly connected to your c.h.i.p and that your power source is suitable to drive the chip plus the rtl-sdr. Some of them are consuming more than 500mA (which is out of spec for USB2.0) which can cause the system crashing if under load.
Connect your rtl-sdr to the c.h.i.p, login and run lsusb -t
. You should see an output like the one on the screenshot below. The last two lines are the rtl-sdr stick.
Install rtl-sdr
For convenience, I’ll use the rtl-sdr package. If you plan to do a source install you can have a look in one of my earlier posts.
To install the RTL-SDR tools in a chip, just run sudo apt-get install rtl-sdr
.
Add udev rules
This is an important step if you plan to use your rtl-sdr as a non-root user (which is a good idea)
- Step 1: Add a new rules file –
sudo nano /etc/udev/rules.d/10-rtl-sdr.rules
- Step 2: Paste the content of the listing below into the file and save.
- Step 3: Reload the configuration –
sudo udevadm control --reload-rules
- Step 4: Replug the rtl-sdr stick
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# # Copyright 2012-2013 Osmocom rtl-sdr project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # # original RTL2832U vid/pid (hama nano, for example) SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2832", MODE:="0666" # RTL2832U OEM vid/pid, e.g. ezcap EzTV668 (E4000), Newsky TV28T (E4000/R820T) etc. SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="2838", MODE:="0666" # DigitalNow Quad DVB-T PCI-E card (4x FC0012?) SUBSYSTEMS=="usb", ATTRS{idVendor}=="0413", ATTRS{idProduct}=="6680", MODE:="0666" # Leadtek WinFast DTV Dongle mini D (FC0012) SUBSYSTEMS=="usb", ATTRS{idVendor}=="0413", ATTRS{idProduct}=="6f0f", MODE:="0666" # Genius TVGo DVB-T03 USB dongle (Ver. B) SUBSYSTEMS=="usb", ATTRS{idVendor}=="0458", ATTRS{idProduct}=="707f", MODE:="0666" # Terratec Cinergy T Stick Black (rev 1) (FC0012) SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00a9", MODE:="0666" # Terratec NOXON rev 1 (FC0013) SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b3", MODE:="0666" # Terratec Deutschlandradio DAB Stick (FC0013) SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b4", MODE:="0666" # Terratec NOXON DAB Stick - Radio Energy (FC0013) SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b5", MODE:="0666" # Terratec Media Broadcast DAB Stick (FC0013) SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b7", MODE:="0666" # Terratec BR DAB Stick (FC0013) SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b8", MODE:="0666" # Terratec WDR DAB Stick (FC0013) SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00b9", MODE:="0666" # Terratec MuellerVerlag DAB Stick (FC0013) SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00c0", MODE:="0666" # Terratec Fraunhofer DAB Stick (FC0013) SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00c6", MODE:="0666" # Terratec Cinergy T Stick RC (Rev.3) (E4000) SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00d3", MODE:="0666" # Terratec T Stick PLUS (E4000) SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00d7", MODE:="0666" # Terratec NOXON rev 2 (E4000) SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ccd", ATTRS{idProduct}=="00e0", MODE:="0666" # PixelView PV-DT235U(RN) (FC0012) SUBSYSTEMS=="usb", ATTRS{idVendor}=="1554", ATTRS{idProduct}=="5020", MODE:="0666" # Astrometa DVB-T/DVB-T2 (R828D) SUBSYSTEMS=="usb", ATTRS{idVendor}=="15f4", ATTRS{idProduct}=="0131", MODE:="0666" # Compro Videomate U620F (E4000) SUBSYSTEMS=="usb", ATTRS{idVendor}=="185b", ATTRS{idProduct}=="0620", MODE:="0666" # Compro Videomate U650F (E4000) SUBSYSTEMS=="usb", ATTRS{idVendor}=="185b", ATTRS{idProduct}=="0650", MODE:="0666" # Compro Videomate U680F (E4000) SUBSYSTEMS=="usb", ATTRS{idVendor}=="185b", ATTRS{idProduct}=="0680", MODE:="0666" # GIGABYTE GT-U7300 (FC0012) SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d393", MODE:="0666" # DIKOM USB-DVBT HD SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d394", MODE:="0666" # Peak 102569AGPK (FC0012) SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d395", MODE:="0666" # KWorld KW-UB450-T USB DVB-T Pico TV (TUA9001) SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d397", MODE:="0666" # Zaapa ZT-MINDVBZP (FC0012) SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d398", MODE:="0666" # SVEON STV20 DVB-T USB & FM (FC0012) SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d39d", MODE:="0666" # Twintech UT-40 (FC0013) SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3a4", MODE:="0666" # ASUS U3100MINI_PLUS_V2 (FC0013) SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3a8", MODE:="0666" # SVEON STV27 DVB-T USB & FM (FC0013) SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3af", MODE:="0666" # SVEON STV21 DVB-T USB & FM SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b80", ATTRS{idProduct}=="d3b0", MODE:="0666" # Dexatek DK DVB-T Dongle (Logilink VG0002A) (FC2580) SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1101", MODE:="0666" # Dexatek DK DVB-T Dongle (MSI DigiVox mini II V3.0) SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1102", MODE:="0666" # Dexatek DK 5217 DVB-T Dongle (FC2580) SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1103", MODE:="0666" # MSI DigiVox Micro HD (FC2580) SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d19", ATTRS{idProduct}=="1104", MODE:="0666" # Sweex DVB-T USB (FC0012) SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="a803", MODE:="0666" # GTek T803 (FC0012) SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="b803", MODE:="0666" # Lifeview LV5TDeluxe (FC0012) SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="c803", MODE:="0666" # MyGica TD312 (FC0012) SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="d286", MODE:="0666" # PROlectrix DV107669 (FC0012) SUBSYSTEMS=="usb", ATTRS{idVendor}=="1f4d", ATTRS{idProduct}=="d803", MODE:="0666" |
Test the SDR
Now it’s time to test the rtl-sdr. Run rtl_test
and observe the output. If you don’t see any errors beside probably one at the end stating some bytes are lost, you’re good to go.
Bonus: Receive FM radio
For a real test, you can plug-in your headphones to the c.h.i.p and receive one of your local radio stations.
Run rtl_fm -M fm -f -r 32k -s 170k -A fast -E deemp - | aplay -t raw -r 32k -c 1 -f S16_LE
Frequency is in Hz. That means if your station is on 97.7 Mhz you have to put in 97700000 as value.