smellsofbikes: (Default)
[personal profile] smellsofbikes
First step: installing software.
I'm type 2 lazy, meaning I do a bunch of work so I can sit in my chair later. As such, I set up port forwarding on my laptop so I can do all my upgrades and work from the laptop rather than having to walk downstairs where the ethernet cable lives.
So: USB connecting bbb to laptop, allowing me to ssh into the bbb and run it. Cat5 cable from bbb to laptop, with port forwarding set up.
On bbb:
ifconfig eth0
ifconfig add default gw
On laptop, start with an ifconfig and look at the output. There should be two eth[x] entries, one of which will include the entry. That's actually the usb. So you want to configure the other one, which is the hardware associated with the port where the cat5 cable lives. For this example I'm presuming it's eth1, and your wireless connection is wlan1.
sudo ifconfig eth1
sudo iptables --table nat --append POSTROUTING --out-interface eth1 -j MASQUERADE
sudo iptables --append FORWARD --in-interface wlan1 -j ACCEPT
sudo echo 1 > /proc/sys/net/ipv4/ip_forward

If you're using xubuntu (or apparently a few other distros) that last line won't work because for whatever reason '>' doesn't inherit sudo permissions. So you have to punt:

echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward

Now you can start work on the bbb.
apt-get update
apt-get upgrade
apt-get install alsa-base alsa-utils

Mine already had all the alsa stuff installed. A bunch of programs didn't successfully upgrade, like apache and dbus, which I need to look into later, but I don't actually use any of those for this project so I don't care. [note 1]

Now, disable HDMI so that we can get audio to the usb.

Go to /boot/uboot and edit uEnv.txt to remove the comment status from the line disabling hdmi. It'll be optargs=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN
Then go to /etc/modprobe.d/alsa-base.conf and edit it to change the index on snd-usb-audio from -2 to 0.
Reboot the bbb with your usb soundcard plugged in.
For me, this resulted in being able to play music. I needed some music to play and a player.

apt-get install mpg321

(you might want to change your working directory to /home/debian before doing that, rather than sticking an mp3 in /etc/modprobe.d)
and then you can mpg321 1456.mp3 and hear some noise.
mpg321 will also accept url's, so:
will bring up a menu of soma's indiepop streams that you can connect to and start playing. Take note of the stream names and you can use them directly without having to select This is useful for completely headless operation.
I used a Syba usb soundcard. It works beautifully.

[note 1]
For some reason, is a screwed-up file, and prevents apt-get update from working correctly on half a dozen packages.
From here:!topic/beagleboard/LPjCn4LEY2I
do this:
Replace the existing /etc/init.d/ script with:

#!/bin/sh -e
# Provides:
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start LED aging
# Description: Starts LED aging (whatever that is)

x=$(/bin/ps -ef | /bin/grep "[l]ed_acc")
if [ ! -n "$x" -a -x /usr/bin/led_acc ]; then
/usr/bin/led_acc &
Anonymous( )Anonymous This account has disabled anonymous posting.
OpenID( )OpenID You can comment on this post while signed in with an account from many other sites, once you have confirmed your email address. Sign in using OpenID.
Account name:
If you don't have an account you can create one now.
HTML doesn't work in the subject.


Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.


smellsofbikes: (Default)

April 2017

2 345678

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 26th, 2017 07:59 pm
Powered by Dreamwidth Studios