Skip navigation
2014

BeagleBone Black Radio Challenge

February 2014 Previous month Next month

All entries in this blog series:

 

 

I don't have a lot of experience programming, I am however familiar with scripting and HTML. This is why I planned to create the interface for the radio in HTML/Perl.

 

Webserver

 

In order to be able to server the web interface of the radio, a webserver is required. While searching, I came across other people using "lighttpd" on the Beaglebone, so I decided to give it a try.

 

Installation

 

The lighttpd package needed to be installed:

 

root@beaglebone:~# opkg install lighttpd











 

The installation also took care of setting up the necessary files to start the webserver automatically:

 

ln -s '/lib/systemd/system/lighttpd.service' '/etc/systemd/system/multi-user.target.wants/lighttpd.service'
Job for lighttpd.service failed. See 'systemctl status lighttpd.service' and 'journalctl -xn' for details.
Adding system startup for /etc/init.d/lighttpd.











 

Once installed, I checked the status of the newly installed webserver:

 

root@beaglebone:~# systemctl status lighttpd.service
lighttpd.service - Lightning Fast Webserver With Light System Requirements
   Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled)
   Active: failed (Result: exit-code) since Sat 2000-01-01 01:36:45 UTC; 18s ago
  Process: 917 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd.conf (code=exited, status=255)
   CGroup: name=systemd:/system/lighttpd.service

Jan 01 01:36:45 beaglebone systemd[1]: Starting Lightning Fast Webserver With Light System Requirements...
Jan 01 01:36:45 beaglebone lighttpd[917]: 2000-01-01 01:36:45: (network.c.379) can't bind to port:  80 Address already in use
Jan 01 01:36:45 beaglebone systemd[1]: lighttpd.service: main process exited, code=exited, status=255/n/a
Jan 01 01:36:45 beaglebone systemd[1]: Failed to start Lightning Fast Webserver With Light System Requirements.
Jan 01 01:36:45 beaglebone systemd[1]: Unit lighttpd.service entered failed state











 

The webserver could not bind to port 80 because it was already in use. This was caused by another webserver already running on the Beaglebone.

 

Disabling default webserver

 

Following commands were used to disable the Beaglebone's default webserver:

 

root@beaglebone:~# systemctl disable bonescript.service
root@beaglebone:~# systemctl disable bonescript-autorun.service
rm '/etc/systemd/system/multi-user.target.wants/bonescript-autorun.service'
root@beaglebone:~# systemctl disable cloud9.service
rm '/etc/systemd/system/multi-user.target.wants/cloud9.service'
root@beaglebone:~# systemctl disable bonescript.socket
rm '/etc/systemd/system/sockets.target.wants/bonescript.socket'











 

Lighttpd was now able to start and bind to port 80 successfully. The default index page was accessible.

 

CGI/Perl support

 

With the webserver installed and running, it was time to activate the cgi modules.

 

In the lighttpd config file, I uncommented the "mod_cgi" module along with other CGI related parameters:

 

root@beaglebone:/www/pages# nano /etc/lighttpd.conf

## modules to load
server.modules              = ( "mod_access",
  "mod_cgi",
  "mod_accesslog" )

#### CGI module
cgi.assign                 = ( ".pl"  => "/usr/bin/perl",
                               ".cgi" => "/usr/bin/perl" )









 

I restarted the webserver to apply the changes:

 

root@beaglebone:/www/pages# /etc/init.d/lighttpd restart
Restarting Lighttpd Web Server: stopped /usr/sbin/lighttpd (pid 125)
2000-01-01 00:42:04: (plugin.c.169) dlopen() failed for: /usr/lib/mod_cgi.so /usr/lib/mod_cgi.so: cannot open shared object file: No such file or directory
2000-01-01 00:42:04: (server.c.676) loading plugins finally failed
lighttpd.











 

Even though I enabled the CGI module in the config file, the webserver refused to start. The module needed to be installed separately:

 

