How to fix a broken screen on a Nexus 4

Posted in Gadgets, Howto, Tech on June 24th, 2014 by Andy
Broken glass

Not really what you want to see…

A couple of weeks ago I dropped my Nexus 4 and cracked the screen. The touchscreen was still working ok, but I went ahead and replaced the screen anyway. Here’s how…

On the Nexus 4 the screen is bonded to the touchscreen digitiser behind it, so unless you want some major hassle it’s easiest to just replace the screen and digitiser as one unit. You can pick up kits on Ebay to do this, mine cost about £45 and included screen, digitiser, tools and the frame (which was nice, as my screen frame was getting a bit worn).

I followed this video. The only things I would point out are that it’s easier to remove the SIM card holder first. Doing this makes it easier to pry the back shell off. If you’re replacing the whole screen unit you also don’t need to worry about heat the screen and seperating the components. Don’t forget to transfer over all the fiddly bits like volume buttons and the headphone jack from the old frame to the new one.

It’s not at all hard to do, with the right tools it’s just a matter of working carefully and methodically. My phone is good as new.

Tags: , , , , ,

How to replace your Sky fibre router

Posted in Computers, Howto, Tech on May 4th, 2014 by Andy
A person having handcuffs put on them

Not keen on paying Sky to do this to your connection?

Whatever your reasons are for wanting to replace your Sky fibre router (and there are a few) the common denominator is that Sky don’t make it easy. These instructions will allow you to connect to your Sky fibre connection using your own router. The model I’m demonstrating is the Asus RT-N66U.

The legal bit

  • You can read Sky Fibre Broadband’s T&Cs here.
  • Your old Sky fibre router is your property, but the software on it belongs to Sky. You’re not allowed to flash the firmware, and selling it could be dubious. Best hang on to it for as long as you’re a customer.
  • If you need to speak to Sky customer services the easiest thing to do would be plug your Sky router back in and pretend to be just like the rest of their customers. They’ll only support the hardware they’ve supplied.

I’m keen! But how?

  1. Obtain your Sky username and password by doing a little sniffing around your router.
  2. Unplug your Sky router and hide it in the back of a dark cupboard.
  3. Get a new router and flash the firmware on it to a Sky-compatible version.
  4. Put your Sky username into the new router and connect.
  5. Win!

Getting your Sky username and password

As you’re no doubt aware, you’re not told what the Sky username and password you use to connect to their network is. But it is tucked away in the innards of your Sky router, and the router does broadcast them when it connects, so if we watch the output from the router we can deduce what they are. I’m assuming you have the standard white Sky fibre router, which looks like this:

The white Sky fibre router

Essentially you need to install software called Wireshark and use it to snoop in on the packets the Sky fibre router broadcasts when it starts up. Full instructions for that are available here:

How to get the Sky Username and Password for the Sky Hub SR101

Set up your new router

I can personally recommend the Asus RT-N66U. It’s not cheap, but it does pack a lot of cool features. You can get refurbed ones for about £70-80 if you keep a lookout. I got mine because I wanted to do things like use OpenDNS to filter content on my network (I’ve got kids and want finer-grained control than the blunt tool of the ISP filters) and run a VPN so I can access my network when out and about. It’s also fast (gigabit ethernet and 5GHz wifi-n) and stable.

To set it up for Sky you’ll need to install a slightly modified firmware. Merlin’s custom firmware for the Asus RT-N66U router is a minimally modified version of the standard firmware. All the changes Merlin has made are open source, if you’re paranoid you can read the source code. Instructions are on Merlin’s site; it’s really not hard and there’s apparently no risk of bricking your router.

Once you’ve got the new firmware installed go to the router’s admin page (which will be at something like in your browser) go to the “WAN” section and enter your Sky username and password into the Special Requirement from ISP > Manual client ID (for some ISPs). Here’s mine:



Note the single quotes, IIRC they are required, and don’t forget the | between @skydsl and the password. You may need to reboot the router and/or give it a bit before it connects, but it will. Enjoy your new router on Sky fibre!


