Remote Control of a Raspberry Pi SDR Over a Network
by tekmakeruk in Circuits > Raspberry Pi
4145 Views, 4 Favorites, 0 Comments
Remote Control of a Raspberry Pi SDR Over a Network
Most SDR can be remote controlled very easily, I do see a lot of weird software to do this and it is often not required! If you have installed rtl-sdr then you have everything that you need. No other software is needed on the server other than the rtl-sdr drivers. This is assuming you have an RT-SDR V3, NooElec, SmartSDR or similar. Though it should work with any Realtek RTL2838U based receiver.
Supplies
- a Raspberry PI 3 or 4
- an SDR such as RTL-SDR or NooElec SmartSDR
- A host pc, it can be Windows, Linux or MacOS, even a mobile phone
Remote Control With GQRX
This is so easy, but I always forget how to do it. All you need installed on your remote SDR is rtl_sdr and your drivers. then type in a terminal
[code]rtl_tcp -a 192.168.0.41[/code]
(replace 192.168.0.41 with your ip), don't miss the '-a'. To find your ip simply type
ifconfig
This will start the TCP server and reveal the remote connection string to be entered into GQRX or any SDR software. In my case the returned string was rtl_tcp=192.168.0.41:1234
Then go to your PC, laptop or whatever you want to access the remote Pi from, start GQRX and go to device setting, select RTL Spectrum server and enter that same string
[code]rtl_tcp=192.168.0.41:1234[/code]
(replace your own ip and port number) . Don't worry if GQRX selects 'Other' so long as the string is still intact as it will still work.
Remote Control With SDR++
If you re using SDR++ you can select rtl_tcp as the device and 192.168.0.41 (replace with your ip) and 1234 in the port number (unless rtl_tcp said differently.
You may experience some delays, so set the bandwidth to say 1Mhz and use ethernet where possible, other than that it is just like being there!
Now we want it to start rtl_tcp every time the PI is started, so add the lines like below.
* note I added sleep=20 as I am using wifi, if you are using ethernet then sleep 10 should be enough. It is important that we have a network connection before starting the server!
[code]sleep 20
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
/usr/local/bin/rtl_tcp -a $_IP &
fi
exit 0
then type
sudo reboot[/code]
and try connecting from your SDR software.
It should also be possible to do this from a server installation with no GUI to save overheads, maybe even on a Pi3 or Zero?