Writings on various topics (mostly technical) from Oliver Hookins and Angela Collins. We have lived in Berlin since 2009, have two kids, and have far too little time to really justify having a blog.
Way back in 2010 I wrote about my acquisition of a Zotac HD-ID11 ZBox "home theatre PC". Since then it has served me fairly well, although I suspect I ran it too hot for the last year or two. After several Ubuntu and XBMC upgrades I noticed that it tended to idle pretty hot despite not really doing much most of the time, and was able to ignore this until it started restarting itself frequently, presumably due to thermal cutoffs. I ordered some replacement heatsink thermal pads and replaced the dried out old ones on the CPU and GPU, and was able to coax it back to life.
Until this week, unfortunately, when it stopped responding altogether and eventually would just sit there with the fan running at full speed and the power light staying red (which usually means it is powered off). So, good night my sweet prince. It's an annoyance for several reasons:
But I digress... I've already had a Raspberry Pi for some time now and planned to use it to experiment with OpenCV with a small webcam but put that activity on the backburner and never got back to it. While I'm slightly concerned about its relatively low clock speed and on-board RAM (I've got the 512MB "B" version), it is still the easiest and cheapest replacement on hard for the ZBox. What was missing was a plastic case, wireless adaptor since my cable modem and wireless router are now on the other side of the living room, and a USB hub since I've read that the Pi doesn't deliver enough power on the USB ports, leading to problems with wifi adaptors. I purchased these items:
At about €24 total, that was much cheaper than replacing the ZBox with another current-generation HTPC, which typically would set me back €200-300. I of course checked beforehand on the Raspberry Pi forums that the wifi adaptor would work, so I was reasonably confident that I had a winning combination. I received the boxes yesterday and got to setting up all the new toys, expecting it (as many websites had mentioned) to all work flawlessly from the start.
Not so! Despite recognising the wifi adaptor and loading the correct kernel module, it just wouldn't work. I fiddled with wpa_supplicant as we all do when first trying to figure out what is going wrong, but to no avail. I found this blog post from some other enterprising person who had managed to get it working - and all without much additional effort, and still wasn't able to replicate the conditions for success. Eventually I downloaded images for OpenElec, Raspbian and the latest Raspbmc (I had been running an older image of Raspbmc from much earlier in the year) and tried them all without them working.
It was actually only when I read through the above blog post again that I realised something - the wifi adaptor actually lights up when it is working! I have the Pi, drive array, USB Hub and a bunch of cables almost entirely hidden away under the TV on a shelf, so I couldn't easily see any lights down there. Arbitrarily, I decided to plug the adaptor directly into the Pi as it is in the picture on that blog post. It worked! That was the lightbulb moment - and brought back all the memories of trying to fix hardware problems earlier in my life.
After that it was pretty easy to identify the problem - the wifi adaptor apparently doesn't like to work when plugged in the D-Link hub next to another device. The hub has 4 downstream ports (one of which is a "fast charge" port - presumably it outputs more than 500mA if necessary) - two on one side of the square and two on the neighbouring side. One other side is blank and the rear has the upstream port and power socket. If the wifi adaptor is on one side with another device - either my external drive array or the wireless keyboard transceiver - it won't work. If it is on one side by itself, it works fine. The main irritation is that when it doesn't work it still appears to the system and does everything but light up and send/receive wifi signals. It turns out that this makes it very hard to figure out what is going wrong!
Moral of the story is: when you have hardware problems, even in 2014 it helps to go back to first principles of hardware diagnosis. Isolate the new hardware, try to replicate known working conditions with no additional unknowns, then gradually add your own peculiarities back into the equation until you have identified the problem.
The next issue to tackle will be how to run all of those additional services in only ~300MB of the remaining RAM on this little computer.