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!
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 – 35x35x35cm 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 25x25x25cm 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…)

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 2x8x8 = 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…
Before we start, just to be clear – this is not for crackers (people who illegally break in to computer systems) but for hackers (people who modify the software or hardware of their computer system including building, rebuilding, modifying and creating software and electronic hardware either to make it better, faster, give added features or to make it do something it was never intended to do).
UPDATE: we have a google group: http://groups.google.com/group/southackton
I’m intending on setting up a “Hackerspace” in Southampton targeted around software programming (for fun) and hardware hacking (e.g. robotics). I anticipate that people would attend the hackerspace either with their own personal projects (such as controlling their television using a Wii remote), or looking to join in on a cool project. The idea is that we can all share knowledge and help each other out in a fun and innovative environment.
I am provisionally calling this project Southackton, though I expect (hope!) a better name will surface once more people are interested! If you or anyone you know is interested, please contact me via email (my name at benjiegillam.com) or by leaving a comment on this post.
The ultimate goal would be having an “office” somewhere in Southampton where members can drop in any time (within reason) and get to work on their project/just hang out with fellow hackers. If you work from home you could even work form the Hackerspace directly – it wouldn’t be so lonely! I am, however, expecting that we would run it as a “club” until we have enough interested members to make it feasible. Whether this club be weekly, fortnightly, monthly, or bi-monthly is a matter for interested persons to discuss – get in contact and let me know what you think!
As you may know if you read this blog (doubtful!), I am a great fan of open source, and have been a dedicated GNU/Linux user for almost 10 years now, so Linux users would be cool to have as they tend to be interested in tweaking hardware/software, however everyone would be welcome independent of their choice of operating system. Yes, that’s right – even Windows users!
Further, there is no required skill level. I’m happy to have people attend who want to acheive something (e.g. making a webcam recognise who is sat at the PC and change the computers background to a related picture/have their favourite teddy walk towards them) but have no idea how to go about it, so long as they are patient and willing to learn!
I hope you’re interested – let me know!
UPDATE: if you’re interested, sign up to our google group: http://groups.google.com/group/southackton.
I had intended to get fit (and thin) before my wedding last August, however that never happened. And before I knew it it was Christmas, with all that loverly food. I’m not stupid enough to try and diet over the Christmas period! Instead, I thought, what else is the New Year for if not improving ones health?
My business partner Jof and myself had been working on a fitness app for the iPhone, PushupFu, for a couple of months and we finally uploaded it to Apple on 23rd December. In a very generous gesture from Apple, the app was released on 1st January (or 31st December, depending where you live!) – a full week earlier than we were expecting. I find that the app definitely motivates me to do pushups when users challenge me, plus I also intend to complete the training course (should be done by May) – when I can do 100 pushups I will really feel fit! (Currently I’m still only able to do single figures, but I have only just started!)
So, if you feel you need to get a bit more toned this year, why not give it a go by visiting http://www.GymFu.com/ ? At time of writing we have 5 reviews in the App Store, all are 5 stars, so give it a go! Check out our other reviews below:
Under Ubuntu Intrepid Ibex (should also work for Hardy Herron) with pulseaudio.
(Gfx card: ATI HD 4850)
It is a simple fix that took me ages to work out. Basically, PulseAudio does not recognize the graphics card’s sound card. To fix, we simply force it to recognize it, and remove detection of alternatives to make it default. There is almost definitely a better way than removing the alternatives, but *meh* it works for me.
First, work out which device is your correct HDMI device (in this case, 1,3 as it is card 1, output 3):
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC883 Analog [ALC883 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC883 Digital [ALC883 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 3: ATI HDMI [ATI HDMI]
Subdevices: 0/1
Subdevice #0: subdevice #0
Open up /etc/pulse/default.pa in your favourite text editor
Add this line just before all the #load_module lines (around line 32), replacing 1,3 with whatever you found above):
add-autoload-sink output module-alsa-sink device=plughw:1,3 rate=48000 sink_name=output
Comment out the module-hal-detect section (around lines 40-47):
#### Automatically load driver modules depending on the hardware available
#.ifexists module-hal-detect.so
#load-module module-hal-detect
#.else
#### Alternatively use the static hardware detection module (for systems that
#### lack HAL support)
#load-module module-detect
#.endif
Uncomment this line at the bottom of the file:
set-default-sink output
Save and close the file, then log out and back in again (or kilall pulseaudio && pulseaudio) and, hopefully, your sound should work!
Thanks to a heads up from Sam, I have updated the MythPyWii script with better error handling and more informative feedback messages. Hopefully now when you run the script you will know what to do! I’ve also fixed a few minor bugs in the documentation.
As always, you can download the latest version of MythPyWii here.
I should probably make a GUI for MythPyWii at some point… though it seems a little pointless at the moment. I could allow you to change the controls to your liking, I spose…
UPDATE: If you’re getting errors like:
$ myth_py_wii.py
Please open Mythfrontend and then press 1&2 on the wiimote…
Connected to a wiimote
Logged in to MythFrontend
TypeError: wmcb() takes exactly 2 arguments (3 given)
TypeError: wmcb() takes exactly 2 arguments (3 given)
TypeError: wmcb() takes exactly 2 arguments (3 given)
TypeError: wmcb() takes exactly 2 arguments (3 given)
Then you have a more up to date version of cwiid than me. The fix is simple – change line 141:
def wmcb(self, messages):
to:
def wmcb(self, messages, timeIgnore):
Thanks to Mike H for pointing out this issue.
Here’s the short version:
Despite having got up at 3:30am this morning and being extremely tired, it’s been quite a good day. I finished setting up the media centre, hooked it up to the TV and got it working, sound and all. It seems the PC doesn’t run video smoothly at 1080p (not suprisingly, it was bought a good few years ago on a budget, it’s an onboard graphics card too!) – but that’s OK. I dropped it down to ~720p and it seems to run great.
It’s completely diskless, it’s only purpose being to play MythTV videos from my main mythbackend. It might find itself playing some DVDs at some point also, we’ll see.
I installed MythPyWii on it, using my new MythPyWii Install Instructions, which I wrote today and you can find here. (I also made a page detailing the controls, here. Both links can also be found in my sidebar.) Everything went smoothly, so I made the video I had been promising. This is my first time *ever* doing any video editing, and this video was all filmed in one take with no rehersals, so please bear with me! The longer version is better if you need help during the install/etc, and is linked to on the instructions page.
Here goes, I know it’s a bit long… perhaps I will make a scripted version sometime which is shorter:
For anyone wondering, I used “Kino” to edit the video. It’s OK, took me a little while to figure it out. “Add text to” is a filter under FX called “Tilter” – Text fILTER, I guess… How intuitive…