root@beaglebone:/www/pages# opkg install lighttpd-module-cgi
Installing lighttpd-module-cgi (1.4.31-r2.3) to root...
Downloading http://feeds.angstrom-distribution.org/feeds/v2012.12/ipk/eglibc/armv7a-vfp-neon/base/lighttpd-module-cgi_1.4.31-r2.3_armv7a-vfp-neon.ipk.
Configuring lighttpd-module-cgi.











 

With the CGI module now activated and installed, lighttpd was happily starting.

 

root@beaglebone:/www/pages# /etc/init.d/lighttpd restart
Restarting Lighttpd Web Server: no /usr/sbin/lighttpd found; none killed
lighttpd.











 

Testing a sample CGI/Perl page, I could validate the installation:

photo (2).JPG

 

User interface

 

I had a pretty clear idea of how I wanted my interface to look like, but before starting the actual implementation, I made some sketches.

 

Sketches

 

For the interface, I had three main menus in mind:

  • Listen: play controls, play mode (FM or Web) and channel selection
  • Manage: managing channels (add, edit, delete)
  • Configure: possibility to configure some settings of the radio

 

Implementation

 

While making the interface, I tried to avoid static values as much as possible. The interface should work on more than this very specific LCD and specific resolution alone.

 

By defining everything in proportions, the interface should look the same (or as much as possible at least) on different devices such as pc, smartphone, tablet, and LCD cape.

 

The code is still unstable, so I'm only providing a small preview here. The full code will be available once the interface is stable and finished.

Screen Shot 2014-02-27 at 21.52.51.png

 

Some screenshots/pictures of the interface accessed from different devices:

 

On the LCD cape:

 

photo 1.JPG

 

On the smartphone in landscape mode:

 

photo 2.PNG

 

And finally, on the laptop:

 

Screen Shot 2014-02-27 at 22.00.28.png

 

There is still a lot of work to be done, but I hope to post the final result soon!

 

Testing

 

Below you will find a video of a small test of the interface:

 

The radio is playing in FM mode. I then press on the web icon to switch to internet radio for the same channel.

You can hear a switch, but I'm not sure the difference between FM and internet radio can clearly be heard.

After that I press the pause (should perhaps become a "stop" button) to stop playing any music.

 

 

That's it for this week's post, stay "tuned" for more!

All entries in this blog series:

 

 

In this blog post, I document the actions that were required in order to get all hardware components of this project to run.

 

 

Beaglebone Black

 

After watching Ben Heck's episode on the BBB, I knew there were different ways to connect to it:

  • Using an HDMI monitor and USB keyboard/mouse
  • Using the mini USB connector
  • Over the network via SSH
  • Using the LCD cape

 

I connected the BBB on my local network using a UTP cable and powered it with a 5V power supply.

 

photo (4).JPG

 

After booting, the IP address was reported on my router:

 

Screen Shot 2014-02-17 at 18.53.45.png

 

SSH is enabled by default, with no password for user "root":

 

Fredericks-MacBook-Air:~ fvan1$ ssh root@192.168.0.192

The authenticity of host '192.168.0.192 (192.168.0.192)' can't be established.
RSA key fingerprint is d2:2d:7d:e6:9f:8e:03:38:f1:13:12:6d:f9:30:ad:0d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.192' (RSA) to the list of known hosts.
root@192.168.0.192's password:

root@beaglebone:~#


































 

I found an Adafruit tutorial on updating the BBB's OS step-by-step: Overview | BeagleBone Black: Installing Operating Systems | Adafruit Learning System

 

Even with the BBB already running the latest version of Angstrom, I thought it would be a good exercise to flash it to get familiar with the procedure.

 

I downloaded the latest Angstrom image from BeagleBoard.org - latest-images: BBB-eMMC-flasher-2013.09.04.img.xz

After the download completed, I extracted the image and used "dd" to put it on an SD card.

 

I first listed the devices to get the proper disk id:

 

