MythPyWii – now on Google Code
Monday, January 4th, 2010Fancy submitting to MythPyWii? Let me know! It’s now on Google Code.
Code, documentation, bugs, bugfixes, etc all welcome!
Benjie Gillam is a founder and director of Brain Bakery Ltd., a London-based technology company. He was brought up in Ringwood, Hampshire, England, UK. He attended Ringwood Infant School, Ringwood Junior School, Ringwood School, and then Ringwood Sixth Form, before going on to attend Southampton University, from where he has just completed his 3 year BSc in Mathematics with Physics. Benjie currently resides in Southampton, Hampshire, England, UK with his beautiful wife, Jemma Gillam. Feel free to visit their joint site Jemjie.com (Jemjie is a simple combination of their names - Jemma and Benjie).
Jabber/XMPP: benjie.gillam [AT] googlemail.com
Name: Benjie Gillam
Fancy submitting to MythPyWii? Let me know! It’s now on Google Code.
Code, documentation, bugs, bugfixes, etc all welcome!
This post is part 2 of a three part series. You may also be interested in:
Part 1: N900: the tale of the indestructible box
Part 3: N900: a phone for hackers? (coming soon…)
After conquering the indestructible box and charging the N900 I decided to have a quick play. I watched the getting started video which I found to be both beautifully smooth, showing off the high definition of the N900 screen immediately, and somewhat slow content-wise.
The N900 is similar in width and height to the iPhone but is much greater in depth at 1.8cm – just a millimetre deeper than the G1. This is not surprising due to it’s hard keyboard and more advanced hardware.
The first thing that struck me about the N900 (other than how high definition the hands were in the famous Nokia splash video!) was how much force it required to press on the screen. The iPhone (my current primary phone because I develop iPhone fitness apps) only requires the lightest of touches; whilst the Android G1 (my wife’s phone) requires a bit more. I later discovered the reason for this heavier interface was probably the stylus (which I discovered accidentally while interrogating the outside of the device), which is great to use – reminds me of my old iPaqs only much much higher resolution and more responsive!
I noticed that every time I touched the screen firmly enough the phone would do a very small vibration in the way of haptic feedback. This would be good if it weren’t for the fact that it does it every time, and not only the times when your touch actually triggers an action (opening a menu, etc) – this is becoming more annoying than useful.
Because of the devices HD screen I found it quite hard to be exact with my touches (my thumbs must be almost 200 pixels wide on that screen!) though the interface deals with this well by using large touch areas. After failing at playing Marbles (a pre-installed game with small touch areas) for a minute or so I quickly learned where the device thought my presses were and the device became even easier to use. (Sure this would have been much easier with a stylus but I hadn’t discovered that yet!)
The web browser is a pleasure to use, though it appears to support in page Flash which I personally hate – especially on a small screen mobile device. I went to YouTube to see how it handles and “very well” was the answer. The device supports the double tap to zoom in to a region of text paradigm of Safari on the iPhone though it obviously lacks the multi-touch pinch and zoom.
Pressing play on a YouTube video, I wished to turn the volume up and so I pressed the volume rocker on the outside of the phone. This surprisingly zoomed the web page (very smoothly!) but not the volume – a useful feature but definitely not what I had expected. I attempted to change the volume using the YouTube Flash control but could not drag the slider up as my fingers were too fat and dragging scrolled the page. (I hadn’t discovered the stylus at this time but have since attempted with they stylus with the same result.) To change the volume I had to click the web page, click the “toggle fullscreen” button at the bottom right, the status icons at the top and then drag the volume slider. Not too hard, but certainly more effort than just using the volume rocker – the video would play on a good few seconds more before you can change the volume and get back to it. Perhaps there’s a better way of doing it, but this is a “first impressions” post so I feel I should stick to first impressions!
One very cool feature of the N900 is how blazingly fast the screen lock/unlock is. There’s a sprung switch on the right side of the phone which when you flick it will lock or unlock the screen seemingly instantly (no slider here!). If you prefer the iPhone style slider then you can press the power button at the top of the phone and use the slider there, though I much prefer the flick button on the side.
I like the stand on the back of the phone – this would be immensely useful when you’re trying to watch a film on the train on the way back from London (rather than constructing a stand with your backpack, wallet and other accessories like I do for my iPhone…). The stand is fairly sturdy and definitely supports the phone well, though it does rock a bit when you use the stylus at the top right of the screen (not really the stands intention to be fair!).
I know virtually nothing about photography, but to me the camera seems to be a decent quality 5MP phone camera with a fairly decent flash. Coming from a 3MP iPhone with no flash the difference is astounding. The N900’s sheer performance is very visible here – as you move the phone around you can clearly see the surroundings – there is no massive blurring like when you wobble the iPhone’s camera. The photos themselves come out quite well, though there is still minor blurring due to handshake – but no where near the magnitude of the blurring on the iPhone. I bet a “bar code scanner” application on the N900 would be far faster and more accurate than any I have used on the iPhone or Android!
Connecting the device to my WiFi network was painless and intuitive. The major widgets (menu button [top left], fullscreen button [bottom right], close button [top right], status tray [top, right of menu button]) are well laid out and application switching (and closing [Symbian: I'm talking to you]!) is simple and intuitive.
Opening applications could do with some work – the menu first opens and shows you 15 icons (standard icons like Contacts, Phone, Web, Email, Conversations), with a More button at the bottom right. Pressing More is how you get to your other apps – games, utilities, etc. Unfortunately these apps appear ordered by the time they were installed and not separated into folders, and there is no obviously intuitive way to organise them. In fact I have yet to find out how to organise them through exploring the device – I will search the internet later.
That’s the end of my first impressions… When I discovered the X Terminal application I got immediately a lot more excited as I am by nature a hacker. Read on…
This post is part 2 of a three part series. You may also be interested in:
Part 1: N900: the tale of the indestructible box
Part 3: N900: a phone for hackers? (coming soon…)
This post is part 1 of a 3 part series. You may also be interested in:
Part 2: N900: first impressions
Part 3: N900: a phone for hackers? (coming soon…)
A week ago I was contacted by Lydia of WOMWorld.com/nokia who asked me if I would be interested in receiving an indestructible box. I was told that she found me via my twitter profile and felt it would appeal to my passions. After confirming the email was not spam I replied, intrigued, “yes please” and sent her my address.
Yesterday it arrived. I opened the door to a delivery man who offered me a large cardboard box. Jof had suggested to me that it would likely be an N900 (which I had heard a little about but had not had time to look into) so I was expecting a small package. Surprised I was when the box the man handed me was so large and heavy – 35×35x35cm and 7.5kg!
I took it indoors and opened it, to find a large package, cold to the touch, wrapped up in brown parcel paper and surrounded by polystyrene balls. Unwrapping this (and making a hell of a mess with the styrofoam balls which attempted to mirror the snow outside onto my living room floor) unveiled a 25×25x25cm black shiny box with a Nokia logo on top, a hinge and a small USB mini-B socket barely visible on one side. It was obvious that the top would open… but how?
I wanted to attempt to hack it right away, but two things stopped me: firstly, I should be working; and secondly the box was wet with condensation from the sudden contrast with the cold outside. I went back to work.
A hour and a half later I got temporarily stumped with a programming problem and decided to attempt to hack the box.
My first step was to see what happened when I plugged it in to the USB. I booted into Ubuntu 9.10, ran dmesg -c to clear all the kernel messages, plugged it in, waited a few seconds, and ran dmesg again to see just the new logs:
[ 314.544034] usb 6-2: new full speed USB device using uhci_hcd and address 2 [ 314.747104] usb 6-2: configuration #1 chosen from 1 choice [ 314.811722] usbcore: registered new interface driver usbserial [ 314.811734] USB Serial support registered for generic [ 314.811764] usbcore: registered new interface driver usbserial_generic [ 314.811766] usbserial: USB Serial Driver core [ 314.823161] USB Serial support registered for FTDI USB Serial Device [ 314.823263] ftdi_sio 6-2:1.0: FTDI USB Serial Device converter detected [ 314.823283] usb 6-2: Detected FT232RL [ 314.823285] usb 6-2: Number of endpoints 2 [ 314.823287] usb 6-2: Endpoint 1 MaxPacketSize 64 [ 314.823289] usb 6-2: Endpoint 2 MaxPacketSize 64 [ 314.823291] usb 6-2: Setting MaxPacketSize 64 [ 314.825064] usb 6-2: FTDI USB Serial Device converter now attached to ttyUSB0 [ 314.825077] usbcore: registered new interface driver ftdi_sio [ 314.825079] ftdi_sio: v1.5.0:USB FTDI Serial Converters Driver
I spotted the /dev/ttyUSB0 and instantly thought “minicom.” It took me a while to refamiliarise myself with the program and get it to connect, but soon I had fiddled with the speed settings (reduced it to just 9600baud from 115200) and was greeted the following output on my screen:
_ _ ___ _ _____ _
| \ | |/ _ \| |/ /_ _| / \
| \| | | | | ' / | | / _ \
| |\ | |_| | . \ | | / ___ \
|_| \_|\___/|_|\_\___/_/ \_\
*******************************
W3lc0m3 t0 n0k14 h4x0rb0x!
*******************************
? - displays help dialog
$-nokia h4x0rb0x->
Unfortunately I could not type into minicom. I experimented with the speed and parity settings some more (as they had helped before) but no use. Finally I disabled hardware flow control and voilà I could type. Then it was simply a case of typing “?” to find out what commands were available:
$-nokia h4x0rb0x-> ? Available commands: ? - prints this help dialog connecting <argument> - opens box $-nokia h4x0rb0x->
And guessing what the argument to the nokia connecting command was…
$-nokia h4x0rb0x-> connecting people Initiation complete. Start Connecting. $-nokia h4x0rb0x->
Hardly a challenge! A nice clichéd progress bar appeared for a few seconds and then *click* the lid popped open a little. I opened it fully and was pleased to see that they had even included dry ice to maximise theatrics, with the N900 packed safely waiting to be admired.
They really put a lot of thought into this! I delved deeper and here are all of my winnings:
That’s: an N900 with accessories plus a butane soldering iron, sports band, cake, and a little fox figurine.
The box itself was powered by a Roboduino Nano (which I intend to repurpose later… not sure what as yet) hooked up to a solenoid:
UPDATE: Techcrunch have a video of the opening – check it out!
Continue reading:
Part 2: N900: first impressions
Part 3: N900: a phone for hackers? (coming soon…)
GymFu (that’s Jof Arnold, Jem Gillam and myself) has received just shy of £100,000 funding from 4iP (an angel/investment arm of Channel 4) to work on a new project improving the health of the nation in bitesize chunks. This is obviously very exciting for us all, but I’m afraid we can’t tell you any more until details are firmed up, though I can tell you that you should see output from this project by the middle of next year. Wish us luck!
Why not read 4iP’s press release and TechCrunch’s take on the funding?

Thanks to Matthew Zimmerman for sending me his modified version of MythPyWii, it now has power-saving – after 35 minutes of inactivity the Wiimote turns off. You can download the latest version, as always, here; or you can get this specific version (v17) here.
I love open source!
I’m working on a new project, I’ve got a 8×8 dual colour dot matrix display (£2.50 delivered from Earthshine Design) and I want to power it from the Arduino. One way of making a chip like that (which has 2×8x8 = 128 LEDs) would be to have a common ground and an additional 128 pins – one for each LED. This, I think you’d agree, would be a nightmare, so instead they’ve basically gone for an 8×16 grid for a total of 24 pins. This raises two main problems:
Point 1 is easily solved – we simply update just one row at a time, letting Persistance Of Vision (POV) do the hard work for us. Point 2 is the subject of this post – multiplexing, combining multiple individual signals into just one signal. I will not be using this dot matrix display in this post, instead I will simply be powering normal LEDs. I wanted to find out if the Arduino is fast enough to multiplex the data through just a few pins in order to power this display. The answer (one of my favourite answers!) is: “Yes, but not without some hacking.” Read on…

If you’ve got a line like this:
LOGGING_FACILITY1( sanityCheck == noErr, @"Problem adding private key, OSStatus == %d.", sanityCheck );
But you don’t know what the OSStatus value means, and you’re devving on iPhone, here’s the answers:
enum { errSecSuccess = 0, /* No error. */ errSecUnimplemented = -4, /* Function or operation not implemented. */ errSecParam = -50, /* One or more parameters passed to a function where not valid. */ errSecAllocate = -108, /* Failed to allocate memory. */ errSecNotAvailable = -25291, /* No keychain is available. You may need to restart your computer. */ errSecDuplicateItem = -25299, /* The specified item already exists in the keychain. */ errSecItemNotFound = -25300, /* The specified item could not be found in the keychain. */ errSecInteractionNotAllowed = -25308, /* User interaction is not allowed. */ errSecDecode = -26275, /* Unable to decode the provided data. */ };
This was taken from /Developer /Platform /iPhoneOS.platform /Developer /SDKs /iPhoneOS3.0.sdk /System /Library /Frameworks /Security.framework /Headers /SecBase.h [remove spaces] (so quite easy to find then… NOT!) because SecCopyErrorMessageString doesn’t work on iPhone OS.
I hope this helps you – if it does, let me know in the comments!
To help you find this in the search engines this might be triggered if you are using SecItemAdd, SecItemCopyMatching or any of the other keychain services in the iPhone SDK. You might be using Apple’s [SecKeyWrapper sharedWrapper] functions too… Anything security related really. Or private key, public key, asymmetric key, signing, blah blah blah.
If your app won’t upload but you’re sure you’ve compiled it and signed it right, the fault might not be yours. For me, it was the built in “Compress [Folder]…” option – the archive produced from this might be missing files. You’re likely to see such errors as:
“The binary you uploaded was invalid. The signature was invalid, or it was not signed with an Apple submission certificate.”
“Icon specified in the info.plist not found under the top level app wrapper”
Seriously, Apple, what the f*ck? Thats 2 hours of my life lost because Apple couldn’t nail the basics: an archive utility. I’m so angry right now.
I was shocked and awed that my wife, Jem, shared porn with me on google reader:
and I suggest you read the post from xkcd, too. In fact, I suggest you read the entirety of xkcd. I coined the verb “to be xkcd’d” which means “when you discover a new web comic and like the latest strips so much that you go back to the very beginning and read every single strip until you catch up to date again so that you can understand all the jokes in the full context of the comic” – quite a necessary abbreviation, I think you’ll agree! With xkcd, the king of xkcding, I was actually xkcd’d twice – first when I first discovered it, and second when I realised about the title text…
And that bring me on to my xkcd reading tip: READ THE CAPTIONS – hover your mouse over the xkcd image and read the title text. Do this on the xkcd website. That Randall is a comedic genius.
Some of the captions are too long for firefox, so I have installed ‘Popup ALT Attribute‘ for Firefox which gives a larger ‘tooltip’ window.
Read on for the strip itself and my recommended webcomics