Tags: , , , , , ,

How to make a Raspberry Pi media centre

Posted in Computers, Gadgets, Howto, Linux, Tech on August 21st, 2013 by Andy
A man wearing a t-shirt printed with "couch potato" and juggling several remotes.

We’re doing important stuff here.

I built a media centre PC a few years back and I’ve been happy with it ever since. It’s been running XBMC, which is an awesome free media centre package. But I reckon it’s time to get some Raspberry Pi in my front room.

Why Raspberry Pi?

  • It’s cheap!
  • It’s fanless (ie: silent)
  • It can push out full-HD video
  • It’s got HDMI (including sound and CEC) so only needs one connection to my TV.
  • It’s very low-power so can run constantly. So no waiting for it to boot up.
  • Customised XBMC builds are available for it, and are well supported.
  • I keep all my media on my network, so my media centre box doesn’t need any storage
  • It’s so small I can just velcro it to the back of the TV, removing a whole box from my TV stand.

How much will it cost?

  1. Raspberry Pi Model B: £32
  2. Plastic Case: £5ish

Which is less than the parts of my old machine are worth on Ebay. Ka-ching!

You’ll also need a power supply that can put out 5V on a micro-USB (I’m using a Kindle charger) and an SD Card to install the OS onto. I had both of those knocking about, which saves money. I also plugged my old media centre’s wireless keyboard into the Raspberry Pi’s USB port, just in case. In practice we can control XBMC with a tablet or smartphone over our home network, but a keyboard and trackpad can be handy during setup. You could ditch it after that and save a bit of power. There’s always SSH from another machine if you need to do anything fiddly.

Enough waffle. How do we do it?

Pretty simple, plug your SD card into a computer (one running Linux is easiest IMO), and download Raspbmc. Raspbmc is a ready-rolled bundle containing a very minimal Linux operating system and XBMC. Once you’ve downloaded the archive, extract it and run the installer script within as root. Full instructions for your operating system are here. Other similar systems such as OpenELEC are available, but I found OpenELEC to be a bit unstable. YMMV, as lots of folks highly recommend OpenELEC.

Then just plug the prepared SD card into your Raspberry Pi and power it up. Simple.

What’s good, what’s bad?


  • XBMC for the Raspberry Pi is pretty much identical to the PC version. It’s slick and easy to use.
  • HD video playback is perfect, right up to 1080p.
  • Navigating menus in XBMC is still pretty smooth, despite the incredibly puny hardware.
  • The system updates itself. All you’ll have to do is reboot occasionally.
  • The XBMC remote app for Android allows you to browse and control all your media files.


  • The RPi likes to fight with my Samsung Smart TV. I don’t know whether it’s the way Samsung have implemented CEC (aka Anynet+) or the way the RPi does, but I found it far easier to just turn off CEC control in my TV’s settings. After that everything worked perfectly.
  • You can’t power off the RPi with the XBMC remote (this is a hardware limitation in ARM). The easiest thing to do is just leave it running constantly, which is mildly wasteful, but only to the tune of about 3W (that’s about 26kWh per year).




Tags: , , , , , , ,

How to control indoor air quality

Posted in Green, Howto on May 25th, 2013 by Andy

I recently blogged about how I solved an indoor air quality problem in my house by fitting a single room MVHR unit, but thought it might be useful to look into the different ways to tackle this common problem.

A family seated at the dinner table wearing gas masks

There must be a better way

What causes mould, condensation and humidity indoors?

The amount of moisture that the air can hold varies with temperature. Warm air can hold more water than cold air. This is known as the Relative Humidity. An RH of 80% means that the air contains 80% of the maximum for that temperature. Cooling the air would cause the RH to go up, until at 100% the air could no longer contain that water, and it would condense out. So we need to avoid very moist air from touching anything cold and causing condensation.

