John's Musings


Yeah, Me Neither

Make a Raspberry Pi 3 RTL-SDR Server

First of all, why would you want to do this? Here's my best explanation. You can mount the SDR and Raspberry Pi somewhere permanent like the attic and maybe even outdoors. Then you can access the SDR from your computer without having an SDR plugged in and being tied to an antenna. Makes you mobile.


Here's my rig.


Raspberry Pi 3 - $35


NooElec Nano 3 - $27.95




Quite a portable little setup. Occupies a little more space than a can of Altoids.


Download Rasbian Jessie here and burn the image file with Etcher. Once you get booted up follow the directions on this excellent page to set up rtl_tcp. I'd copy the instructions here but I couldn't do it better than the page that is linked. Once you have a booted Pi with rtl_tcp running then you need to have client software like GQRX or SDR#. GQRX runs on Mac and Linux. SDR# runs on Windows.


NOTE: I also installed this on an Orange Pi Zero with Armbian as the OS and on the CMAKE line I had to add another argument to detach the kernel driver. If you get this error:


Kernel driver is active, or device is claimed by second instance of librtlsdr. In the first case, please either detach or blacklist the kernel module (dvb_usb_rtl28xxu), or enable automatic detaching at compile time.


Rebuild rtl_sdr doing this on the CMAKE command.


cmake ../ -DINSTALL_UDEV_RULES=ON -DDETACH_KERNEL_DRIVER=ON


Start GQRX and then click the crossed wrench and screwdriver.



Figure out your Pi's IP address and configure GQRX as so. (My IP address is 192.168.20.89 with port of 1234) Your address may be different.




To start a listening stream fill in the following:


Device string = rtl_tcp=192.168.20.89:1234

Input rate = 1200000 (theoretically this should be 2400000) however mine choked a bit so I throttled it back some.




Now on your remote computer (connected to the same network) start GQRX. Note that at the top it shows connected to the rtl_tcp server you set up. Note that tuning is a bit slow. But it works. Now you can play with your SDR radio from ANYWHERE IN THE WORLD. Open port 1234 in your router to the IP of the Raspberry Pi using TCP and you can access it from anywhere. Listen to your favorite radio station from another state. Listen to Ham Radio from a hotel room without a 20' antenna or basically any gear at all.





To make it start at boot on newer installations of Linux that use systemd, do this:


sudo nano /etc/systemd/system/rtltcp.service


Then add this to the empty file (Make sure you are using the right IP address for your installation):


[Unit]

Description=RTLTCP

After=network.target

[Service]

ExecStartPre=/bin/sleep 30

ExecStart=/usr/local/bin/rtl_tcp -a 192.168.20.83

[Install]

WantedBy=multi-user.target


Hit Ctl +X then Y to save. Then:


sudo systemctl enable rtltcp.service


That makes it start at boot automatically


You now have an rtl_tcp server that can be accessed from anywhere. (If you open the appropriate router ports up).



blog comments powered by Disqus
201,004