Raspberry Pi powered TV and dd-wrt router configuration


Yesterday the snow hit so I decided to try to knock off some projects that had been on the back-burner.  Two of these were related to one another, the first being setting up my spare wireless router as a client bridge and the second setting up a Raspberry Pi with raspbmc.

Completing these two projects would allow me to create a Media Center for television and music.

Wireless router – client bridged mode

I had spent several days deciding  whether to use the wireless router I had spare to create a second network at home (not connected to the Internet), or to use it in client bridged mode.

In the end I opted for client bridged mode. The wireless router has a number of Ethernet ports located on it and would be perfect to place next to my TV as this is nowhere near my existing Ethernet switch. With this in place I could then run a short Ethernet cable from my Raspberry Pi into the wireless router and then stream TV over the wireless connection back through the Ethernet connection to the RPi and then over HDMI to the TV.

This image from the dd-wrt website shows an example of a network setup using two wireless routers one in client bridged mode:


Client Bridge example from dd-wrt.com

Setting up the wireless router was fairly straight forward. I used a Cisco Linksys E4200 router and installed the dd-wrt software onto this.

Linksys E4200

Linksys E4200

You can check your wireless router to see if it is supported at the following link:


Once you have found your router download the firmware and follow the instructions on the dd-wrt site. There are a number of warnings on there to help you avoid ‘bricking’ (screwing up the router so it as much use as a brick) your router.

I would recommend following these as it will cause you less pain in the long run.

Once you have the router setup, follow these steps to set up the router in client bridged mode:


If everything goes well you will now have a second wireless router connected to your primary wireless router and can then use it with the Raspberry Pi.


Raspbmc is a version of the Debian Linux distro specially compiled for the Raspberry Pi to turn your Pi into a XBMC media center.

Installing it is fairly straight forward. Format  an SD card and then follow the steps located here depending on what machine you are using to format the card.

Once you have the SD card ready to go you can hook up your RPi to the wireless router, TV and power and get things started.

Raspberry Pi

Raspberry Pi

Note: If you have problems with the HDMI cable not displaying a picture, try the steps at this link:


When the Pi boots up it will run through the Raspbmc installation process.

Raspbmc splash screen after installing

Raspbmc splash screen after installing

Once the installation is complete you will now have the XMBC media center ready to start using.



Accessing the IP# of your Raspberry Pi via a web browser on port 80 will give you access to the ‘remote control’


From here you can navigate through the menus on your TV and access content.

A wide variety of content is available on Raspbmc ranging from BBC iPlayer through to Hulu.



You can find instructions on installing the various TV networks software from the UK, US, Canada, France etc. at these following links:

General plugins:


UK TV specific:


Some content will not work in your area due to restrictions, for example BBC iPlayer TV content is not available outside of an UK IP address range (however radio is).

Tunlr.net seems to be a popular choice for circumnavigating this – Disclaimer: I’m not sure what the legalities of this are so you use these services at your own risk, if you don’t know it is probably best to avoid it.


So there we have it, a simple XMBC media center running on your Raspberry Pi that you can use to stream TV, radio and other media from.

You can read more about XMBC’s features and quick start guide at the following URL:


I have  Gertboard ready to build for this Pi as well, so I will be looking at what I can use this for in my media center.


Raspberry Pi to Arduino shield thermostat – a sneak-peek

Here is a sneak-peek of the Raspberry Pi to Arduino shield based thermostat project I have worked on for the upcoming book.

The prototype you see below is part of a project in one of the chapters:

This uses a relay shield attached to the Raspberry Pi to Arduino shield. The relays are then switched on and off based upon a change in temperature. Connected to the relay shield is a wall powered electric fan.


A quick update

Just a quick post with some updates:

Commercial Home Automation

There are a number of products out in the market I;d like to give a test run and review here. I’ve listed a couple of these below. Unlike X10 these devices use web based techology.


Lowes have launched their own home automation tools known as Iris. You can see a variety of the devices here:



Like Lowes Belkin aso have their own home automation devices under the WeMo brand:



I’ve been experimenting with dd-wrt using a spare wireless router I have at home. It’s a great piece of software and allows you to turn a second wireless router into a bridge-relay for your existing network. I think I will actually end up using it for creating a second more secure network for running my home automation devices over. I can then use the existing wi-fi network for regular surfing, netflix etc.



So after a long wait the Gertboard has finally arrived. It is in kit-form so I’ll be spending some time soldering the components together. Keep your eyes peeled for further updates on this!


Gertboard Kit

Gertboard Kit


Raspberry Pi to Arduino connection bridge experiment – DC Motor

I’ve been doing some experimentation with the Cooking Hack Raspberry Pi to Arduino connection bridge for the upcoming book.

Here is a quick sneak-peak of an experiment I conducted when testing out some of the hardware.

The video below shows a combination of a Raspberry Pi, the Cooking Hacks shield, an Arduino motor-shield  a small DC motor and a circuit consisting of a resistor and photo-resistor.

The software in the background is processing the feedback from the photo-resistor and deciding when to turn the motor on and off, and in which direction. This software also generates the necessary PWM for the motor.

In the video I cover the photo-resistor to turn the motor clockwise and then uncover it to turn it counter-clockwise.


P.S Thanks to Andy C on the Cooking Hacks forum for pointing me in the direction of using C threads for PWM.