the itjerk

my adventures with technology

raspberry pi, part two

After nearly five months on order, I got another Raspberry Pi model B last week, this one upgraded to 512mb RAM. Its running the October 28th release of Raspbian "Wheezy", and for some reason, only Ubuntu's Image Writer would get it working properly on my 8GB SDHC card. The Pi's performance is much snappier than the previous one reviewed, due to the extra memory and four months of work on the Debian-based OS.

*** FYI: Remember, that SD card is your hard drive, and by most estimations, not the most reliable format in the world. Keep it backed-up, have a spare or two around, SD cards are inexpensive! And please be sure to shutdown the RPi correctly using "sudo halt" or similar. This will help keep that SD card uncorrupted. ***

New this time is the raspi-config command that ran on first boot. Among the several options available is the ability to overclock, which I eagerly set to high. The good folks at Raspberry Pi claim it will not void the warranty. Even though web browsing is sluggish, the performance of this board seems good enough now for desktop use. Beware, however, some seem to believe that this leads to SD card corruption!

BTW, total cost of ownership: Raspberry Pi $43.02 for the board delivered, plus SD card, video adapter, power stuff, etc comes to $65; plus I'm using an old Apple keyboard & mouse, ethernet, and a spare monitor.

Right off the bat, I had to edit /etc/default/keyboard and edit the keyboard language from "gb" to "us" to get the @ sign to type right. You can also do this with raspbi-config, and be sure to run "sudo setupcon" right away to avoid delays in rebooting. After a perfunctory update && upgrade, I added the tsocks package which allows me to use a SOCKS connection with the Midori browser.

Open /etc/tsocks.conf, comment out all lines except:

server = 127.0.0.1
server_type = 5
server_port = 1080

Then open a ssh connection to your the computer you want to tunnel through, using the same port above:

ssh -D localhost:1080 tunnelcomputer.com

Finally, open the browser, using the tsocks argument first (you can do this with most any program!)

tsocks midori

Viola! Go to whatismyip.com and verify yor SOCKS connection. But remember, DNS request don't go through SOCKS in the Midori browser. (IceWeasel, the Debian version of Firefox, can).

Next, I installed mpc and mpd software, which allow playing audio streams over the internet.

sudo apt-get install mpd mpc

If you man mpc, you can get a list of commands available, but here's how to add an internet stream and play it. Note that when you start/restart the RPi, your stream will immediately start! I'm playing the Shoutcast address for prog station Stellar-Attraction.

sudo mpc add http://stellar-attraction.net:8000/
mpc play

You can also load a folder by cd'ing to it, and then telling mpc to queue it up:

mpc ls | mpc add
mpc play

Pretty slick. Loads of commands, like shuffle, current, clear, etc. More about MPC and MPD here.

Other things to install for music are:

sudo apt-get install moc libflac-dev

Next, let's see if I can stream my Squeezebox Server from home (have to open ports on the router first)!

Advertisements

Comments are closed.

%d bloggers like this: