Raspberry Pi as a Media Center with Smartphone Remote Control
I’ve always wanted to get into hardware as a hobby, when I was back in university one of our group projects was building a Lego Mindstorm mine detection robot, it was a lot of fun working with other people on this project and building out a fully functional robot with an AI capable of navigating a simple test environment, and performing tasks.
That was a while ago though, and between work and consultancy its been difficult finding time to cultivate this interest. Although recently I started reading up on the Raspberry Pi project, how can you connect it up with Bread Boards, Arduino modules and even how to turn it into a full blown Media Center controlled using the XBMC app on your IPhone or Android Smartphone. This I had to try.
Below I go through my experience of how I installed Raspbmc on my Raspberry Pi and configured XBMC media center and the Edimax wifi dongle to stream movies from my desktop PC, as well as control the XBMC media center through the IPhone app.
Raspberry Pi Media Center Kit
First of all the kit that I was working with:
- Raspberry Pi
- Edimax EW-7811Un nano USB adapter
- 1 USB to Micro USB cable (5 v)
- SDHC Flash Card (Class 10)
- Raspberry Pi Case (better than leaving the PCB bare on my desk)
- HDMI cable
Obviously you’ll need a keyboard and an SD card reader, but usually you can find these things around the house or office.
One thing you will need to keep in mind when attaching any peripherals to your Pi is its compatibility with the device. By default the Raspberry Pi has 700 mA, for each USB port 100 mA is allocated making both USB ports’ power consumption 200 mA (and 500 mA is for the Raspberry Pi on board components), this means that if you do not have an external plug powered USB hub (which supplement peripherals power consumption) any device that consumes more than 100 mA on the USB port might not function properly. I had an issue getting my Sidewinder keyboard to work and had to buy an ASDA basic keyboard (which worked perfectly). There is also a list of supported Raspberry Pi Peripherals to guide you through supported hardware.
XBMC Media Center on your Raspberry Pi through Raspbmc
Now to get things started all you need to do is follow the instructions for installing RaspBMC on your Raspberry Pi, Niall Magennis did an awesome job going through each step of the process and it is extremely easy to follow.
RaspBMC is basically a reduced version of the Debian Linux OS, the OS is pre-loaded with XBMC media center which is started when the OS starts, XBMC is a really awesome Media Center backed by a large community of developers who are continuously releasing new plugins and add-ins for the application, including a really nifty IPhone and Android remote control.
One thing to note is that if you need to quit XBMC and login into the OS you can do so with the following login details:
- Username: pi
- Password: raspberry
Setting Up Wifi on your Raspberry Pi Media Center
This will get your setup 90% of the way there, you will still need to configure the Wifi Edimax dongle, there is a handy little guide by Anup Narkhede that shows you how to install the wifi drivers on your Raspbmc, although Anup uses a Tenda W311U wireless adapter, the same instructions can be followed to get your Edimax adapter to work (and a bunch of other Wifi adapters too).
Make sure to setup your wifi adapter to connect to your network as soon as the OS loads, since we are trying to control XBMC using a mobile app, it has to always connect to the wifi network on start-up to ensure you do not require a keyboard. It is also necessary to assign a static IP to your connection, as some routers might assign a different IP each time a connection is established which means you will need to reconfigure your IPhone or Android app each time.
Raspberry Pi MPEG-2 Codec License
Although XBMC is capable of playing any type of media, the Raspberry Pi does not have a license to decode MPEG-2 (done so on purpose to avoid additional cost, since its a research tool first), although it has the capability to do so given a license. You can buy a license to play your MPEG-2 (or VC-1) on the Raspberry Pi website.
And that should be it! of course along the way you might have some hiccups, I had to restart the Pi a few times (for some reason it kept jamming) although at the end everything should be pretty solid.
I have tested the setup for a few days and although the Raspberry Pi can handle streaming HD movies over the network no problem, if you are navigating the XBMC catalog while playing a movie in the background the audio and video will go out of sync, when you get back to the video the CPU should catch up though (takes a few seconds).
Also, there is an awesome number of plugins for XBMC that allows you to watch pretty much any channel out there, so you could be streaming the latest sport matches from your Raspberry Pi into your TV, the ethics of all this is questionable, but just knowing its there if you needed it is awesome.
Raspberry Pi as a Media Center with SmartPhone Remote rated 4 out of 5 by 1 readers
Leave a Reply
Want to join the discussion?Feel free to contribute!