Raspberry Pi as Smart TV upgrader

This is a continuation to my previous Blog “Media Centre for Your Connected Home”. In that Blog, I covered the concept of a Connected Home. In this Blog, I will cover the setting up of the Media Centre. TV forms an integral part of our home entertainment and we desire to have the best TV. Over the years, TVs have gone smarter with support for online streaming like Youtube, Hulu, Netflix, Dailymotion, etc. It also supports playing Media files stored on your computer, Smart Phone or Network hard drive. There are even some TVs which have applications for Skype, facebook, Web browser, etc. Many people these days have TVs which have large screen with good display but they do not have the above mentioned features and it does not make sense to throw away the TV and get new a one just so that you can watch online streams or view your personal media content. This is where Raspbmc comes into the picture. Raspbmc is a device which allows you to do most of the above on your conventional TV. Raspbmc is a Raspberry Pi computer running the XBMC software. It can be set up for less than $50.

Raspberry Pi for Nerds

The Raspberry Pi is a palm sized computer that plugs into your TV. It has 2 USB ports for keyboard and mouse input. The Model B version of the device includes 10/100 wired Ethernet and has 512Mb of RAM. Wi-Fi is available via a standard USB dongle. There is a composite out for analog TV and an HDMI out for digital TV. It can be powered by a basic USB charger. It has a Broadcom BCM2835 Chip containing an ARM1176JZFS, with floating point, running at 700Mhz, and a Videocore 4 GPU. It is like a 300MHz Pentium 2 with very good graphics. It can play Full HD videos without a hitch.


XBMC for Nerds

XBMC is a free and open source media player application developed by the XBMC Foundation. XBMC is available for multiple operating systems and hardware platforms, with a user interface for use with televisions and remote controls. It allows users to play and view most videos, music and all common digital media files from local and network storage media.


Requirements for setting up Raspbmc

TV having HDMI Port or Composite port
HDMI Cable or Composite Cable
USB Charger
SD Card
SD card reader or laptop with SD card slot
USB Keyboard and Mouse
Ethernet Cable
USB WiFi Dongle (optional)
Smart Phone (optional)

Since a TV forms an integral part of any Media Centre, you are expected to have this. If you have both HDMI input and Composite input in your TV, it is better to use HDMI as it will give you better quality when playing Full HD Movies. Depending upon the input, you will need cables for it. If you are using an HDMI output, use a good quality cable as some people have experienced problems with low quality cables. If you are using a Composite out, you will require just the Video out cable as sound will work via the Audio jack and your TV should support sound input via the Audio jack. For powering the Pi, a standard USB charger is sufficient and you can also power it via other devices like a computer’s USB Port or a DVD Player’s USB port but just ensure that it is getting 5V input. I am using the USB port of my Satellite TV receiver. As far as the SD card is concerned, we do not need higher capacity unless you intend to store media content on it. A 4GB card should suffice for our requirement but you have to ensure that you take a card which is Class 10 UHS. Read/Write speed of the card matters a lot as you will be running the Operating System off it. I had used my Digital Cameras SD card but it was way too slow as compared to an SD card which I bought specifically for this purpose. You might or might not require a Keyboard mouse depending upon the usage. We need an Ethernet cable as the base files for XBMC will be downloaded off the Internet. If there is no Ethernet connectivity near the TV, you can use a USB WiFi dongle for connecting wirelessly. For compatible peripherals, refer to the site http://elinux.org/RPi_VerifiedPeripherals. In order to control the XBMC interface, you require either a Keyboard mouse or a Smart Phone with XBMC Remote App. You can also control it via web interface from any of your computer which is connected to the same network.

Setting up Raspbmc

The first thing we must do is prepare the SD card with the base operating system. Go to http://www.raspbmc.com/download/ and download the setup based on the Operating system you have (This is the OS of the computer on which you either have an SD card reader or SD card slot). Insert the SD card into your computer and it should be detected by your operating system. Run the Setup software and it should detect the SD card. The setup will wipe the SD card, so be sure to backup anything important you have on the card. Once you run the setup, the base operating system will be installed on the SD card. Remove the SD card and insert it in the slot of the Raspberry Pi.

Case 1 No Internet connectivity via Ethernet near your TV

If you have no Internet connectivity via Ethernet near your TV then you can connect your Raspberry Pi directly to one of the free ports on your Home broadband router via Ethernet and leave it unconnected to the TV. Sure, you will not be able to see what is going on but there is no need to see anything. Power On the Raspberry Pi and you should see the Red LED light come up followed by green ACT light which should flicker. In some time, the other 3 lights which are meant for Ethernet should come up indicating that the Raspberry Pi has taken an ip address over DHCP and it is connecting to the Internet to get the necessary files. You should wait for an hour to let the Raspberry Pi set up as you do not want to interfere with the set up . If you interrupt the setup, then it will start from the beginning. If you are not that patient then you can go to your broadband router and see what ip address the Raspberry Pi got from DHCP. This way you can access the web interface of the XBMC to confirm that the installation is done. If possible, shutdown the Raspberry Pi via the web interface and disconnect it and then connect it to the TV. Connect a USB WiFi dongle to it and boot the Raspberry Pi. Head to the Raspberry Pi settings in XBMC. Here you will have the option to switch the connectivity from wired to wireless. Enter the SSID of your home network, the password and password type. It will be preferable to use Keyboard but the same can be achieved via Web interface or via XBMC Remote, it will be a hassle though. Save it and it should take an ip address via Wireless.

Case 2 Internet connectivity via Ethernet cable available near TV

Connect the Raspberry Pi to the TV via Component cable or HDMI cable and the Ethernet cable to the Ethernet port. Power On the device and it should go through the setup. You will see several files being downloaded off the Internet. After the set up, the system will reboot and boot into XBMC. As you are already on Ethernet, you are good to go. It is preferable to use Ethernet cable for connectivity to the Raspbmc as it is more stable and faster.

Setting up TV if there is no Display

There will be cases where you might not get display on TV via the HDMI input. This could be because your Raspberry Pi is not able to negotiate the Display settings with the TV. You will have to fiddle with the settings on the SD card to make it work. There are 2 ways you can do it.

Using Composite Output

Connect the raspberry Pi to the TV via composite cable and power On your Pi. You should get a display on the TV (remember to change input on TV to Analog). Once it boots into the XBMC, go to shutdown and click on exit. As soon as you click exit, press “Esc” key which will take you to the terminal. Login using username as pi and password as raspberry. It is possible that it will ask you to set locales. Set the locales of the language or languages you will use. Do not select all as it will take lots of time and also because you do not require all languages. After you get the terminal, type the command /opt/vc/bin/tvservice -d edid.dat. This will communicate with the TV and check all the resolutions which the TV supports. Run the command /opt/vc/bin/edidparser edid.dat and it will show you all the resolution which the TV supports and which are the best ones. The one which is at the end should be the best value for your TV (There will be a number between 1 and 59 in brackets). Also, remember to take just the CEA Value and not DMT as DMT is for monitors and is without audio. If you are comfortable with Linux, go to /boot/config.txt and add the following lines. If not, use sd card in Windows and add the following lines.

hdmi_mode=                                   (You have to enter the value you noted a while ago)

After putting the first line, the output will be forced to HDMI output, there will be no composite output. Group 1 selects CEA which is for HDTVs. Third line is for the best resolution supported by the TV. Every number represents a resolution and frequency set.
Save the file and re insert it in the Raspberry Pi and you should get an HDMI output. In worse case scenario, instead of the above lines, add hdmi_safe=1 and you should get an output for you to troubleshoot further.

Using HDMI Output

If you do not have a composite cable, you cannot get a display at all. In this case, remove the SD Card from the raspberry Pi and insert it in the card reader and add the following line to the config.txt. This will start the Raspberry Pi with the least setting at which HDMI will work. This should give you an HDMI output. Now follow the same procedure as above


