element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
BeagleBone Black Radio Challenge
  • Challenges & Projects
  • Design Challenges
  • BeagleBone Black Radio Challenge
  • More
  • Cancel
BeagleBone Black Radio Challenge
Blog Beaglebone Black Internet Radio Challenge - onebeartoe - Installing FM Support
  • Blog
  • Forum
  • Documents
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: onebeartoe
  • Date Created: 21 Mar 2014 6:56 PM Date Created
  • Views 637 views
  • Likes 2 likes
  • Comments 0 comments
  • embedded
  • adafruit
  • onebeartoe
  • beaglebone_black_radio
  • java
Related
Recommended

Beaglebone Black Internet Radio Challenge - onebeartoe - Installing FM Support

onebeartoe
onebeartoe
21 Mar 2014

Check out my previous posts for the BBB Radio Challenge:

 

  • Beaglebone Black Internet Radio Challenge - onebeartoe - Unboxing and Project Goals
  • http://www.element14.com/community/roadTestReviews/1695

 

UPDATE: BeagleBone Black Internet Radio Challenge - onebeartoe - Project Recap and Final Demo

 


 

I am seen in this Adafruit Show and Tell video giving an update on the project:

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

For this project, please ignore the 3Doodler item I show at the very end.

 


 

I couldn't get rtl-sdr to work with the the sound card, so I updated the Debian image from here:

 

BeagleBoard.org - latest-images

 

and selected this image: https://s3.amazonaws.com/beagle-debian/BBB-eMMC-flasher-debian-7.4-2014-03-04-2gb.img.xz

 

From: http://elinux.org/BeagleBoardDebian, the default credentials are user: debian pass: temppwd

 

Updating the Debian image meant I had to go through the configuration setup in my last post: http://www.element14.com/community/roadTestReviews/1695

 


 

For some reason the USB sound card I already had working, stopped working with the image update.

 

This link has a comment about updating configuration to make it work: Debian User Forums • View topic - ALSA: cannot find card '0'

 

Edit /etc/modprobe.d/alsa-base.conf, include/modify the line for snd-usb-audio

options snd-usb-audio index=0

 

# Setup FM support

sudo apt-get install cmake

 

sudo apt-get install libusb-1.0

 

# https://groups.google.com/d/msg/beagleboard/Sp8eIBPAgJg/gEM0e_N2TcsJ

sudo apt-get install build-essential

 

# this following is from Nitin's blog, with the exception of adding -DDETACH_KERNEL_DRIVER=ON to the cmake command.  More on this below.

git clone git://git.osmocom.org/rtl-sdr.git 

cd rtl-sdr/ 

mkdir build 

cd build

cmake ../ -DDETACH_KERNEL_DRIVER=ON

make 

sudo make install

 



I spent a good 7 hours trying to make the rtl_fm command work from Java.  I could start the rtl_fm command one time just fine, but once I stopped the process I could not get rtl_fm to start again.  So finally I found a solution.  I had to recompile rtl-sdr with the '-DDETACH_KERNEL_DRIVER=ON' option to allow multiple start and stop actions on the FM radio.


Again here is the cmake command:


     cmake ../ -DDETACH_KERNEL_DRIVER=ON

 


 

Next, install the player for the FM radio:

 

     sudo apt-get install sox

 


 

Now we can test the FM antenna and RTL RM command:

 

sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib rtl_fm -M wbfm -f 104.5M | play -r 32k -t raw -e s -b 16 -c 1 -V1 -

 

With the Adafriut antenna plugged in, you should hear whatever station 104.5 is in your local area.  Try others if 104.5 is not a local station.

 


 

Install the package that provides access to the amixer command, for controlling the volume.

 

        sudo apt-get install alsa-utils

 


 

The source code is available:

 

               https://github.com/onebeartoe/internet-radio

 

If you want to take a look at development builds, then here is a link to the build server:

 

               https://onebeartoe.ci.cloudbees.com/job/onebeartoe-radio/

 


 

There isn't a demo video with the latest features yet.  But if you have setup the system requirements, mentioned here and my previous BBB Radio Challenge posts, then you should be able to run the app on your system.

 

Here is a link to the latest development build:

 

         https://onebeartoe.ci.cloudbees.com/job/onebeartoe-radio/ws/mpd-client/target/mpd-client-1.0-SNAPSHOT.jar

 

Download the JAR file and issue this command:

 

         sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib java -cp mpd-client-1.0-SNAPSHOT.jar com.onebeartoe.internet.radio.InternetRadio

 

Something similar to the following will output after you issue the command:

 

'[B@708a605c - L7TX8BX208663 - 172.24.168.34 - 172.24.168.34 - 0.0.0.0 - 0.0.0.0/0.0.0.0:1978'

 

If you see this, then you can now go to the following URL and see the user interface with an 'Internet' and 'FM' buttons at the top:

 

        http://localhost:1978/currentRadioBand/

 


 

What's next?

 

   * add the save/remove station features seen in 'Internet' mode to the 'FM' mode

 

   * finish volume control support

 

   * create an enclosure for the radio

 

   * add some visual element to the radio

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube