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:
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:
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