Tagged: rtl_fm

Patching rtl_fm for use with 15+ RTL-SDR Dongles

Enrique is working on a project which would record FM audio as MP3 files. To do this he uses rtl_fm with several RTL-SDR dongles. However, a major roadblock was that he found that adding five or more dongles to his server resulted in all dongles with a USB index over 3 producing the error “Failed to submit transfer 4!”.

After trying to work around the problem with Docker and VMs and ultimately failing he decided to look into other solutions. He found that rtl_test had an option to force synced output, and with this option enabled he was able to use more than four dongles. So he ended up implementing that synchronization code into rtl_fm.

With that code implemented he is now able to run up to 15 dongles on a single server. A higher amount might still be possible, but Enrique did not have that many dongles to test.

If you’ve been experiencing this problem Enrique has uploaded a patched version of rtl_fm at https://github.com/niofis/rtl-sdr.

Update: On Keenerds branch he’s rejected a merge of this patch citing the following:

Synchronous mode doesn’t work. Rtl_fm used to use synchronous mode. It produced constant minor glitches that made data decoding impossible. Don’t use it.

The whole “many simultaneous dongles” problem is a well-known issue related to LibUSB. All you need to do is reduce the DEFAULT_BUF_NUMBER in librtlsdr.c and recompile.

15 instances of rtl_fm running
15 instances of rtl_fm running

rx_tools: RTL-SDR Command Line Tools (rtl_power, rtl_fm, rtl_sdr) Now Compatible With Almost Any SDR

Developer R. X. Seger has recently released rx_tools which provides SDR independent ports for the popular command line RTL-SDR tools rtl_power, rtl_fm and rtl_sdr. This means that these tools can now be used on almost any SDR, such as the bladeRF, HackRF, SDRplay, Airspy and LimeSDR. If you don’t know what the tools do, then here is a quick break down:

rtl_fm / rx_fm: Allows you to decode and listen to FM/AM/SSB radio.
rtl_sdr / rx_sdr: Allows you to record raw samples for future processing.
rtl_power / rx_power: Allows you to do wideband scans over arbitrarily wide swaths of bandwidth by hopping over and recording signal power levels over multiple chunks of spectrum.

rx_tools is based on SoapySDR which is an SDR abstraction layer. If software is developed with SoapySDR, then the software can be more easily used with any SDR, assuming a Soapy plugin for that particular SDR is written. This stops the need for software to be re-written many times for different SDR’s as instead the plugin only needs to be written once.

rx_power scan with the HackRF at 5 GHz over 9 hours.
rx_power scan with the HackRF at 5 GHz over 9 hours.

Hak5: Installing RTL-SDR on Linux

In this episode of Hak5, a popular YouTube technology channel, Shannon shows how to use the RTL-SDR on Debian Linux. She shows how to install the RTL-SDR drivers from scratch if using a distribution without them pre-installed and also shows how to install and use rtl_fm, a command line FM demodulator.

WiFi Birdhouses and Linux RTL-SDR Setup, Hak5 1703

RTL_FM_Python: An API and web interface for controlling RTL_FM

Th0ma5w has released his rtl_fm_python program which is a modification of rtl_fm. The added feature is an API and web interface which allows interaction with a running instance of rtl_fm. The API and web interface allows you to change the frequency, modulation and gain settings while rtl_fm is running. This may be useful for remote devices running rtl_fm such as a Raspberry Pi.

rtl_fm_python web interface
rtl_fm_python web interface

rtl_udp: Fork of rtl_fm with UDP controls

Over on our forums, user sysrun has posted about his fork of the rtl_fm command line tool. His fork allows retuning of the rtl_fm program via UDP without the need to restart the program. In the future he hopes to support UDP PCM streaming. He writes

rtl_udp is a copy of rtl_fm with a special feature: It opens a udp control port (currently fixed to 6020) which takes commands like changing the frequency or mode. No need to restart :)

Credits, Idea & original Code by olgierd (http://qi.reddit.com/user/olgierd)

python script udpclient.py for easy operation included.

possible commands:

  • freq (./udpclient.py freq 101900000)
  • mode (./udpclient.py mode 0 (for fm))
    0 = FM
    1 = AM
    2 = USB
    3 = LSB
  • squelch (./udpclient.py squelch 0)
    0 = OFF
    n = Value
  • gain (./udpclient.py agc auto)
    auto = Automatic
    n = Gainvalue; 195 = 19.5db
  • agc (./udpclient.py agc 1)
    0 = OFF
    1 = ON

Decoding Pagers on the Raspberry Pi with RTL-SDR

Hackaday has brought to attention a tutorial written on the Raspberry Pi forums by Sonny_Jim showing how to decode pager transmissions on the Raspberry Pi. In the tutorial he also shows how to set up a web server to be able to view the decoded transmissions in a web browser.

He uses a RTL-SDR and Raspberry Pi and pipes the output of rtl_fm into the multimonNG software to decode the messages.

Portable RTL-SDR Running on Raspberry Pi

Over on Reddit user olgierd has posted a video on this thread showing his work on developing a portable software defined radio based on an RTL-SDR R820T, the rtl_fm software and a Raspberry Pi with LCD screen. The software is based on rtl_fm which has the capability to demodulate FM/AM/SSB signals. His video shows him tuning to various signals using a tuning knob.

Note that his setup is capable of playing the audio, but it is not shown in the video as he only had earbuds connected. In the future he hopes to make it more portable by adding a li-ion battery.