Archive for the ‘Linux’ Category

MythPyWii – now on Google Code

Monday, January 4th, 2010

Fancy submitting to MythPyWii? Let me know! It’s now on Google Code.

Code, documentation, bugs, bugfixes, etc all welcome!

Bookmark and Share

N900: first impressions

Saturday, December 19th, 2009

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.

G1 (top), N900 (left), iPhone 3GS (right)

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.

G1 (back), N900 (left), iPhone 3GS (right)

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.

N900 vs G1

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.

N900 lock screen switch (left) and kickstand.

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!

N900-YouTube Windowed

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.

N900 - Home Screen N900 - Running Applications N900 - Applications Home N900 - Applications More

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.

N900 (top left), G1 (top right), iPhone 3GS (bottom)

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…)

Reblog this post [with Zemanta]
Bookmark and Share

MythPyWii Power Update (v17)

Saturday, October 3rd, 2009
Myth tv logo
Image via Wikipedia

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!

Reblog this post [with Zemanta]
Bookmark and Share

Calling All Southampton Hackers!

Wednesday, May 20th, 2009
City of Southampton
Image via Wikipedia

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.

Reblog this post [with Zemanta]
Bookmark and Share

Useful Bash Scripts

Tuesday, April 7th, 2009
Bash
Image via Wikipedia

Here’s a couple of bash scripts I’ve written recently that might be of use to someone.They work well under Ubuntu, and should work under any GNU/Linux or Unix system with the suitable software installed.

Improved “svn diff” command (ignores whitespace, colour highlights output, requires colordiff) – I put it in /usr/local/bin/svndiff:

#!/bin/bash svn diff -x -w $@ | colordiff

Improved recursive grep command (greps recursively, ignores files in the .svn folders, ignores temporary files, highlights output in colour) – I put it in /usr/local/bin/grepr:

#!/bin/sh SEARCHTERM=$1; shift; find . -type f -a -not -iname "*~" -a -not -iwholename "*/.svn/*" -exec grep -H --color=auto $@ "$SEARCHTERM" "{}" \;

You might also be interested in my previous “whoops I deleted files without telling svn” post here.

Reblog this post [with Zemanta]
Bookmark and Share

SVN Hint: Automatically removing manually deleted files from SVN

Friday, February 6th, 2009
Bash
Image via Wikipedia

When deleting files in a working copy of an SVN repository you should do it on the command line: svn rm [filename]. If, however, you don’t do this (e.g. delete through a gui, or just do “rm” without the “svn“) then SVN gets confused, and puts a “!” in it’s status before all the deleted files. If you svn update, all the files will be recovered, rendering all your time spent deleting them wasted. Really you should use svn rm, but if it’s already too late for that, you can use this bash fragment to delete the files from SVN:

svn status | grep "^\!" | sed 's/^\! *//g' | xargs svn rm

This command does a status command, finds all lines starting with “!“, and then extracts the filename and runs it through “svn rm” – really deleting the file.

Caveats:

  1. Manually deleted files are not the only things that makes svn use “!” – so beware of this! Ensure you do really want to delete all those files!
  2. This works for filenames which are all_one-word/without/any.spaces but I am not sure if it will work or not for filenames with spaces in.
  3. Use at your own risk. The code is simple enough so you should be able to grok what it does.

Enjoy!

Reblog this post [with Zemanta]
Bookmark and Share

Working: HDMI Audio on ATI Graphics Card

Friday, October 24th, 2008
List of video connectors

Image via Wikipedia

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!

Reblog this post [with Zemanta]
Bookmark and Share

MythPyWii Bugfixes and Enhancements

Thursday, September 18th, 2008
Software Bugs

Image by FastJack via Flickr

I’ve just updated MythPyWii to handle the connection to Mythfrontend more smoothly, and to give feedback via the wiimote on error/disconnect. (i.e. if myth closes, the wiimote shakes, and the LED pattern changes to [ . # # . ] instead of [ # . . # ] just before the wiimote turns itself off). This means if there are issues connecting to Mythfrontend you can retry again simply by pressing 1&2 once more (fix any issues first though – e.g. closed mythfrontend/no remote interface enabled).

I’ve fixed a little bug with timestretching, and have also improved the timestretch responsiveness by emulating not just the left/right keys but also the up/down keys (which increase/decrease timestretch by 0.25 instead of just 0.05).

As always, download the latest version of MythPyWii here.

Ah hah, an update to Zemanta has just been released! Integration with Facebook and Flickr, eh? I best sign up for a Flickr account then, I suppose… Argh! They seem to have broken images with my theme – I fixed it by adding this CSS to my theme (copied from firebug):

.alignright { float:right; } .wp-caption { -moz-border-radius-bottomleft:3px; -moz-border-radius-bottomright:3px; -moz-border-radius-topleft:3px; -moz-border-radius-topright:3px; background-color:#F3F3F3; border:1px solid #DDDDDD; margin:10px; padding-top:4px; text-align:center; }

Reblog this post [with Zemanta]
Bookmark and Share

New (Minor) MythPyWii Release (r15)

Thursday, September 18th, 2008
Screenshot of a sample Bash session, taken on ...Image via Wikipedia

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.

Reblog this post [with Zemanta]
Bookmark and Share

MythPyWii Video

Friday, September 12th, 2008

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… :)

Bookmark and Share