Adventures with the BeagleBone BlackBeagleBone Black with debian


July 10, 2022
Better information about a fresh BBB
This is primarily for those that work from a Windows machine.
The setup.

//Getting a new image on the BeagleBone........................
There is a lot of old information out there. They say, 'hold the boot button down while you power up and it will flash'. Not for me, it would just boot from the card. My old image was 8 years old so maybe the boot loader just would not work. If this happens to you the fix is simple:
See the second answer here

Which is essentially..
in the '/boot/uEnv.txt' file:
Uncomment(i.e. Get rid of the #) the last line which reads:
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh
You can use Filezilla as the file is owned by debian.
with putty:
sudo shutdown -h now
Then do the 'boot button' thing and it should flash.

// Set the BBB to use a static ip.........................................
In the old days you would edit /etc/network/interfaces, don't!
The OS uses connman these days, a magic way. So shutdown and plug into a lan line and boot up. The Ethernet device won't show up until you do and it has to be present for the following. Login with PuTTY and do:

connmanctl services

You should see results as in the link like:

*AO Wired                ethernet_0eb31468dcc9_cable

So make a command line like(this is one line):
sudo connmanctl config ethernet_0eb31468dcc9_cable --ipv4 manual 192.168.0.51 255.255.255.0 192.168.0.1 --nameservers 8.8.8.8 127.0.0.1

You will loose your connection to the board. In a windows console 'cmd', do a:
arp -a
And your static ip should show up. Set up your new configs for PuTTY and Filezilla using the debian login for the next step I name mine the likes of   'BBB_51' based on the ip.

//Set up the server for easy access ...................................
SSH Keys with PuTTY on Windows
But the keys generated by PuTTY don't seem to work. Let the BBB generate keys and you should be good. Become root:
sudo -s
cd /root
mkdir .ssh
ssh-keygen -b 4096

And go ahead and name the files as in the example ssh_keygen shows.

-ls .ssh
And the files should be there. You should be able to copy the next set of lines and paste them to PuTTY.

mv .ssh/id_rsa /home/debian/private
mv .ssh/i* .ssh/authorized_keys
chown debian:debian  /home/debian/private

Now you can come into /home/debian with Filezilla and grab the 'private' file to put in your BBB folder on the windows machine. reboot the BBB. (You are suppose to delete the 'private' file from the BBB for security :)

On the Widows side you will have to use PuTTYGen to create a compatible file from the 'private' file you got from the BBone. Then you can create a putty login for root using your private key, follow the directions in the above link.
Set up filezilla to use the same private key and it will log in as root. From here, you can do anything you would like as root without sudo and a password.

//...............................
I'm creating a new board setup to have a mosquitto broker running on my network. Here is how to get that working. (TODO, write the page and link it here!)

//Back to the old stuff from Sept 2014, the radio transmitter! ........

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 automatically. Etc....

As of 7/13/2022 I still have not done much more with the radio transmitter, but to make a new 2 watt final. But it has been working fine for 8 years now!

Thanks, Dan.

Copyright © 1996 - 2022, Highlands Electronics All Rights Reserved.
Page created: 19 sep 14   rev:
10 jul 22

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