Adventures with the BeagleBone BlackBeagleBone Black with debian


I got a couple of these boards a while back. I've just finely gotten around to my first project. I stream KJZZ and rebroadcast it here in Northern California. I like their format. Right now I have an old box with Ubuntu on it to do the streaming. I want that box back for a 3D printer project, but that's another story. I ordered the new audio cape, for $30 I did not want to solder up a cape. It also means that there are out of the box configurations that support the board. I had an older image of Amgstrom, if you Google, you will find it had a problem working the the audio cape. I soon found the the debian distro did not have problems, so I loaded that.

If you don't have putty and filezilla, get them. But you probably already have them.

While you are in the BBB with the USB port you will find uEnv.txt in the root of the file system. uncomment the '##Audio Cape (needs HDMI Audio disabled)' lines. I have not plugged a monitor in, but this is suppose to keep the HDMI video working. But you do need the HDMI audio disabled to use the cape. The second line enables the cape.

Then I went through the steps here:

CircuitCo:Audio Cape RevB

# these are the lines I actually used:
apt-get update
apt-get install unzip
wget http://elinux.org/images/1/10/BB-BONE-AUDI-02-00A0.zip
unzip BB-BONE-AUDI-02-00A0.zip
dtc -O dtb -o BB-BONE-AUDI-02-00A0.dtbo -b 0 -@ BB-BONE-AUDI-02-00A0.dts
mv BB-BONE-AUDI-02-00A0.dtbo /lib/firmware

# to check and finish
cat /sys/devices/bone_capemgr*/slots
echo BB-BONE-AUDI-02 > /sys/devices/bone_capemgr*/slots
cat /sys/devices/bone_capemgr*/slots

# plug some earphones in the green jack, put a .wav in your home dir, and:
aplay some.wav

You should hear what ever is in the some.wav!

The volume is low so I ran 'alsamixer' to turn the volume up. Just use the arrow keys until you get it.

Now I was ready to stream. ffmpeg will do that:
apt-get install ffmpeg

ffplay won't parse a cover URL like a browser will. You have to have the ported URL. I had done some work at writing a stream wrapper in Visual Studio so I knew where that was. Here is the solution for VS10, (console project, so will compile with express):

Zip file of the VS audio project (20k)
Zip of information on streaming (11m)

A URL like:
http://riosal.ic.llnwd.net/stream/riosal_kjzz.m3u
accualy returns:
http://sc4.dal.llnw.net:80/stream/riosal_kjzz

Link to the m3u specification

so:
ffplay http://sc4.dal.llnw.net:80/stream/riosal_kjzz
works.

That's where I've gotten with it so far. The audio level is still much lower than a Dell box produces. I don't know if that's just the way it is or I'm missing something. I checked the datasheet on the TLV320AIC3104, it has plenty of output level.
 
Sept 21, 2014
Back at it. So I found I missed some of the level settings in 'alsamixer'. Turned the lines up and I have plenty of audio now. It was time to set this board free. I set the IP to static. To get this just right, the lines in /etc/network/interfaces for eth0 are:
auto eth0
iface eth0 inet static
        address 192.168.0.52
        netmask 255.255.255.0
        gateway 192.168.0.1
        dns-nameservers 8.8.8.8 127.0.0.1

8.8.8.8 is the google nameserver and that is my gateway, yours may be different.

I didn't get it right the first time and the BBB was still answering on the dynamic IP. Now it is 192.168.0.52. I can telnet in and:
ffplay http://sc4.dal.llnw.net:80/stream/riosal_kjzz &
exit

That will do for now. I can listen to the radio and go to work on an HTML page to schedule programming. Under the hood I'll do process watching so if I loose the feed, it gets handled automaticly. Etc....

Thanks, Dan.

Copyright 1996 - 2014, Highlands Electronics All Rights Reserved.
Page created: 19 sep 14   rev:
21 sep 14

http://www.lakeweb.net/bbb/index.html