Posted 22/Jun 2012 at 13:55
by in Science & Tech read by 1788 people

Getting started with my Raspberry PI

About half a year ago, back in the cold month of February, a good friend told me about the Raspberry PI - an very small, very basic computer that runs Linux. Back then Raspberry PI organization was still quite busy deciding on the exact components and the cheapest way to produce it. The initial batch that went on sale sold out extremely fast, but as soon as I could I took the chance and ordered my $25 computer.

Months went by, and every now and then Farnell sent out an update on that a new batch of PIs were being shipped. Imagine how great my joy was when I finally recieved the "your order has been shipped" notice. One day later, I got it.

First impression

I opened the box, which had just about the size of a deck of playing cards, and looked at the board. I turned it around. Looked again. Hmm. It looked much more like a component than a full computer. Once I had identified the two USB ports, SD card slot, Ethernet port, micro-USB power input, HDMI, composite and headphone output my faith in the product grew.

Beforehand I had already loaded the recommended Debian Squeeze image onto a 16GB class 10 SD card. I attached my wireless keyboard, the various cables, plugged in the SD card and finally the power. Lights went on and the familiar Debian boot process appeared on my TV screen. Apparently, at first but it runs some initialization and reboots after that. Soon after, I had a login prompt.

username, password, startx

The first thing I wanted to explore is to what extent it would be able to display a fully functional wold wide web on my TV. Well, that was a no-go. Sure enough could I start the LXDE lightweight graphical environment, and start a very simple webbrowser. But it was all so slow. And I'm talking about really, really slow. Rendering a webpage could easily take half a minute, and registering a click even longer. The YouTube website would load, but the Midori was not able to show HTML5 nor Flash video. And it was slow.

It took me the better part of half an hour to navigate to the Google Chrome download page and attempt to download Google's webbrowser. When after that I still didn't have it installed I went along a much easier path. Loaded up a terminal, and a very slow sudo apt-get install chromium-browser later I had the fully open source flavour of Chrome.

But YouTube would still not get past the loading animation of a video. If I were to use this device for watching videos on my TV I needed to do something else.

Educational device

Before I continue to describe how I eventually got it do load up something I could imagine using on a daily basis, I need to get back to what the device was intended for. The purpose of the Raspberry PI is to enable programming education for everybody, mainly children. For that, it needed to be cheap and small. Yet powerful enough to run a development environment of the most popular open-source programming languages. The recommended OS image comes with Python installed, and it's very simple to apt-get yourself into running a basic LAMP environment. And I might very well be using the device for that, from time to time. But since I work on the desktop variant of the same Ubuntu distrubition as many of the webserers I maintain and/or develop for that wouldn't be my main purpose for it.

Watching HD video

They announced that it would play HD video. So that's the next thing I wanted to try out. I copied some video files onto the SD card, stayed on my commandline, installed mplayer and tried to play the video. It played, without sound and rather slow. After having closed mplayer, it also told me that my system was too slow. Major bummer. I googled, followed advice and loaded the snd_bcm2835 kernel module. Sound now worked on the 3.5 mini jack output, but not on the TV yet. And mplayer had completely stopped playing video. It wasn't before I had added the line hdmi_drive=2 to my /boot/config.txt file (see the Troubleshooting page) that I could actually hear something on TV. But mplayer played the video even slower.

I needed a different solution. Pretty soon already, I found that XBMC was the only player that was actually able to utilize the hardware acceleration on the VideoCore IV chip. But no binaries were available to install onto the Debian Squeeze installation, and I didn't feel like compiling. Might try that later. The easiest solution turned up, when I found a ready-made OpenELEC image to load onto the SD card. OpenELEC is a Linux distribution that just runs the XBMC media centre

Now, that was what I was looking for. XBMC was the answer all along. It comes with a wide range of Plug-ins to play internet video including Vimeo, YouTube, the dutch Journaal 24, various Swedish, Norwegian and Danish (including DR NU and Bonanza) streaming services. It supports UPnP, Samba shares, AirPlay and DLNA to play video from anywhere on your network. On top of that, it can even play a video file that you just copied to the SD card.


To conclude, if you're hoping to use the R-PI as media centre application go for XBMC. I tried the OpenELEC distrubition, because the website was offline last night so I don't know which one is best. Perhaps I'll try a comparison at some point.

If you actually want to use it for the intended purpose and learn to program I would say that probably any distribution available on the Raspberry PI download page is good for you. And if you don't want to program on your TV - hook up the HDMI to your monitor or enable SSH. Remember to hide your box behind a firewall, and/or change the password. You don't want to let intruders onto your network!

You might also want to explore these likealots