Tyblog

Technology, open source, unsolicited opinions & digital sovereignty
blog.tjll.net

« Raspberry Pi XBMC How-To »

  • 29 December, 2012
  • 1,665 words
  • nine minutes read time
The final product
The final product

A while back I finally got my 512MB revision 2 model Raspberry Pi to successfully run OpenELEC. The picture to the right shows it running, using a shared network mount to access all of my media files.

Some folks requested a write-up detailing how I put everything together, so I’m going to try and provide a generalized walkthrough for those with the initiative to do something like this. Although I’m not assuming you’re a Linux guru, there’s some technical aspects to this - but it’s worth the effort.

Introduction

Why?

Doing this is worthwhile because the final product is:

I’ve even got an Apple TV as well, and I found making this HTPC was worth the effort and didn’t duplicate too much of my Apple TV’s functionality.

Parts

There are a few different components to this set-up, so here is the high-level run down:

Here’s what you’ll need in terms of actual equipment. Note that if you already have hardware that fills one of these requirements (like an SD card or Android charger that fits the Pi) you don’t necessarily need all of these.

I’ve bought my boards through MCM Electronics, who have been pretty good about shipping them quickly. Because Raspberry Pi’s are in such high demand, some suppliers can take forever, but MCM is pretty consistent. They also have a dedicated Raspberry Pi page, which can help with a lot of this.

Aside from these essentials, there are some miscellaneous things I didn’t include that you’ll need to take in to account to make sure you can complete everything:

I’m also assuming that there’s a wireless-N network available for the adapter to use (if you have an ethernet cable that can reach your router, that’ll work too.)

How-To

In order to get this thing up and running, let’s start with the Raspberry Pi.

The Pi

The first step is installing OpenELEC. There are pretty straightforward steps for OS X or Linux, but there’s an additional tutorial explaining how to install it on Windows as well.

After you’ve got OpenELEC installed on the SD card, assemble your Pi. Put the Pi in the case (if you have one), insert the SD card, and connect the HDMI cable, keyboard, AC adapter, and your network adapter (either an ethernet cable or the wireless-N USB dongle.) OpenELEC is fairly hands-off, so once you finally plug the power in (note that there’s no switch for power on the Pi - just plug/unplug the power), you should see an interface on the screen you’ve connected it to (wait a while for it to show up, it can take a minute to load.)

With an ethernet cable, networking should work right off the bat. If you’ve got the wireless adapter, the Pi should recognize the hardware itself but may need wifi configuration. The following should get networking started with a wireless adapter:

Once that’s done, networking should be up.

OpenELEC Tweaks

Now your Pi is operational. The next step is to clean up a few things on OpenELEC.

XBMC Remote

You don’t want to use a keyboard constantly with XMBC, so setting up a remote app with your smartphone is a good idea.

Once it restarts, you’ll need to find the IP address of the Pi (find it by looking at System → System Info.) Search either the App Store or the Android Marketplace for an XBMC remote. Personally, I’ve got an iPhone so I got this remote and it works really well.

In your new app for XBMC, enter the IP address you found for the XBMC server and your username and password, if you changed those (these settings will work differently with each different app out there, so just use your best judgement.)

With the remote configured, you should now be able to control all aspects of the Pi through your XBMC app (as long as you’re connected to the same network as the Pi - basically, as long as you can reach the Pi’s IP address.) At this point the keyboard isn’t needed any more.

Other Settings

Expore some of the options that OpenELEC has. Among these I would recommend looking at:

Now we come to the most important part: getting media on XBMC.

Multimedia

There are a few different options to get videos on the Pi.

I have a network share that provides access to all of my media files. I’m going to build a dedicated NAS this summer, but for now this is a fairly simple set up: I have an external 1TB HDD connected via USB to my router, which can directly share directories over SMB. This means that I open OpenELEC, select Video, and add a new source by browsing my network for the share with my videos on it. OpenELEC will actually try to autodetect the content and download metadata for it, which is awesome.

If something like that sounds appealing to you, then you can pretty easily share a folder on Windows and add a new source to OpenELEC. Sharing folders through Windows is a bit beyond the scope of this post, but in order to start try reading up on it here.

Another option is to load up all of your media onto an external drive and connect it directly to one of the Pi’s USB ports. After the media is on the drive, connecting it to the Pi just needs to be followed by adding your media (go to the Video main menu option and then add a new source, browsing to the drive you connected to find media files - just find the name of the drive in the window that opens up.)

If there’s one weakness to this set up, it’s this part - you need some pre-existing media to make it work, unlike the Apple TV wherein apps like Netflix and Hulu Plus allow you to use some pre-existing subscriptions to access media. However, if you have a movie collection on some digital media, this is a very good way to use it.

Conclusion

What I’ve covered here is fairly high-level, and there’s a bit more to configure if you want more functionality.

If there are any other points of this setup that anyone would like me to further elaborate upon, send me an email and I’ll either revise this post or do another writeup along the topic that needs clarification.