The main sources of moisture in your home are wet rooms (ie: showers), cooking, and the presence of people. These all release moisture which if not ventilated can build up. Besides humidity the other problems for indoor air quality include CO2, volatile gases, radon, outside pollutants, etc. However monitoring humidity is cheap and easy, so can serve as a useful proxy for indoor air quality in general.

How can we tackle a dampness problem?

The first thing to do is buy a cheap humidity monitor and see what your RH is. It’s very difficult to tell without one, as people are pretty insensitive to humidity. If you’re seeing above about 70% RH in winter, you should take some action.

Eliminate sources of moisture


This means doing simple things like putting lids on pots on the stove, or opening the windows while showering (assuming it’s warm enough!).

  • Pros: Simple, costs nothing
  • Cons: Limited effectiveness, especially in winter.

Mechanical Extract Ventilation (MEV)

This includes simple extractor fans in wet places like the bathroom or kitchen. These vary widely in price, with the more effective humidistat controlled versions costing several times that of the cheapest. The range of fitting options are wide, you can fit them through walls or windows or you can mount them in the ceiling and run a duct through your loft to the eaves.

The main drawback is that by simply chucking all your nice warm internal air out they create negative pressure which sucks cold outside air  in elsewhere. So while your indoor air quality will improve, your house will be colder. At current energy prices it is still cheaper to burn more fuel to replace the lost heat than it is to pay for a more expensive MVHR option (see below), but there is the comfort and carbon footprint angle to consider. Most extractor fans are also very draughty when not running, although ones with shutters are available.

  • Pros: Wide range available, can be very cheap.
  • Cons: Substantial heat loss

Positive Input Ventilation (PIV)


Essentially the opposite of MEV, PIV continually forces fresh air into the house, creating a slight positive pressure within. That air needs to have a defined exit path, so you’ll need continually open airbricks, trickle vents or MEV as well.

PIV units are often mounted in the loft where they draw air that is not quite as cold as external air, but if you’ve insulated your loft as well as you should have the difference will be pretty minimal. Effectively the have the same drawback as MEV. Since they run continuously the temperature swings will be less uncomfortable, but overall your heating bills will be higher. Some are available with heating elements to warm incoming air, but since this is straight resistive heating it’s a very expensive and dirty way to heat your home.

  • Pros: Effective, and don’t cause sudden temperature drops.
  • Cons: Same heat loss as MEV, or very expensive if pre-heating the air supply.



Dehumidifiers can get the moisture out of the air without venting it to the outside, and have the bonus that the dried air releases some heat, and is easier to heat than moist air. This would seem like a good option for a green home, if not for one major risk.

Excess humidity means that the home is not well ventilated enough. Besides moisture other pollutants such as CO2 can build up. While a dehumidifier can remove the moisture it doesn’t remove anything else, and excessive CO2 levels indoors can cause fatigue, headaches, etc. I would advise people to use dehumidifiers sparingly, and only to deal with point sources of humidity such as drying clothes indoors. Don’t leave them running continuously unless you are also monitoring CO2 levels. Unfortunately CO2 monitors can be quite expensive.

The better solution IMO is to ventilate, not dehumidify.

  • Pros: Tackles the problem directly
  • Cons: Not particularly cheap, risks masking air quality problems.

Insulate cold spots


Condensation will only form when air is allowed to cool so much that the water condenses. By eliminating cold spots you prevent this dampness from forming. Old windows and doors can be replaced or secondary glazing fitted, air leaks can be plugged, and cold spots on walls can be insulated (watch out for voids in cavity insulation, or bits that people forget to insulate like dormer windows and the ceiling of bay windows).

  • Pros: Often an easy DIY job, reduces fuel bills.
  • Cons: Not always easy to do, cures condensation but doesn’t actually improve air quality.

Whole house MVHR (Mechanical Ventilation with Heat Recovery)


This is the gold-standard solution. Air is extracted through ducts, passed over a heat exchanger and vented. Fresh air is drawn in and picks up heat from the heat exchanger to supply warmed air.

