Tagged: network

Significantly Improving RTL_TCP’s Performance with Ring Buffers

Thank you to an anonymous contributor for bringing to attention a two part blog post by Stephen Blinick. Stephen's post details how the performance of rtl_tcp can be significantly improved by modifying to code to use a ring buffer instead of using semaphore based locking. If you weren't aware, rtl_tcp is a program that allows you to run your RTL-SDR remotely, and connect to it over a network connection.

The result is a tremendous performance improvement in rtl_tcp according to Stephen. Before the changes he noted that his Raspberry Pi 3B+ could only support a sample rate of 1.92 MSPS over WiFi, and even that had 1-2 seconds of lag. After the ring buffer changes his Pi 3B+ can handle the maximum sample rate of 3.2 MSPS with zero lag. On his Pi Zero W he can achieve a sample rate of 1.92 MSPS over WiFi with minimal lag, whereas before he could only achieve 0.92 MSPS with huge 5-10 second of lag.

The patch is available as a pull request over on the Osmocom GitHub.

Unfortunately this patch might not be included in the official upstreamed Osmocom drivers because Stephen submitted the patch as a pull request to the GitHub, and Osmocom only accept patches via their mailing list. If anyone reading this is familiar with the Osmocom patch submission requirements, we'd like to encourage you to help submit this patch for consideration.

Ring Buffer Patch for rtl_tcp
Ring Buffer Patch for rtl_tcp

Cloud-SDR Releases New Client and Server Software for the RTL-SDR

Cloud-SDR is a company that aims to make using SDR over the cloud/network/internet easier. It allows you to set up a remote SDR server that you can access from anywhere. Previously Cloud-SDR was still in development, but now we recently received mail from Cloud-SDR programmer Sylvain that the client and server software has just been released for the RTL-SDR. It appears that it also currently supports the Airspy, BladeRF, SDRplay and PerseusSDR.

The email reads:

I am pleased to inform you that we have just released two softwares compatible with your devices :

  • The Cloud-SDR free client, a windows + Linux (to be released soon) client able to run locally RTL-SDR devices (check the news/turorials, we have featured several times dongles from your blog)
  • The Cloud-SDR streaming server (codenamed SDRNode) , a windows + Linux (to be released soon) multi-user configurable streaming server.

SDRNode is a commercial software but an evaluation version is already available. Both softwares can be downloaded from our store after registration.

Source code for the drivers are already released as open source software through our GitHub repo: https://github.com/cloud-sdr

You can find more details here :

The Cloud-SDR Network
The Cloud-SDR Network

To download the software you must register an account with them at https://store.cloud-sdr.com/my-account. The client is free but the server costs 110 euros for personal and hobby usage, although a 30 day trial version is available. Currently only the Windows Client and Server are available, but they write that Linux should be available soon.

We tested the software out with an RTL-SDR V3. The client installation process was a simple wizard and after installation we launched the Cloud-SDR client by opening the shortcut “cSDRc” in the Start Menu. We found that the hardware needed to be plugged in first for the client to recognize it. The client is basic, but can already demodulate USB/LSB/CW/AM/FMN without trouble. It also has some interesting features:

  1. Dual channel receiver: RXA and RXB are two totally independent receivers;
  2. Geographic integration: Display on map beacons, ADS-B reported airliners, known HF broadcast stations or any geo-localized information coming from the SDRNode server;
  3. GPS compatibility: plug a GPS receiver to your computer and track your location on the map, record signals with your position for later processing (coverage mapping etc.); display the UTC time;
  4. Digital Terrain Elevation: See the terrain elevation around your position, or in the direction of the antenna directly on the map (requires to download the free SRTM3 files from NASA, with 90m resolution);
  5. MP3 audio recording: record to mp3 the demodulated streams to reduce disk requirements;
  6. Chat with other users connected to the SDRNode Group: when used as a remote client for the SDRNode streaming server, you can interact with other users with messages or station spotting;
  7. Time-domain analysis: the MSR mode enables analysis of any sub-band and displays in real time the time domain signals of the selected spectrum portion. This sub-band can also be recorded (with geographic position if GPS is connected) and processed with provided MATLAB®.
The Cloud-SDR Client Software
The Cloud-SDR Client Software

Next we tested the evaluation version of the SDR-Node server software on a remote laptop with an RTL-SDR connected. Again installation was easy, just follow the wizard after ordering the evaluation version. SDR-Node installs itself as a Windows service which starts up automatically on boot. To set up the Node we followed the guide shown in the video below. To connect with the client you need to know the IP address of the remote computer, the port is 8080, and the certificate is displayed on the server PC SDR-Node dashboard. We note that we also had to disable the Windows firewall to get it to connect, but it should be possible to also add SDR-Node to the firewall whitelist.

Using the SDRNode wizard

When streaming it appears that only 1/4 of the SDR sample rate can only be sent over the network. There are also compression options which can be used on slower networks or the internet to reduce bandwidth. Using the interface while in network mode was slightly laggy, but the waterfall and audio was smooth.

Overall everything worked as expected and it looks to be a very useful tool. More information is available at cloud-sdr.com. Some already existing alternative remote SDR streaming software that supports the RTL-SDR includes rtl_tcp, the SDR Console V2 server, OpenWebRX and ShinySDR.

Cloud-SDR: A Tool for Remotely Accessing SDR’s like the RTL-SDR and Airspy

Cloud-SDR is a new tool currently in beta testing which enables remote streaming access of SDR receivers, such as the RTL-SDR and Airspy. In a way it is similar to rtl_tcp in that it allows IQ samples to be streamed over the network, however Cloud-SDR appears to be a much more developed solution that can support more SDR’s and has many more features, as well as better performance. Cloud-SDR is not free, and during these beta stages of release the pricing does not appear to be public. However they have licences for personal/hobbyist use, which we assume will be reasonably priced. 

In this interesting post they describe various solutions for remote SDR access, and show why their Cloud-SDR solution is useful.

They describe their software in the following blurb:

Cloud-SDR can collect real-time IQ complex samples from an SDR hardware device connected on one machine, stream the samples to a second machine for demodulation or analysis, then send the resulting stream to third machine for storage.

In standalone mode, Cloud-SDR can execute signal processing tasks described with embedded JavaScript DSP engine.

Because network bandwidth is limited compared to SDR receiving bandwidth, the core concept of Cloud-SDR is to move the processing along the cloud to where it is required or possible : the DSP chain is divided in sub-tasks that are spread between computers interconnected through Internet.

For example a “signal scanner” application can be programmed with a script and stored on the SDR server for execution. Only found signals will threshold stream transmission through the TCP/IP network. Remote Client will only receive the IQ stream if a signal is detected by the DSP task. In “cloud mode”, the same script can be broadcasted to several SDR nodes located at different places, enabling parrallel signal search.

Server software SDRNode receives IQ streams from the different SDR hardwares, extracts the different bands, processes them and transmits the RF data using compression algorithms to limit TCP/IP network bandwidth.

Cloud-SDR-Big

Currently the hardware supported includes:

  • RTL SDR dongles
  • Perseus SDR
  • BladeRF x40 or x120
  • HackRF
  • AirSpy
  • SDRPlay (under work)
  • USRP UHD (Pro version only)
  • LimeSDR (Pro version only)

On their site they have some tutorials uploaded already. One tutorial shows how to remotely listen to airport radio with a remote Airspy, and one shows how to set up a dual-RTLSDR remote access system. This allows two RTL-SDR’s to be used together, with one streaming directly from the antenna, and the second streaming via an upconverter.

Sharing Two RTL-SDR's with CloudSDR.
Sharing Two RTL-SDR’s with CloudSDR.

There are also several examples of the Cloud-SDR in action over on the authors YouTube channel.