Fredericks-MacBook-Air:~ fvan1$ diskutil list

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *251.0 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            250.1 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *7.9 GB     disk1
   1:             Windows_FAT_16 RECOVERY                1.3 GB     disk1s1
   2:             Windows_FAT_32 boot                    58.7 MB    disk1s5
   3:                      Linux                         6.5 GB     disk1s6



































 

Then, I unmounted the SD card:

 

Fredericks-MacBook-Air:~ fvan1$ diskutil unmountDisk /dev/disk1

Unmount of all volumes on disk1 was successful



































 

Finally, I wrote the image to the SD card using dd:

 

Fredericks-MacBook-Air:~ fvan1$ sudo dd if=Downloads/BBB-eMMC-flasher-2013.09.04.img of=/dev/disk1 bs=1m

3488+0 records in
3488+0 records out
3657433088 bytes transferred in 2280.014020 secs (1604127 bytes/sec)






























 

40 minutes later, the image was written on the SD card, and ready to flash the BBB.

 

I inserted the microSD card in the proper slot on the BBB, held down the "user boot" button while powering it on. The 4 user LEDs lit up, and I released the "user boot" button.

 

40-45 minutes later, the 4 user LEDs remained lit up, meaning the flashing was done.

 

photo 1.JPG

 

I powered down the BBB, removed the microSD card and powered it back on.

 

When I tried to log in via SSH again, a message appeared telling me the remote host key had changed.

This is for me an indication the flash was executed. I removed the exisiting entry from my known_hosts file and was able to log in via SSH again.

 

 

LCD Cape

 

The LCD cape provided for the roadtest is the "BeagleBone LCD4 Cape" from beagleboardtoys.com.

It supports resolutions up to 480x272 and has a resistive touch screen and some buttons.

 

The pins at the back of the LCD cape are numbered, just as on the BBB. I ensured the pin numbers were aligned and connected the cape.

 

I'm not sure if done on purpose or not, but the bottom part of the Adafruit BBB enclosure can still be used with the LCD cape connected.

This provides a firm and protective base for the BBB.

photo 2.JPGphoto 1.JPG

Even the LCD cape's power button fits nicely between the BBB's ethernet and power port.

 

After booting a calibration screen was displayed:

photo 3.JPG

I had to repeat the calibration a few times, as it kept saying a mis-click was detected. On the fourth ( ! ) attempt, the calibration was accepted.

 

Once the calibration was done, the desktop was available:

photo 4.JPG

Using the latest version of Angstrom, I can say the LCD cape was really plug-and-play.

 

 

Wifi Adapter

 

The wifi adapter provided for this challenge is the UWN-200 from Logic Supply.

 

Instructions on how to install it on the BBB are provided on the website. It is also mentioned that in the latest Angstrom image (2013-09-04), the drivers for this UWN-200 wifi adapter are included by default.

 

The remaining thing to do was to configure the wireless interface by editing/creating the wifi config file:

 

root@beaglebone:~# wpa_passphrase <ssid> <passphrase>

network={
  ssid="<ssid>"
  #psk="<passphrase>"
  psk=103f69f05b3fdd791067919813682829d5999a1be2a1e3a2c1b608c1def6d1d9
}

























 

root@beaglebone:~# nano /var/lib/connman/wifi.config

[service_home]
Type = wifi
Name = <ssid>
Passphrase = <encrypted_passphrase_from_previous_command>

























 

The documentation also mentions that the ethernet connection needs to be removed for the wifi to connect automatically.

 

So I sent the reboot command via ssh, removed the ethernet cable, waited for the device to boot and checked my router again for the new IP address.

 

The BBB was accessible via wifi and the interface was indeed up and running :

 

root@beaglebone:~# ifconfig ra0

ra0       Link encap:Ethernet  HWaddr 00:0C:43:00:14:10
          inet addr:192.168.0.121  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:43ff:fe00:1410/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6572 errors:0 dropped:0 overruns:0 frame:0
          TX packets:307 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1487495 (1.4 MiB)  TX bytes:49645 (48.4 KiB)

























 

Again, very straightforward when using the latest Angstrom image.

 

Soundcard

 

I wanted to try two ways of getting audio from the BBB:

  • via HDMI
  • via a USB soundcard

 

HDMI

 

Using a microHDMI to VGA and Stereo out adapter, I was hoping to easily get audio out of the BBB.

photo (5).JPG

 

However, when listing the soundcards of the BBB, none were found:

 

root@beaglebone:~# cat /proc/asound/cards
--- no soundcards ---













 

root@beaglebone:~# aplay -l
aplay: device_list:252: no soundcards found...













 

After some searches online, I came across Beagleboard:BeagleBoneBlack HDMI - eLinux.org where it is stated that audio is only supported when using specific video resolutions.

 

I removed the LCD cape, tried listing the soundcards again, and there it was:

 

root@beaglebone:~# cat /proc/asound/cards

0 [Black          ]: TI_BeagleBone_B - TI BeagleBone Black
                      TI BeagleBone Black












 

root@beaglebone:~# aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: Black [TI BeagleBone Black], device 0: HDMI nxp-hdmi-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0












 

The soundcard appeared, but my microHDMI adapter still didn't show any video via VGA, nor was there any audio via the stereo jack.

 

I decided to park the HDMI audio solution for now and go with the hopefully more straightforward USB soundcard approach.

 

USB

 

I've ordered a USB soundcard for further testing, but it hasn't arrived yet.

 

This means I'll be proceeding without any soundcard for now, and will be coming back on this topic later on ...

 

 

SDR Stick

 

Then came the final and what I believed to be the most challenging component to get up and running: the SDR Receiver USB Stick.

 

Before working on the BBB directly, I wanted to test the SDR Stick on my laptop, as I had never worked with such a device before.

Via the SDR USB Stick's product page on Adafruit, I found a nice graphical tool ported to Mac: gqrx. I installed it and started playing.


In a matter of seconds, I was listening to the radio:

Screen Shot 2014-02-18 at 20.52.07.png

 

Knowing the stick was working, It was time to figure out how to install the necessary packages on the BBB.

 

While searching the net for information on rtl-sdr and BBB, I came across this page: Beaglebone RTL-SDR

 

Following the instructions, I executed following commands:

 

root@beaglebone:~# opkg update
root@beaglebone:~# opkg install libusb-1.0-dev
root@beaglebone:~# mkdir build
root@beaglebone:~# cd build/
root@beaglebone:~/build# git clone git://git.osmocom.org/rtl-sdr.git
root@beaglebone:~/build# cd rtl-sdr/
root@beaglebone:~/build/rtl-sdr# autoreconf -i
root@beaglebone:~/build/rtl-sdr# ./configure
root@beaglebone:~/build/rtl-sdr# make
root@beaglebone:~/build/rtl-sdr# make install



















 

(Note: You can find the full output of every command in the file attached to this post.)

 

I logged in via SSH and executed a test command to see if my rtl-sdr installation succeeded:

 

root@beaglebone:~# rtl_test -t

Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6
Sampling at 2048000 S/s.
No E4000 tuner found, aborting.

















 

The device is recognised by the BBB and can now be used to listen to the radio!

 

However, without soundcard available or working (yet!), I ran the backend application on the BBB and the frontend on my laptop. This allowed me to run the SDR stick on the BBB, but control it from my laptop.

 

On the BBB:

 

root@beaglebone:~# rtl_tcp -a 192.168.0.121

Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Tuned to 100000000 Hz.
listening...
Use the device argument 'rtl_tcp=192.168.0.121:1234' in OsmoSDR (gr-osmosdr) source
to receive samples in GRC and control rtl_tcp parameters (frequency, gain, ...).











 

On my laptop, I started the gqrx application and provided the correct connection string, the BBB reported the client connected:

 

client accepted!











 

Radio was now working on my laptop via the BBB.

 

 

Conclusion

 

I managed to get all components provided in the roadtest kit up and running. The only pending hardware bit is getting a soundcard to work.

 

With (almost) all parts working, I can get started on the actual implementation of the features as described in my first post.

 

 

Update !

 

One day after posting this, my USB soundcard arrived. I should have been more patient ...

 

photo 3.JPG

 

Using the same commands as before, I tried detecting the USB soundcard after plugging it in:

 

root@beaglebone:~# cat /proc/asound/cards

0 [Set            ]: USB-Audio - C-Media USB Headphone Set
                      C-Media USB Headphone Set at usb-musb-hdrc.1.auto-1.1, full speed




 

root@beaglebone:~# aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: Set [C-Media USB Headphone Set], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0




 

Soundcard detected without any modifications. Feeling lucky, I tried playing out audio immediately:

 

root@beaglebone:~# rtl_fm -f 88.6e6 -s 200000 -r 48000 - | aplay -r 48k -f S16_LE

Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Tuner gain set to automatic.
Tuned to 88900000 Hz.
Oversampling input by: 6x.
Oversampling output by: 1x.
Buffer size: 6.83ms
Sampling at 1200000 S/s.
Output at 200000 Hz.
Playing raw data 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono




 

Audio was playing. Amazing. No need for driver installation, config file changes, etc ... just plug and play.

 

photo 4.JPG

After setting up the rtl-sdr software as defined here, next step to enable the USB sound card as planned. Unfortunately I don't have any USB sound card as of now, so i emulated one as described here. BBB has the audio output on HDMI port by default, so it is necessary to disable that, to ensure the audio playback on USB sound card. This can be done by changing uEnv.txt after "BEAGLEBONE" drive shows up on your host system. Change the uEnv.txt to

 

optargs=quiet capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN





 

This ensures that HDMI is disable and USB sound card will be the default sound output/input device on BBB.

 

Add "/usr/local/lib" to LD_LIBRARY_PATH, so that rtl_* commands does not throw any error for LD_LIBRARY_PATH update.

 

root@beaglebone:~# export LD_LIBRARY_PATH=/usr/local/lib/





 

Next connect the USB sound card and RTL2838U to BBB using powered USB hub. and enter command "lsusb".

 

root@beaglebone:~# export LD_LIBRARY_PATH=/usr/local/lib/
root@beaglebone:~# lsusb
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 008: ID 1fc9:2046 NXP Semiconductors
Bus 001 Device 005: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T





 

This ensures that both NXP Semiconductors sound card and RTL2838U is now connected to BBB.

 

You can also use "aplay -L" to list the available sound cards

 

root@beaglebone:~# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=Demo
    NXP Audio Out Demo, USB Audio
    Default Audio Device
sysdefault:CARD=Demo
    NXP Audio Out Demo, USB Audio
    Default Audio Device





 

The output of USB sound card can be tested using.

 

root@beaglebone:~# cat /dev/urandom | aplay -r 48k
Playing raw data 'stdin' : Unsigned 8 bit, Rate 48000 Hz, Mono
^CAborted by signal Interrupt...





 

All you hear is noise on headphones or external speaker connected to USB sound card

 

Now we are good to listen to any FM radio station by following command,

 

root@beaglebone:~# rtl_fm -f 91.9e6 -s 200000 -r 48000 - | aplay -r 48k -f S16_LE
Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Tuner gain set to automatic.
Tuned to 92200000 Hz.
Oversampling input by: 6x.
Oversampling output by: 1x.
Buffer size: 6.83ms
Sampling at 1200000 S/s.
Output at 200000 Hz.
Playing raw data 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono





 

"rtl_fm" is the application name for streaming FM radio and it takes following parameters in above mentioned command,

"-f" : frequency, which in our case is 91.9MHz or 91.9e6Hz

"-s" : Sample rate, which is 200k

"-r" : Output rate of 48k

The output from rtl_fm is piped to "aplay" which takes following pararmeter in above command

"-r" : Sample rate of 48k

"-f" : Sample Format, which in our case is 16 bit little endian

 

Short video:

 

Greetings everyone.  Welcome to my first blog post covering my road test of the BeagleBone Black single board computer, and the DVB-T Stick Software Defined Radio.

 

I should probably start by introducing myself.  My name is William, and I'm a senior software engineer for Art & Logic, a custom software development outsourcing company based in California.  I work from my home in Prince Edward Island, on the east coast of Canada.  I've been interested in computers and radio most of my life and have been a licensed amateur radio operator since 1977.

 

I was very pleased to be selected for this road test and am excited to start with my project using the BeagleBone Black (BBB) and the software defined radio (SDR) module.

 

The focus of my road test is to create a local RF source catalog.  This will catalog all stationary RF sources for a given frequency range, within reception of my location.  In addition to the frequency, and received signal strength of each RF source, data on transmission schedule patterns as well as direction to source information would be collected.  From this data, a map will be constructed displaying each radio source based on direction and implied distance from the receiving station based on relative received signal strength.

 

Over the next 4 or 5 weeks, I will be posting regular updates on my progress.  I will attempt to provide you with details on the steps I take along the way.  This should give you the ability to replicate my project on your own, and to perhaps take it in new directions.

 

Much of the effort in this road test will be focused on software to control the SDR, and capture and store the data gathered during the project.

 

I will be starting with the powerful and somewhat daunting GnuRadio software package.  This is probably the most widely used and highly flexible software available for controlling software defined radio systems. It comes with a number of individual source code modules which can be combined to create a vast array of SDR behaviours.  There will be it of a challenge for me, since this modules are written in Python.  While I am fluent in a number of computer languages, C, C++, Java, C#, VB.NET etc, I've only just dabbled a bit in Python, so there will be a bit of a learning curve there.

 

So.. please stay tuned as I'm sure we are in for a fun time experimenting with this combination of components.

Hello everyone!

 

This is the first post for my Beaglebone Black Radio Challenge entry. I own a Beaglebone, so I have some experience with it. I even wrote a blog post about it on my own blog about compiling a new Angstrom image and playing around with GPIO pins from the shell. I also own a Raspberry Pi (I teach about using it at my local hackerspace) and couple of Chumby Hacker Boards. I also worked with Gumstix Overo boards while I was writing my B.Sc. thesis.

 

Project Description

I submitted two project ideas for the challenge:

  • An internet radio station: We don't have too many FM stations in Japan, here is a list from Wikipedia if you are interested. The idea is to tune to a channel, and then stream this audio signal through a port to a broadcasting server and also through the speakers or headphones if I can find a suitable USB sound card. I'll have to put some sort of streaming server in between if it cannot handle the load. The connection will be over the Ethernet connector as speed is critical and the radio will be fixed in a location. The display will show some basic information like signal strength and tuned frequency. I've worked with a similar system before in my college days so not all is new to me. But I'll have to learn some of it again as long time has passed.
  • A handheld ADS-B receiver: ADS-B is used for tracking aircraft and a similar system also exists for ships called AIS. The idea is to use the SDR to receive the ADS-B messages and show the result on the display. The wireless connection will be used to stream this data to the internet so that others can see what you're seeing on their tablets or from plane tracking websites. This project is the hardest one in terms of hardware as it includes antenna construction (the supplied antennas usually don't perform well at 1090 MHz) and some power electronics in order to have a mobile unit. Software side is easier as there are already some programs written for decoding ADS-B data and I use a couple of them. This project will be most useful for plane watchers as they can see lots of information about the planes about to take off and land. If time permits, I'm planning to design and laser cut a case for it so that I have a compact unit.

 

Next week I'll play around with my Beaglebone Black and the LCD cape. I'll also try to see if I can directly run dump1090 and see it's web output. This time there will be pictures.

Thanks element14 for selecting my design for Beaglebone Black Radio Challenge. I own a Beaglebone(first generation) so i have some prior experience in handling this new beauty(BBB).

 

My project aims in designing a radio using SDR and internet. The radio's interface(GUI) shall be Qt/GTK based. Provision of searching, storing and recording of channel shall be added. The audio output is using a USB sound card. The initial step is make RTL_SDR talk to Beaglebone Black.

 

Building rtl-sdr software


First, install cmake and libusb on Beaglebone by running

opkg install cmake
opkg install libusb*dev





Check out the rtl-sdr source and build it as described below,


git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr/
mkdir build
cd build
cmake ../
make
sudo make install



 

This completes the installation. Now its time to test it by running

 

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib rtl_test -t



 

Below is output i  got,

Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6
Sampling at 2048000 S/s.
No E4000 tuner found, aborting.



Success!!!!!

My next step would be to get usb audio to work. Looks like I have to disable HDMI output for this.

All entries in this blog series:

 

 

 

This is my first post for the Beaglebone Black Radio Challenge. I have never worked with the BBB before, but I'm sure it will be a fun learning experience!

 

 

Project Description

 

For this challenge, I plan to create a FM/Internet radio combo with following features, using the Beaglebone Black:

  • All-in-one solution with integrated speakers and easy to use control interface
  • FM / Internet radio switching capabilities
  • Possibility to search and store FM / Internet radio channels

 

I will also attempt to display RDS messages in FM radio mode

 

 

GUI

 

The radio's interface should be straightforward and easy to use.

  • Options/actions should be made available through big buttons
  • Channel information should clearly be visualised
  • Some detailed information such as FM receive level, internet connectivity should be displayed in a status bar.

 

It seems the SDR USB stick also came with a remote control. Perhaps it can be integrated in the project as well, but I originally only planned control via the LCD touch screen.

 

 

Switching / Redundancy

 

In certain situations it might be more desirable to use FM instead of internet radio or vice versa.

 

For example:

  • Whenever possible, FM radio would be the preferred option as it doesn’t consume any internet bandwidth. But if due to certain conditions (e.g. due the structure of the building) the FM reception is not reliable or even possible, the system should switch to internet streaming.
  • When on holidays abroad, the regular FM channels wouldn't be available, so the only remaining option would be to use internet radio streaming in order to still be able to listen to your favorite channel.

 

The idea would be to monitor the FM reception level/quality (perhaps combined with other factors) to make the decision to switch to internet radio instead.

 

 

Audio output

 

The Road Test kit seems very interesting but it does lack one major component in order to build a usable radio: speakers.

 

I would test different options to provide connectivity for speakers, such as the HDMI port, a USB sound card, ... and see which is most useful and/or practical.

Shabaz has some interesting notes about the audio on the Beaglebone Black: BBB - Audio notes. I'm sure they will come in handy once I get started.

 

 

All-in-one solution

 

The provided case is not sufficient for the entire setup. This is why I would shoot for a “all-in-one” solution where I would create an enclosure able to contain:

  • BBB + LCD cape
  • Wifi USB stick
  • Radio antenna
  • Speakers

 

I’m thinking of two plexi glass panels (with cutouts for LCD and speakers) holding everything together in a good looking, but compact solution.

 

photo7.JPG

Early sketches of the solution in mind

 

Kit

 

My kit arrived yesterday. It looks great!

 

photo.JPG

Contents of the BBB Radio Challenge Kit

 

Unfortunately it's missing the Wifi USB adapter, but I've been told it should arrive any day.

 

 

 

photo 1.JPG

The BBB fitting nicely in its case


photo 3.JPG photo 4.JPG

LCD cape from beagleboardtoys.com


The different components look great and I can't wait for the weekend to start in order to have some quality time with my kit.


In the mean time, I'll be watching Ben Heck's Getting started with BBB video (again)!

UPDATE: Here are my other posts for the BBB Radio Challenge:

 

 


 

 

 

 

Here are project's goals:

 

 

 

 

A) Establish System Requirements

 

 

functioning LCD Screen Cape

mpd

mpc

Java SE 6 or 7

Reaction to Screen Cape Button Clicks (via Java)

 

 

B) Port the onebeartoe Internet Radio Application to the BBB

 

 

C) Enhance the onebeatoe Internet Radio Application

 

 

incorporate the LCD cape’s buttons as next/previous station buttons

 

 

add support for the FM/AM radio antenna from Adafruit