Generally it is impractical to retrofit a whole-house MVHR unless you’re doing a major refurb, due to the need to run ducts. MVHR also requires a high standard of air tightness in the house, which has to be designed into the structure of the building. MVHR is popular in high-tech Passivhaus eco-homes, but is very rare otherwise due to the four-figure pricetag.

  • Pros: Effective, quiet, comfortable, green.
  • Cons: Expensive, requires highly air tight house, requires duct runs.

Single room MVHR


This is a hybrid of conventional MEV and MVHR. A continuously running fan is fitted through the wall of wet rooms such as the kitchen and bathroom, and includes a heat exchanger to warm the supply air. Often an old bathroom extractor fan can be directly replaced with a single room MVHR, making them ideal for retrofit.

In my case I’ve found a single MVHR in the bathroom has been sufficient to control humidity for my whole house.

  • Pros: Effective, retrofittable, reduces heat loss.
  • Cons: More expensive than MEV while doing basically the same job.
Tags: , ,

How to Track Your Home Energy Use

Posted in Green, Howto, Websites on November 24th, 2011 by Andy

First of all, I admit it: data is geeky. But it can also save you a lot of money and reduce your carbon footprint.

As part of my drive to improve the energy efficiency of my home I’ve started tracking my energy usage through the site iMeasure. It’s a very handy site and free to use, plug your power and gas meter readings into it every so often and it’ll generate a load of stats about your usage.

After only a few readings it will have enough data to forecast your usage for the year, but by far the most useful trick it pulls is correlating your usage against data from the closest weather station. The point of this is that the amount of energy you’re using for heating is only really relevant if it’s compared to how cold it is.

A chart showing energy use against degree days

This iMeasure chart shows my actual gas usage at various temperatures. The blue regression line shows how efficient the heating system is. A more efficient system will have a shallower slope

It’ll also tell you how much CO2 you’re emitting through your energy use, and what your costs are.

Where the site really shines is if you’re making changes to improve your efficiency. There are ways to predict the effect of most measures, but there’s nothing better than seeing the change reflected in your actual usage.

Tags: , ,

How to upgrade the wifi on your Eee PC

Posted in Computers, Gadgets, Howto, Tech on September 4th, 2011 by Andy
Two giant clusters of antennas poking above some trees

Here's one I upgraded earlier

Wifi comes in different speeds. The latest and fastest is 802.11n, or wifi-n. It’s pretty quick, but what if your Eee PC is an older model that only has wifi-g? Upgrading is actually really easy, and besides more speed should give you better range.

