.oO turn on ~ tune in ~ drop out Oo.
Running XBMC on a Raspberry Pi
Running XBMC on a Raspberry Pi

Running XBMC on a Raspberry Pi

Recently I ordered a Raspberry Pi (Model B with 512MB RAM) from RS Online and it took about two weeks until my new toy has been delivered.

 

 

I decided to run XBMC on it (based on Raspbian) to have an additional media center, next to my (out-dated) Popcorn Hour. For running XBMC on the Raspberry, it is necessary to buy a (at least) Class 6 SD card. In my case I bought a 8GB UHS-I SD Card from SanDisk which is more than sufficient for streaming Full HD video.

 

Main Installation

After downloading the Raspbmc Installer, I prepared my SD card with the necessary files and plugged it into the Raspberry’s SD card socket. Fulfilled with excitement I connected the Raspberry via HDMI to my HDTV, connected keyboard and mouse, a network cable and a Micro-B-USB power adapter. As it doesn’t have a power switch, the Raspberry boots immediately after connecting it to the power source. The installation process took about 15 to 20 minutes and the system rebooted automatically into XBMC once the installation was finished. I calibrated the Video Output Settings to align the screen correctly. Fortunately the network settings I configured manually in the Raspbmc installer were already in place so I was able to connect via SSH to change my keyboard layout and timezone settings. To connect via SSH for the first time, it’s good to know that the default username is pi and the default password is raspberry. The password should or can be changed by using the command sudo passwd pi.
So far, so good – my Raspberry Pi XBMC was up and running.

 

 

Adding media by using NFS

Now it was time to add some media files to my Raspberry’s library, which was a bit tricky at the very beginning. I decided not to use a local storage like the SD card itself or a connected USB stick/drive because my media files are already located on my Synology NAS DiskStation and on my Sybas Popcorn Hour (which is now owned by Cloud Media). Luckily both of the systems support the NFS protocol, which can also be used by XBMC. According to wiki.xbmc.org the NFS protocol has less protocol overhead than SMB, but it’s more insecure out of the fact that it does not need usernames and passwords to authenticate, instead of this simple UID’s are used. Anyway NFS sends data more quickly across the network and I use it just in my private LAN, so it seems to be the best option.

Even though I configured the correct NFS privileges for my Raspberry’s IP address I was not able to connect to my NFS shares successfully. I found the solution by taking a deeper look into the above mentioned XBMC Wiki manual. It’s necessary to edit the NFS server configuration file which is located in /etc/exports. Any values of insecure_locks (for the appropriate NFS share) should be changed to insecure. If the value isn’t set, it’s necessary to add it because “the insecure option is needed because we want to be able to run XBMC without root privileges. If the insecure option is not enabled, only the root user (uid 0) will have access to the nfs share”

No sooner said than done I modified the configuration file and initialized the exported directories by typing exportfs -ra and – voilà – I was able to connect to my NFS shares!

 

Operating XBMC by Remote Control

Now that everything has been configured I decided to unplug keyboard and mouse from the Raspberry. There are several useful XBMC remote control apps available in different app stores. For my BlackBerry I use XRMT which works like a charm. To configure the remote control it’s just necessary to enter the IP address of the XBMC. On the XBMC it’s necessary to “Allow programs on other systems to control XBMC” which can be found in the Remote Control settings.

There is also another good remote control option on the market for people who like a handier remote control – a Miniature Wireless USB Keyboard with Touchpad by Adafruit Industries. The keyboard communicates via a 2.4 GHz wireless link and uses only one USB port for both mouse and keyboard.

Some HDTVs support a HDMI feature, called CEC (Consumer Electronics Control). There are different trade names for CEC (i.e. Samsung Anynet+, Sony BRAVIA Link/Sync, LG SimpLink etc.), depending on the TV brand. If the Rasperry is connected via CEC, it is possible to control the XBMC by using the remote control of the TV. Most likely not all CEC commands are covering all of the XBMC commands, but all in all it is a good way to control the basic navigation of the XBMC.