Linux RTL-SDR waterfall via the command line

Using Raspbian (Debian) Linux on a Raspberry Pi 2, how can I view data from my software-defined radio via the command line over SSH? Is there an RTL-SDR client with terminal emulation?

• How much data bandwidth for l does your SSH connection have? Why not simply send the data necessary for visualization over that connection and plot on your local machine? Aug 31, 2017 at 7:17
• or use one of the multiple web SDR frontend things? That would be way more useful than a ascii art DFT Aug 31, 2017 at 19:41
• Bandwidth won't be limited. I do need it to display right from SSH because I'm using an online SSH client (shellinabox). A good front end would be nice though because it would work in the browser. Sep 6, 2017 at 1:20
• Band width is always limited, unless your RTL dongle computer has a bigger internet uplink than 48 Mb/s (roughly the rate the RTL dongle can produce) :) my point is that you really don't; if you can connect via SSH, you can also run a web frontend, either publicly or privately forwarded to your local machine Sep 6, 2017 at 18:22
• The thing is, the two computers are on the same network so bandwidth is high. One is a raspberry pi and one is a laptop. The web front end idea is a good one though :) Sep 6, 2017 at 22:11

This is actually implementable, as specified, but you may have to code your own app.

I wanted to measure whether 2 signals were present. So I ran rtl_tcp on my Pi 3 to serve RTL-SDR IQ samples over a socket. I then wrote 2 DSP filters (in C) that connected to rtl_tcp and measured the magnitudes of the two signals, ran the filters on the Pi 3, and printed the results to stdout over ssh. I suppose I could have presented the 2 magnitudes as ASCII art of a 2 bar waterfall spectrograph.

My benchmarks show that a Pi 3 could also easily run an FFT on the IQ data as well as 2 simpler filters for a wider waterfall.

• Seems like you understand the requirements. Any chance you could provide a bit of your code? Would it be easy to adapt from 2 bars to 1 bar per character of terminal width? Sep 6, 2017 at 1:22
• This Q&A seem appropriate for info on ascii art plotting: stackoverflow.com/questions/123378/… Sep 6, 2017 at 2:00
• I converted portions of the FFT waterfall code to Swift 3 with Metal shader graphics, and posted it to github: gist.github.com/hotpaw2 . I'll leave it as an exercise for the student to convert the FFT output into some ASCII-art plot routines. Sep 6, 2017 at 2:06
• Thanks for that. I will be making a cusotm ASCII plotter if I can't get a web interface to work. Sep 6, 2017 at 22:17

You didn't specify the OS of the client from which you would like to view the remote session.

On the Pi side, use the built in RealVNC to allow remote access.

If your remote client is Linux based, take a look at Remmina. It is a free, open source project with support for several Linux variants.

If your remote client is Windows based, evaluate TightVNC. It is free download if you don't need any extensions.

• I specified that I need to be able to view the waterfall "via the command line over SSH". All I have is SSH via shellinabox. Sep 6, 2017 at 1:18

This is two questions.

I will presume the answer to the first is to simply start your sdrsharp software

sdrsharp


Then, to see it remotely, you need an xterm-compatible connection.

I suggest that your best option is to install a graphical remote-viewing setup.

Three ways to do this:

First, enable X11 over ssh

Procedure is to sudo vi /etc/ssh/ssh_config and change it to allow X11 connections.

Then, you can use

ssh -Y hostname
echo $TERM  The response should be xterm  Then you can issue the command to start the software sdrsharp  Second, install tightvnc so you can control the console of the system. Once that works you can open a terminal window and do the same. Third, install Remote Desktop Protocol, which allows you to make virtual connections to the system which are compatible with Windows Remote Desktop client, or remmina. sudo apt-get install xrdp  Then do the same. If you are on Windows, you should be able to install OpenSSH, then use SSH -X clientname  to get it to pull up an xterm. • I can't install software such as sdrsharp. All I have access to is a browser. Right now, I'm using shellinabox to do ssh. Sep 6, 2017 at 1:21 • OK, I get it now. It is a VT-100 emulator via AJAX in a browser. I do not really see any way to do X11 with it. Same with Gate One. Hmm... So you do not have control of the server enough to do VNC or RDP, then. I answered the question for a normal command line, not a browser-based terminal emulator. This is like Lynx in reverse. --- But why would you think this could do RTL-SDR at all, then, if you can't do installs? I think I'm confused about what will help you most. For myself, I have found that SDR# works much better on Windows... Sep 6, 2017 at 5:58 • I have full control over the server (my raspberry pi). The client is limited (school laptop) and all I have is a web browser (chrome), no VNC client. I can use SSH over shellinabox. Sep 6, 2017 at 22:13 • So you are using a Chromebook? There simply MUST be a way to get a real Xterm server running on it. Please tell me the make and model and such and I'll look up your options. Of course, you know that you can put a monitor and keyboard on a Rpi. I have a Rpi3 with a nice monitor and keyboard that I use all the time to do ssh into my other systems. It makes a decent web browser and Chromium synchronizes my bookmarks with my Chrome browsers - Ubuntu Linux, Window 7 and 8.1 and Rpi. Well worth the effort to turn one into a workstation. Sep 7, 2017 at 1:35 • btw, here is my Ubuntu system: hardwarerecs.stackexchange.com/questions/7624/… - It has turned out to be the bedrock of my network. And only cost a tad more than a Rpi.$45 to start, for a real PC. I run Ubuntu 16.04 LTS on it. Also beefed it up a bit, though, with a solid-state drive that boots in about 20 seconds and more RAM. Sounds to me like you might need an upgrade from that old system. Sep 7, 2017 at 1:39