DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Building a 24-Core Docker Swarm Cluster on Banana Pi Zero
  • A Beginner's Guide to Docker Compose
  • How to Secure Your Raspberry Pi and Enable Safe, Resilient Updates
  • Creating Application using Spring Roo and Deploying on Google App Engine

Trending

  • Monitoring Spring Boot Applications with Prometheus and Grafana
  • Working With Cowork: Don’t Be Confused
  • From APIs to Event-Driven Systems: Modern Java Backend Design
  • Modernization Is Not Migration
  1. DZone
  2. Data Engineering
  3. IoT
  4. Use Your RasperryPi to Decode Sound on FM Frequencies

Use Your RasperryPi to Decode Sound on FM Frequencies

Learn how to configure rtl_fm and Direwolf for Decoding Amateur Radio Packet on the Raspberry Pi

By 
Kevin Hooke user avatar
Kevin Hooke
·
Aug. 09, 15 · Tutorial
Likes (2)
Comment
Save
Tweet
Share
3.6K Views

Join the DZone community and get the full member experience.

Join For Free

rtl_fm is one of the utilities from the rtl_sdr package for using a TV dongle as an SDR. Head over here if you need more info on this.

Direwolf is a soundcard based packet modem.

According to the Direwolf docs, it supports using rtl_fm as an input, so I thought I would take a look at look at getting these running together.

I’ve used rtl_sdr and rtl_tcp on my Pi before, but not rtl_fm, so first to get this working.

To playback the stream from rtl_fm you need to pipe into into some audio app. This is the same way that direwolf is going to read the stream too. Following the suggestion here on the rtl_sdr page, this command works fine for a local broadcast radio station on 96.9MHz:

rtl_fm -f 96.9M -M wbfm -s 200000 -r 48000 | play -r 48000 -t s16 -L -c 1  -

I’m not sure what all these options are, but the key options seem to be -s for the sample rate, and -r for the resolution. The -r value needs to match on the rtl_fm side and on the play side.

Now to get direwolf installed on Raspbian:

– per the userguide, first install libasound-dev:

sudo apt-get install libasound-dev

– download the source zip from: https://home.comcast.net/~wb2osz/site/?/page/Download/

– unzip and cd into the direwolf folder

– make with:

make -f Makefile.linux

make install-conf

make install_rpi

At this point I have rtl_fm on the Pi working as it should, and direwolf working great when decoding audio input from a 2m radio input via a USB soundcard. Combining the two though is giving me issues.

I don’t thing I’m able to get a strong enough received signal on 2m on the RTL stick even with an external 1/4wave 2m antenna.

This is the combination of commands, rtl_fm, piping into Direwolf:

rtl_fm -f 145048467 -M fm -s 200000 -r 32000 -g 35 | direwolf -n 1 -r 32000 -b 16 -t 0 -

I’ve allowed for the tuning offset ppm on this RTL card, but maybe I’ve calculated this wrong?

Anyway, since Direwolf by itself on the Pi is working well and what I needed for a small packet project was to be able to decode packet on the Pi, I’ll be putting rtl_fm on hold for the time being and playing with Direwolf by itself.

Command (computing) Stream (computing) app Cards (iOS) USB raspberry pi Signal

Published at DZone with permission of Kevin Hooke. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Building a 24-Core Docker Swarm Cluster on Banana Pi Zero
  • A Beginner's Guide to Docker Compose
  • How to Secure Your Raspberry Pi and Enable Safe, Resilient Updates
  • Creating Application using Spring Roo and Deploying on Google App Engine

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook