The incredible Raspberry Pi

For anyone who doesn’t already know, the Raspberry Pi is a tiny computer based on a cellphone chip, which runs Linux (amongst other things) and costs less than $50. I’ve had 2 for a few months, bought out of interest and novelty, I didn’t really have a clear idea what I’d do with them.

Recently however, I’ve been working to turn one into a music player of sorts and the experience has been a rewarding one.

The OS I’ve chosen is Raspbian, a Debian variant provided by the Raspberry Pi creators and the community. It’s lightweight, provides a desktop if you need it (I don’t in this case) and has the full power of Debian and all its packages behind it.

One of those packages is the remarkable “mpd” or Music Player Daemon. This little gem is a jukebox in a box. Easily scriptable from the command line and with just about every feature you could want (it’s got everything I’ve needed so far, including shuffle, repeat, playlists, volume controls and even track crossfading!)

Pair that with Django to whip up a quick web-based interface and viola! you’ve got a tidy little player.

Admittedly there was some wrangling required to get the sound right, the default drivers are renowned for loud pops between tracks as the audio device is turned off and on, but there are several workarounds posted online and I found one that worked for me. Now the sound quality is perfectly acceptable.

Todays trick was getting a USB WiFi adapter working and I was a little dubious since the last time I tried to get wireless working without a GUI a few years ago was fraught with issues, wrangling wpa_supplicant and iwconfig. Seems things have come along though and only 2 configuration lines in /etc/network/interfaces to define the SSID and passphrase and POW! Connected.

This little thing continues to surprise and delight me.

Another possible project I have in mind is a web terminal/kiosk for my sisters business. She has a new online timekeeping system and she wants web terminals near the equipment but was concerned at the cost of buying several PC’s, even super cheap ones. I pointed out that a small screen, plus RPi, plus mouse and keyboard would be under $200, she seemed to like the idea :)

If you’re a tinkerer, I recommend you try one of these out. It’d be a bargain at twice the price.

Luke.

As mentioned in my previous post, here is the completed power meter reader with battery-backed counter.

As mentioned in my previous post, here is the completed power meter reader with battery-backed counter.

Instrumenting the home

I’m nearing completion of stage 3 of my home instrumentation project, and thought it was about time I mentioned it here.

The intention is to be able to tell, from anywhere at any time, the vital statistics of our house, and to be able to look back and see what’s happened in the past.

I’ll be posting some of the code and some how-to type docs in future but for now a description will do.

Keep reading

Merry Christmas

And a Happy New Year to all!

I’ll be hanging around Auckland over the break but will be seeing plenty of family and friends, I hope you do the same.

Don’t drink too much, see you on the other side :D

Luke.

BEHOLD! Kiwicon 6 is nigh

New Zealands best security oriented conference is on again!

On November 17th and 18th Wellington will once again play host to bogans, black hats and the fuzz in a 2 day orgy of hacking, cracking and 0-day. Details are scarce so far, it’s early days yet, but I’ve no doubt it will be another eye opening experience.

Kiwicon banner

This will be my third Kiwicon. Each time it serves to refresh my paranoia, reinforce my strongly held opinions on the security (or lack of it) of the systems we use every day and strengthen my tendency to be bullish about scurity concerns when designing and implementing my own systems.

At Kiwicon 2010 I witnessed the power of one, when a lone hacker outpaced groups of 5 or more in the hacking competition, perched on the arm of someone elses chair with a tiny netbook on his knee.

Kiwicon 2011 scared me off Apple i-devices when it was demonstrated just how easily their “security” could be bypassed, even on the latest version (at the time) of iOS.

Every time Brett Moore speaks I’m amazed by the depth and breadth of the attack surface available to the dark side. Every attempted mitigation made by software and hardware vendors seems to be compromised by, well, compromise. The need to make something backwards compatible is often the downfall of an otherwise elegant and robust solution. Heap randomisation you say? Wow, that would make buffer overflows really hard to exploit, but what’s that? I can turn it off for backwards compatibility? Awwww.

No doubt this year will bring more eye opening tidbits, I look forward to devouring every one. Also the beer.

Hope to see you there!

www.kiwicon.org

This is an initial release, to get something up there (small steps).

Please forgive the utter lack of documentation (it’s self documenting! Yeah, right) I promise to improve this situation as soon as is practical.

For now, know that this is the first iteration of the builder that handles IPv4 and IPv6 simultaneously in each shell snippet (instead of 2 separate snippets as in previous versions). I think it’s pretty slick, your mileage may vary.

Enjoy.

Luke.

The Sauce

Or, in fact, the Source.

I’m no artist, but I do love to create and my chosen medium is code. Being fairly unimaginative I usually rely on real-world requirements to inspire my projects; fixups, glue and gap-fillers have been my calling for my entire career as an engineer.

Over the years I’ve written quite a few bits of code and some deserve to see the light of day. Besides, it’d be rude to call myself an Open Source expert and not release the source to my own work.

To that end I plan to introduce a new section to the OSNZ website, publishing as many of my little (and not-so-little) code snippets as is practical. Hopefully someone will find them useful.

Watch this space.

Luke.

Exim, my savior.

I’ve come across some really curly mail challenges in my time. The customer wants mail delivered to a user, specified not in the To: field, but in the Exim logosubject line you say? Oh, you want to deliver mail to users authenticated from Active Directory, but there are 3 domains and users might exist in any (and more than) one?

Both of these are problems I’ve encountered in real life, amongst many others, and every time I’m able to lean on Exim, knowing there will be a way.

I am in awe of the power and flexibility of this mailer. There is literally nothing it can’t do. It can do Lookups against almost anything you can think of and can integrate easily with content filtering for antivirus and antispam. You can even extend it with Perl, if you want to get funky.

And what’s even better is that the configuration is so easy to use and understand. Everything is in there, not just changes to defaults as is the case with most software. It’s more like a delivery instruction manual than a configuration. This might scare people off initially, it’s a big file, but the beauty of it is you can see exactly what’s going to happen at every stage of a messages delivery cycle. And change it if you want to.

It helps of course that Exim on Debian is extremely well packaged. The configs are well commented and easy to extend. However Exim can be just as easy and powerful on other platforms, with a little extra effort.

If you’re still struglling away with Postfix or, heaven forbid, Sendmail, join the 21st century and try out Exim. You won’t regret it.

Luke.

New Business Cards

New Business Cards