Basic settings on XBMC

There are many settings which needs to be set to ensure that all features work. Go to System settings and click on services. Here you will see the options for upnp settings. If you want to enable DLNA features like playing content off network drives, computers or Smart phones, check all the settings here. The web server should be on by default but if you want to change the port number, you can do it from web settings. Also, select both the options here. If you have any Apple product which supports Airplay, go to Airplay and enable it. If you want to play content off shared folders in your home network, go to SMB and set your work group. If your work group is “workgroup” (which most likely it would be) then don’t change anything here. There is a possibility that your XBMC screen will be going off the TV, to rectify this, go to System settings and click on Video Calibration and adjust the screen width and height.

Setting up XBMC as per your preference

I will cover the basics which I think most people would use.



Youtube has become a very common source for entertainment and it justifies its presence in the list. You can watch from select channels, search for videos, etc. In order to enable Youtube Add on, go to Video then Video Add ons and in the long list of Add ons available, enable Youtube and install it. Now you will see it in the Video Add ons list.


Netflix and Hulu have been big hits in the US but I did not install it as it is not available in other countries.

DLNA Via Network drive


You can access all your Media content from Network drives, Computers and Smart phones without even enabling file sharing. For example, if I want to see Movies from my Network Drive, I would go to Videos and click on Add files. Here I will have the option to browse for locations. Select upnp and it should detect your Network drive. Select it and click OK. Add the location and now it should be seen in the Videos list. It is better to make it as favourite as it will be easy to access it.

XBMC as DLNA Renderer

If you have a Smart Phone which has built in DLNA then you can Throw content from it to the XBMC. For example, I can show images, videos, etc present on my Smart Phone on the TV just by selecting it and pressing Throw. It will show you Rasbmc in the list, select it and the picture will be seen on the TV. I have tried it with Sony Xperia Z and Samsung Galaxy Note 2 as these have built in DLNA. If your Smart Phone does not have Built in DLNA then use an App called Skifta which does this job very good. The following images show Throw working for Photos, Videos and Music.


Shared folders


If your Content is on remote shared folders, go to Video and Add files. Here you can browse for SMB locations and see your shared folders. Select it and click OK. As before, make it as Favourite.

USB Drive


If you have a USB drive or a USB Hard drive having Media content on it, you can connect it to the USB port of the Raspberry Pi and it should show at the Video, Music or Picture section of the XBMC.

Send Youtube and Dailymotion video to TV

Play to XBMC

I am a very heavy user of youtube and it is bothersome to go to XBMC and type via the on screen keyboard to search for a video as I do not have a keyboard attached. I use a chrome extension called “Play to XBMC” available in Chrome store. What this does is transfer the URL of the video you are playing in youtube on your Laptop in Chrome browser to XBMC which will play it on TV. It also works with Dailymotion. If you are interested in a particular site then you will have try it because it is not compatible with all online videos. You will have to once enter the ip address of the Raspberry Pi into the extension and port number on which you access your XBMC. When the video is playing on youtube on your laptop, click on the icon and it will give you an option to play now or queue.

Ipad and Iphone

youtube ipad xbmc ipad xbmc

XBMC has Airplay capabilities which make it end host for Ipads and Iphones. You can send video from your I devices to TV by selecting the Airplay target as XBMC. The Youtube App for Ipad and Iphone also has Airplay capabilities which means you can send Youtube videos to the TV from the Ipad and Iphone. The XBMC does not support Airplay mirroring capabilities so you cannot mirror your Ipad screen onto the TV.

My special thanks to q8geeks.org and guustore.com for stocking the Raspberry Pi without which this blog would not have been possible.

I hope my post has been helpful in your life but the only guide which can help you in the hereafter is the Qur’an. You can download the English translation of the Qur’an here.

2 thoughts on “Raspberry Pi as Smart TV upgrader

    • I installed it after your comment and it is way better than XBMC official App. I like the touchpad interface for controlling as you don’t have to be looking at the phone for controlling.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.