You’ll need a new wifi-n mini-PCI Express card, I used an Intel 4695 AGN because Intel are really widely supported. You can pick them up for tuppence on Ebay. You’ll also need a third antenna, which you can get here.

  • Remove the battery and pop the bottom cover off your machine
  • Disconnect the antennas, remove the two screws and remove the old wifi card.
  • Route your new third antenna along the front edge of the inside of the case. The orientation of the antenna is important, and luckily there’s plenty of room for it if you run it under the RAM stick.
  • Fit the new card and attach the antennas (the new one goes on post #3)
  • Power up and enjoy.

I’m running Ubuntu, so it all worked as soon as I switched on. If you’re on Windows you might need to download some drivers from Intel and do the little Windows next > next > next > reboot dance. If you do have any problems booting try clearing the CMOS (remove the battery, remove the RAM and short out the two copper patches underneath it).

Tags: , , , ,

How to combine Facebook with Google+

Posted in Howto, Websites on September 2nd, 2011 by Andy
A combine harvester cutting a field of wheat

Combining stuff is cool

There’s a lot to like about Google+, but if you’ve spent a lot of time on Facebook it’s a pain to change networks. So it’s nice to know you can mash them both together.

You’ll need to install the Start Google Plus extension:

Chrome: SGPlus

Firefox: Start Google Plus

This not only allows you to post to both networks simultaneously, but will squeeze all your FB content into your G+ page. There are some other extensions that will add Facebook as a separate tab, but this one can seamlessly weave both sites together. Nice.

Tags: , ,

How to get your Sky broadband username and password

Posted in Computers, Gadgets, Howto, Tech on February 11th, 2011 by Andy
A padlocked door

Just say no to pointlessly locked technology

Sky broadband is a pretty attractive package if you already subscribe to their TV, but it does have one annoying snag. Sky insist that you connect using the router they provide, and enforce this by locking the box down with custom firmware that obscures your actual username and password. This means you can’t connect using any of your own hardware.

While this might sound great if you’re a Sky first line support monkey, it’s a pain for the customer.

Sky have used several different boxes over the years, and cracks for all of them have been published, which is a good enough reason to think twice about using the hardware they supply.

Get the tools:

If you have a Netgear or Sagem router:

If you have the new D-Link router:

Note that although the T&Cs say that the router Sky sends you does become your property, you should keep hold of it, as Sky are unlikely to provide tech support to you otherwise.

Tags: , ,

How to create searchable PDFs for your ebook reader using Ubuntu

Posted in Computers, Howto, Ubuntu on December 12th, 2010 by Andy

As the format-wars in the ebook world rage on, us users are left with one format that is universally useful: PDF. The trouble with PDFs is that you generally can’t search the text. I’ve got a whole heap of textbooks i’d like to shove onto my Kindle, and i’d like to be able to search the text.

Luckily for Ubuntu users, there’s a solution. The command-line tool pdfocr uses Optical Character Recognition to scrape the text from the PDF, then add it as a searchable layer over the top.

You’ll need to add the PPA containing the packages:

sudo add-apt-repository ppa:gezakovacs/pdfocr

On Maverick or later you’ll need to download and install a package from the Lucid repos first. Pick the i386 download for 32-bit or the amd64 one for 64-bit. If you’re on Lucid or earlier, ignore this step:

Update your repos:

sudo apt-get update

Install pdfocr:

sudo apt-get install pdfocr


pdfocr -i input.pdf -o output.pdf

On large documents like textbooks this will take a while, and can gobble a fair amount of RAM. Works pretty well though, give it a try.

Tags: , , ,

How to check TRIM is working on your SSD running Linux

Posted in Computers, Howto, Linux on November 18th, 2010 by Andy
A hairy highland cow

Does your drive need a trim?

SSDs really spank traditional disks. But due to a quirk of how they work, they can lose some speed over time. To make sure your disk stays at the same blazing speeds as when you first got it you need to have TRIM enabled. TRIM is a slight optimisation that allows the disk to do some housekeeping behind the scenes.

What you need for TRIM:

  1. An SSD with firmware that supports TRIM
  2. Linux kernel version 2.6.33 or higher. That means Ubuntu 10.10, Fedora 13 or better.
  3. The “discard” option in your /etc/fstab

If you haven’t already done this you can find out how here.

To check that TRIM is working the way it should we’ll create a small file on your SSD, inspect it, then delete it and make sure TRIM has zeroed all the data out.

Open a root terminal, or if on an Ubuntu-based system become root with:

sudo -i

Create a small file in /root (this is all one line):

dd if=/dev/urandom of=tempfile bs=1M count=3

Find the start of the file:

hdparm --fibmap tempfile

Note the address that the file starts at and then inspect that address (if you have more than one disk you should substitute sda for the disk you are checking):

hdparm --read-sector [ADDRESS] /dev/sda

You should see random data. Now delete the file, sync the filesystem, and wait a couple of minutes for the disk to do it’s thing:

rm tempfile && sync && sleep 120

Now let’s inspect that piece of the drive again to make sure the data is gone:

hdparm --read-sector [ADDRESS] /dev/sda

If TRIM is working, you should see all zeros. If you see anything except a sea of zeros then try updating the drive’s firmware. That’s pretty straightforward on recent drives. On Intel SSDs you just burn a small utility to a CD and boot up from it. Make sure you back up your data before you do that, just in case.

Tags: , , ,

Site last updated 7 February 2017