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 192.168.7.2
ifconfig add default gw 192.168.7.1
On laptop, start with an ifconfig and look at the output. There should be two eth[x] entries, one of which will include the 192.168.7.2 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 192.168.7.1
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
wget http://www.noiseaddicts.com/samples/1456.mp3

(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:
mpg321 somafm.com/indiepop.pls
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, led_aging.sh is a screwed-up file, and prevents apt-get update from working correctly on half a dozen packages.
From here: https://groups.google.com/forum/#!topic/beagleboard/LPjCn4LEY2I
do this:
Replace the existing /etc/init.d/led_aging.sh script with:

#!/bin/sh -e
### BEGIN INIT INFO
# Provides: led_aging.sh
# 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)
### END INIT INFO

x=$(/bin/ps -ef | /bin/grep "[l]ed_acc")
if [ ! -n "$x" -a -x /usr/bin/led_acc ]; then
/usr/bin/led_acc &
fi

Profile

smellsofbikes: (Default)
smellsofbikes

March 2015

S M T W T F S
1234567
891011 121314
15161718192021
22232425262728
293031    

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 27th, 2017 12:30 pm
Powered by Dreamwidth Studios