Wednesday 13 April 2011

Rhythmbox Artist Prefix Plugin

I've recently started using the Rhythmbox music player.  It seems pretty simple to use and like other Gnome applications is actually quite powerful under the covers but hides a lot of the power from basic use.  You sometimes have to dig a little to find a feature you're looking for.  That said, with no amount of digging was I able to find a feature to enable artists to be sorted while ignoring certain prefixes.  This is a pretty bulk standard feature of most music players and allows artists such as "The Beatles" to be sorted under "B" for Beatles rather than "T" for The.  There's quite a lot of discussion to be found on this in various Rhythmbox bug reports and on the mailing list.  The view of the developers is that it's not possible to automatically provide a one size fits all solution so they implemented the ability to allow users to manually add a sort tag to each track.

I've just written a first versions of a plugin I'm calling Rhythmbox Artist Prefix which allows the user to choose whether to have Rhythmbox attempt to automatically sort artists ignoring certain artist prefixes.  If you use Rhythmbox then give it a try!

The plugin works by querying the Rhythmbox database for artists with the given prefixes and that don't currently have a sort order defined (which allows the user to manually override the sort order derived by the plugin).  So long as the plugin is active it will watch the database for changes too.  The first time you run the plugin it will automatically add an entry to the sort order of all tracks returned by the query and if you leave it running then any time Rhythmbox finds new tracks matching the query their sort order will be updated as well.  Whenever the plugin is notified of a track by an artist such as "The Beatles" and that track doesn't already have a sort order, it will chop off "The" from the artist name and add the remainder (in this case "Beatles") to the artist sort order property for that track.  Quite simple really and I'm amazed it hasn't been done before.

Monday 11 April 2011

Another New Home Server

Those of you following this blog over the past couple of years will know I've already had several low power home servers including an NSLU2, tinytuxbox and Joggler.  The NSLU2 and tinytuxbox are both history but we've still got the Joggler at home.  After finding it was grinding to a halt with the stuff I was running on it while trying to use it interactively it became clear we needed something else at home too.  Since I was also running out of storage space on my home PC a NAS solution seemed like the obvious choice so I went for a Netgear ReadyNAS Ultra Plus 2 (RNDP200U).

I opted for the ReadyNAS Ultra series because I run a SqueezeBox Duet for my music and Netgear are the only partner directly supported by Logitech for their music devices.  After spending huge amounts of time hacking the NSLU2, tinytuxbox and Joggler I felt it was about time I had a device that "just worked" so the option of simply downloading and installing stuff and having it work is really quite attractive.  Of course, other NAS devices can run SqueezeCenter but whether the community supported versions work well and are kept up to date is another matter which I didn't investigate thoroughly.  Another good reason for choosing the Ultra series is they're based on x86 hardware so some of the code and plugins I know I want to run which had previously not worked (or been possible) on the slug for example would be fine, a lot of NAS boxes are still running ARM processors.

The Ultra 2 comes in 2 flavours and I went for the more powerful of the two (the Ultra 2 Plus).  They are exactly the same except the Ultra 2 Plus has a dual core processor vs a single core on the Ultra 2.  Given I'm fully intending to run what is probably more than average on the NAS the chance of getting a more powerful processor was well worth the extra few quid it costs.

On the subject of price, the NAS solution is probably one of the more expensive ways to get yourself a home server.  Again though, the "it just works" factor comes heavily in to play here as I'm not responsible for installing the O.S. and setting up a raft of different services on the box, they're all just there, working!  Probably the most competition for a NAS would be the Asus Revo running Linux, possibly with FreeNAS on it too.  The Revo with the same processor as the Ultra 2 Plus I bought is around 60% of the price.  The Revo isn't able to support the amount of storage you can get with a NAS device though, doesn't (easily) support RAID and if I did want to do those things it would have to be with ugly USB attached disks which are hard to spin down when not in use.

It took just a matter of hours to unpack, boot and setup the device in the way I wanted.  The array has been formatted and exports a share to Linux and Windows boxes, all my data has been copied on there with plenty of room for expansion and user management is sorted.  After that, updating SqueezeCenter to the latest version was simple and installing other additional software (whether official or community supported) is also really easy.  So far I've set up transmission (for bit torrents) and enabled ssh access.  Hardware management is all done through a web interface so the option of automatically powering on/off the device on a schedule or setting up disk spin down is merely just a box tick away.

I've got it connected to a 10/100 switch which is fine for streaming music to the SqueezeBox or sharing pictures with the Joggler but for access from my PC and to large amounts of data I figured that throughput wouldn't be enough.  Fortunately, the NAS has 2 Gigabit Ethernet ports so I've used the second one to direct attach it to my PC and enabled Jumbo frames.  The performance over that link has been absolutely fine whether measured simply by the subjective feel of how long it takes to do certain tasks or via a more rigorous iozone test.

With the tasks of device and software management all taken care of the the thing up and running in no time at all, I'm looking forward to having more time on my hands to do some even more interesting hacking with the box instead.

Sunday 10 April 2011

ReadyNAS Ultra 2 Plus

I recently bought a Netgear ReadyNAS Ultra Plus 2 (RNDP200U) Network Attached Storage (NAS) device and before buying found it hard if not impossible to find out the finer technical details of the hardware specification.  In a similar way to some of my previous posts I thought I'd list out some of the key specs as found under Linux running on the device.

It appears to be running a distribution based from Debian Etch which Netgear have modified to make what they call their Raidiator operating system.  It shipped with Raidiator version 4.2.15 and this is upgradeable when they release new versions.

The kernel version is 2.6.33.7.RNx86_64.2.2 and (surprisingly) is x86_64 rather than the 32 bit OS I would have expected.

The tech specs list the RAM as 1GB DDR2 SODIMM and I can happily report free sees all 1GB available, there's around 500MB of swap space too.

They seem to carve out some sort of virtual storage on the disks you put into the box too.  I've not quite worked this out yet but df reports the following
/dev/md0              4.0G  572M  3.3G  15% /

The CPU is pretty beefy for this type of hardware, Linux sees one processor and two hyperthreaded cores so you get four lots of the following in /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 28
model name : Intel(R) Atom(TM) CPU D525   @ 1.80GHz
stepping : 10
cpu MHz : 1800.215
cache size : 512 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl tm2 ssse3 cx16 xtpr pdcm movbe lahf_lm
bogomips : 3600.43
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

The other hardware in the system is pretty much covered by the output of lspci
Host bridge: Intel Corporation Unknown device
VGA compatible controller: Intel Corporation Unknown device
Display controller: Intel Corporation Unknown device
PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1
PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2
PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3
USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1
USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2
USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3
USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4
USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller
PCI bridge: Intel Corporation 82801 Mobile PCI Bridge
ISA bridge: Intel Corporation Unknown device 27bc
SATA controller: Intel Corporation 82801GR/GH (ICH7 Family) Serial ATA Storage Controller AHCI
SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller
Ethernet controller: Marvell Technology Group Ltd. Unknown device 4380
USB Controller: NEC Corporation Unknown device 0194
Ethernet controller: Marvell Technology Group Ltd. Unknown device 4380

The hardware Specs from the ReadyNAS site are

Physical Specifications
Intel® Atom 1.8 GHz Dual-core CPU (Ultra 2 Plus)
1GB DDR2 SODIMM
Two (42) Serial ATA II channels
Hot swappable and lockable trays
Two (2) 10/100/1000 Ethernet ports
One (1) USB 3.0 port
Two (2) USB 2.0 ports
Embedded 128 MB Flash Memory for OS
Kensington Lock security hole
Software controlled 80 mm chassis cooling fan
Dimension (H x W x D): 101 x 142 x 220 mm (3.98 x 5.59 x 8.66 in)
Weight: 2.07 kg (4.56 lb), without hard disks
Electrical
60W External AC power supply
Input: 100-240V AC~ 50-60Hz 5A(Max)
Power Consumption
34W typical with 2 x 2TB disks
32W idle, 19W with disk spin-down
Environmental Compliance
0 to 40 C (32 to 104 F)
20% to 80% Humidity (non-condensing)
FCC, UL, CE, RoHS, C-tick, VCCI, CCC, KCC compliance
Available Configurations
Diskless
Half-populated

Saturday 26 February 2011

When Jogglers Go Bad


My Joggler went wrong over the festive period 2010.  It refused to boot, it simply showed the O2 logo on the screen and didn't go any further so it appeared to get stuck during POST somewhere never reaching the boot loader.  I was going to replace it with something else but was (quite rightly) persuaded to use the guarantee to get another one since it was only 8 months old.

I contacted O2 early in the new year via their usual support channel.  What follows shows just how wrong a company can get it when they venture outside their core business.  It seems all support processes and staff just were not cut out for supporting the Joggler.  The best way I can put across my experience is simply to recount the notes I took at each point of contact with them.  I had a feeling at the start of the process this wasn't going to go smoothly so started taking notes from the very first call.



7th January
Called O2 for the first time to report my broken Joggler.  Spoke with "Neil" and agreed the Joggler team would call back in 3-5 days.  Direct Joggler support is not available to the customer, Neil has to email the Joggler team to get them to call me back.  It seems even O2 customer support aren't able to contact their Joggler team via any other method than an internal email.  Neil was not able to find a record of my purchase since I'm not an O2 customer for anything other than the Joggler.  Fortunately, I still had a copy of the dispatch email so was able to look up the order number to locate the purchase on the O2 systems.  I left mobile and work numbers with Neil and was given a support case number.

10th January
Received a call from "Simon" in the Joggler team.  He queried the symptoms of the broken Joggler and asked for it to be sent into O2 for a replacement product to be issued.  I agreed to return the Joggler to an address Simon was able to confirm via email.  He advised this process should take up to 2 weeks in order for me to receive a replacement and that I should obtain proof of postage.

11th January
I returned the Joggler via first class post to the address Simon provided with a cover note including all my contact details and the case ID number.  Proof of postage was obtained.

1st February
No Joggler or correspondence received from O2, twice as long as promised.  I phoned O2 support and spoke with "David".  He emailed the Joggler team once again and I agreed to receive another call-back from the Joggler team by phone for an update on the issue.  Particularly, why four weeks have passed without any contact from O2 when I was promised a replacement product within 2 weeks.

4th February
No call-back yet received from the Joggler team.  I responded to the email sent by Simon on 10th January asking for an update.

7th February
Still no call back.  Phoned O2 and spoke to "Thomas Wright".  He investigated and informed me he thought the case had been sent to the wrong team and he was going to email the Joggler support team.  I agreed that I would receive a call-back from the Joggler support team within 48 hours and left my home telephone number in addition to the details already on record with Thomas.  He informed me everything I had been told so far must have been incorrect and I could now not expect to receive a replacement product and O2 might instead insist on issuing a refund instead.

9th February
Wrote to Matthew Key, the O2 CEO, via email.  I wasn't expecting a response to an individual case query but thought he might be interested in a copy of my notes recounting my poor experience with his company.

15th February
Again no call, email or any form of correspondence from O2.  Phoned O2 and spoke to "Robert".  He investigated and was going to pass me to a senior advisor but none were available after a lengthy hold period on the phone.  He said he would continue attempting contact with a senior member of his team and call me back later.

I raised a formal complaint via email to complaintreviewservice@o2.com and copied Matthew Key for his information once again.  I used the advice from the government Consumer Direct site, stating what the issue was with full reference to my notes and case ID and giving O2 14 days to respond before starting small claims proceedings for their breaking the terms of their guarantee i.e. running off with my money!

17th February
Received a call (finally) from O2 but it wasn't from the support department as expected, instead it was a member of the CEO office, Jonathan Moore.  It appears my emails to Matthew Key had got through.  Jonathan was responding to my formal complaint email sent 2 days earlier.  He apologised for the way I had been treated by O2 and promised to take my issue under his wing and follow it through to conclusion.  His thoughts on the issue were that I would be issued a refund rather than a replacement product.  He was not aware of any support systems that might be able to use the case ID I had given him, seem O2 aren't joined up at all and they have several different support systems.

18th February
Jonathan Moore called twice during the day to confirm he was sending out a refurbished Joggler in addition to organising a full refund for the original purchase.  The original purchase include a £10 mobile broadband USB dongle, the cost of which was also refunded.  He had managed to contact both the Returns Department to determine there are in fact a small number of refurbished Jogglers available to send out as replacement products and the order team to organise the refund.

During the week beginning 21st Feb I received a refurbished Joggler and was able to verify a full refund had been credited back to my account.  I don't think I'll be returning this Joggler when it eventually goes wrong as I don't much fancy going through all that again.  While I'm clearly satisfied with the response of receiving both the refund and the replacement I view that merely as compensation for the hours (literally) spent on the phone and costs incurred.

Would I deal with O2 again?  Actually, I probably would but that would very much only be for their mainstream products but if a competitor had a comparable offer I'd probably shy away from them now.  I'm still awaiting a call return from Robert in support and 2 calls from the Joggler support team... useless!

Tuesday 22 February 2011

CEL MT3 Multi Tool

I've been re-grouting my kitchen and bathroom recently, not in itself something worthy of a blog post.  However, I discovered a power tool to make the job far easier and since a few people have already asked me about it...

The MT3 made by CEL UK is an oscillating Multi Tool with all manner of different attachments, one of which is a carbide grout removal tool.  The fact the tool oscillates (rather than rotates, say like a Dremel multi) means you don't fling the grout all over the house as dust.  Vibrations from the tool are enough to remove grout and drop the majority of the mess neatly out of the joints in front of you.

I think at this point you probably already get the picture so here's a fun video of someone using the tool before I splurge out a bit more detail on it:
As you can see in addition to grout removal, it can be used for cutting but also sanding, rasping and probably a whole load of other tasks too.  There's a bunch of other videos on the MT3 and other tools from CEL on their YouTube channel.

As an alternative, the known branded version of this thing is the PMF 180 E from Bosch.  The best deal I found on the Bosch was at Amazon who sell the tool and large accessory pack together for just under 100 quid at the time of writing.  This is more or less the same price as the MT3 from CEL so here's my logic for why I didn't go for the big name product.

Accessories are expensive for both products, but the Bosch is even more expensive than the CEL.  However, the Bosch is only capable of using bits supplied by Bosch themselves where as the CEL is capable of using bits from pretty much anywhere, including Bosch (they include an adapter for Bosch bits).  Given this and the fact the CEL is slightly more powerful I thought I'd go for supporting the small British startup company rather than the large German corporation and if CEL doesn't survive into the future I can always buy alternative bits for the tool from other manufacturers anyway.

Now I've mentioned CEL are a small British startup, it's probably a good point to say they successfully pitched on the Dragon's Den TV programme back in August 2010. You can see the designer and company MD, Chris Elsworthymaking his pitch on YouTube.  However, it seems that ultimately CEL didn't accept the offer of investment.

Dealing with CEL while buying the tool was an absolute dream, one of the best Internet buying experiences I've ever had and really shows how the personal service you can get from a small company makes a difference.  I wanted to buy the MT3-C Pack which at the time was advertised as "coming soon" and is made up of the MT3 Tool, accessory pack, and a case.  Buying all 3 as a pack represented a saving of around £20.

I wrote to the generic sales email address on their web site asking when the pack might be available as I was interested in buying all 3 products together.  Within half an hour I had a response back from their office saying they had all three parts, they were willing to put them together as a pack and honour the advertised pack price on the web site.  This is where it gets really good, in addition they also sent through a PayPal invoice so should I wish to go ahead with the purchase I just had to complete the invoice and they would send the products out that afternoon for next day delivery!  At this point it was a no-brainer, I returned the invoice and followed up via email too.  Again, only half an hour later I had a response saying they had received the payment and sent the product out.  8:30am the next morning arrives and I've got my new tool, brilliant!

So far the tool and dealing with the company have both been great so I'm completely sold and wish CEL every success for the future and in creating some more great kit.

Friday 11 February 2011

Building Native-like Web Apps for Mobile

Sencha Touch
I spent a few months at the back end of last year working on a project to bring company information down to mobile devices within that company.  I took the decision early on in the project to implement the solution using a web browser to host the application and a Javascript tool kit to fake the look and feel of a native application inside the web browser.  It's this technique and tool kit that I want to focus on here.

The first key decision in a project such as this is whether to go with a native application or an app delivered through the browser.  Since in this particular case the people I was writing for all used iPhones, perhaps the natural choice would have been to write a native iPhone application.  They could, however, just as easily have been using Android or a whole host of other devices.  The real benefit of the native application (aside from speed perhaps) is the ability to interact with the hardware on the device your application will be running on.  Since I did not require access to a camera, GPS, accelerometers or any other phone features, delivery through a web browser was a very realistic option.  In giving up the ability to access these hardware features you gain the ability (if done carefully) to write-once run-anywhere.  That is, the application I came up with would be able to run on an iPhone and Android or pretty much any device with a web-kit based browser and a decent touch screen interface, but at the cost of not being able to use, for example, a bar code scanner.

There are probably others but to the best of my knowledge there are currently three Javascript toolkits positioning themselves for the mobile space.  Dojo MobileJQuery Mobile and Sencha Touch.  Did I just say positioning for mobile space?  Lucky you, if you're playing buzzword bingo, sorry!  At the time of creation, Dojo and JQuery weren't options, they are both only now ramping up development in this area and in the case of JQuery releasing early alpha drops.  Sencha Touch was much more advanced and already at a 0.90 beta when I first started playing with it.  I followed it through the beta development cycle over the summer months in 2010.  Fortunately, it seemed the timing of the production release of Sencha Touch was likely to be at the same time the first phase of my customer work went live so it became the obvious choice.

As a bit of background (and again this is my understanding so may not be absolutely accurate) Sencha was formed by the merger of JQ Touch and the EXT JS toolkit when the original author of JQ Touch, David Kaneda, joined forces with EXT development.  Essentially, Sencha Touch is the next generation version of JQ Touch but now has a small army of developers, a community, and a company behind it to provide a support network.

I quite like the approach of delivery mobile apps through the web browser, where it's appropriate to do so of course.  I've already discussed that in my view you can develop a web app in the browser if you don't need access to the device hardware.  If you don't require that sort of access, it's hard to see why you'd want to develop any other way.  As an Android user, I often get frustrated when apps (pointless or otherwise) are released only for the iPhone simply because that's what an iPhone user expects.  One example I had recently was while reading through my subscription of BBC Good Food magazine who seem to provide only an iPhone or iPad application.  In fact if you go to their web site they also provide a Chrome app and a Samsung Wave app, why I wonder?  The magazine simply displays content with little or no interaction from the user, sure the online versions contain video and other features you can't put down on paper but there's nothing there to suggest the maintenance of a myriad of different apps for different mobile platforms is worthwhile.  Not to mention my surprise that an organisation such as the beeb are carving up their community by device type rather than, as we'd expect, supporting the masses as we saw with iPlayer coming to Mac and Linux after their early Windows only versions.  Surely, a javascript toolkit approach here would be better?

In the early days of my playing around with the Sencha Touch beta code I wrote a mobile version of a badminton web site I maintain.  It's not particularly advanced and certainly not representative of all the things you can do with a toolkit like this but thought I'd put it out there anyway.  It should, at the time of writing work with iPhone, iPad, Android and Blackberry devices and quite probably with others too.  If you're trying on your desktop then make sure you're using a WebKit based browser such as Google Chrome or Safari, or for something a little bit different the great little browser Midori.  For a better selection of demos take a look at the Sencha Touch Demo page and for a developer perspective on the widgets and options available in the toolkit have a look at their Kitchen Sink demo which gives a simple overview of many of the components.

Wednesday 8 December 2010

Killer Android Apps

There have been plenty of articles written around the web about the top or best Android apps.  I always find these lists very subjective but they are at least a good way to share what you've found and a great way for other users to discover new apps they've not tried yet.  I've been using an HTC Desire for over six months so I'd consider myself a reasonably experienced user now.  It's a world away from the Nokia N73 I was using previously and my first foray into wifi-enabled portable touch screen devices (for personal use anyway).

Rather than bother myself considering which is the most useful, here's an alphabetical list of the apps I'm using right now.  I'd love to hear what other people are using for similar things, there's so many good apps out there I'm sure to have not checked them all out.

Angry Birds (Game)
There's loads of games on the Android platform but this is the one I've spent most time playing.  I'd be very surprised if you haven't come across it by now but if not then give it a go.

Barcode Scanner (Bar Code Scanner)
When I first got the phone I really didn't see the point of having a barcode scanner.  It has, however, proven quite useful on occasion.  I've yet to use it to scan any tangible product in a shop for example.  Where it does come into its own is opening links from the web on your desktop in your mobile browser.  I have, on more than one occasion, now come across sites that provide a QR code (2d bar code) that gives you a link to a web page or even better gives you a link directly to the right app in the marketplace.

eBuddy (Instant Messenger)
A multi-protocol instant messenger for Android.  It connects to all the instant message services I use and gives me a nice way to increase the amount of time I spend logged into them so I can still be contacted even when not directly using a computer.  I use a multi-protocol client on my desktop so it's great to find a decent one on the mobile platform which means you don't have to run individual apps for each of the services you want to log into.

ES File Explorer (File Manager)
The version of Android I have (2.2 from HTC) doesn't come with any sort of file manager or mechanism for installing APK files.  ES File Explorer is excellent for both of these tasks.  It's the best and most flexible file explorer I've come across but for some reason isn't the most popular or widely known/used.  It has some neat advanced features such as the capability to connect to files over FTP/Samba and integrated bluetooth, etc.  A real step up from any of the other file managers I've seen on Android.

Google Reader (Feed Reader)
As I write Google have just released the official app for their Reader service.  It's definitely an improvement over the mobile version of Reader in the web browser so I'd recommend it just for that.  However, it also seems to be (IMHO) better than other popular reader apps such as Feedsquares.  Personally, Reader is the only internet based feed reader I use so having something integrated to it on my phone is fab.

Maps (Navigation)
Google maps in an app.  You've almost certainly already seen it, but I still use it a lot and like it so it makes my list of useful apps.

RAC Traffic (Traffic/Navigation)
This is one area where I've not searched around much for other apps in the field.  The RAC traffic app shows you where the traffic hot spots and problems are on roads in the UK.  It's really useful to check this (when I remember to do so) before going off on a longer journey in order to help pick the best route that day.  I'm sure it can't be the best app out there for this sort of thing so would be interested in hearing about others too.

Scrobble Droid (Social Music)
I find the last.fm service on the Internet a really useful way to discover music and share music with friends.  I don't tend to use the last.fm clients to listen to music very much so that app doesn't feature on my list.  However, this is a really tiny but useful app (more of a utility really) that will send the tracks you play in the Android music player to last.fm.  This means anything I listen to on my phone gets added to my last.fm account and helps build my profile on the site.

Skype (Instant Messenger and VOIP)
Either you use Skype or you don't and you know what it is or you don't.  The official client for Skype on Android seems to be pretty good to me and a neat way to make free calls to friends over your wireless network.

Todo List Widget (Productivity)
I've tried several todo list apps and widgets on Android but essentially wanted something stupidly simple that would literally just shove a list of stuff on the desktop and allow me to add/remove/tick off items as I deem necessary.  Through a recommendation from a friend I found a widget called "Todo List Widget" which does just that, it's everything I wanted, very very simple and easy to use.  If you want something advanced or more pervasive across devices this isn't the one for you, check out something like Remember The Milk instead.

TweetDeck (Social Client)
I've ditched the Facebook and Twitter apps in favour of using the same app on the phone as I do on the desktop.  I've never experimented with Adobe Air but TweetDeck seems to be a great example built on that platform.  I find TweetDeck much more usable than the other apps and it does seem to just work, is intuitive and nice to use.  Once again a great user experience wins the day on the mobile platform.

Youtube (Video)
Ever tried watching videos in the web browser, they're rubbish right?  The bulk standard youtube app sorts this out nicely, giving a much better view and size of the video and easy to use controls.

I found some other useful apps on my phone too that I have used briefly but can't necessarily recommend with the apps above because I've not used them extensively enough.  These are "AndChat" for IRC related chats, it seems to be very similar to xchat but for Android; "c:geo" for Geocaching as it appears to be a fully functional geocaching app you can use out in the field while caching; and "Gesture Search" which is a Google app which allows you to very neatly search for things (apps, contacts, etc) on your phone via gestures.

In full Trevor McDonald style I'll sign off this post with an "And finally" thought... wouldn't it be really useful to have a social market place where you can suggest and rate apps to friends?  The ratings system in the market place is all very well but isn't particularly relevant to me.  My friends and contacts know me best and I respect their recommendations much more than a generic ratings system.  This sort of functionality would certainly remove the need for this type of blog post entirely.

Tuesday 1 June 2010

Joggler Linux Boot Mysteries

PCs boot first using a system known as a BIOS (basic input output system), that's the bit you might see when you very first switch on your computer and might say something like "Press F1 to enter system menu" or similar. The BIOS is responsible for knowing enough about your hardware such that it can start the computer, run your boot loader and ultimately pass on some information to your operating system which takes over control of the hardware. The Joggler doesn't boot using the mechanism most of us as PC users are familiar with, however, abandoning the BIOS in favour of EFI (extensible firmware interface). EFI is much bigger, more flexible and inevitably a lot more complicated than the older BIOS system. I'll attempt to unravel in simple terms some of the mysteries of booting your own operating system on the Joggler here.

EFI has its roots in Intel in the same way as a BIOS has its roots in IBM.  Basically, it consists of a set of executables able to run within the simple environment EFI provides.  These executables are just little computer programs that can vary extremely widely from talking to a piece of your hardware to providing you with a shell environment in which you can interact with EFI through to booting your operating system.  This last function is quite important to us as computer users if we're to understand how EFI is used to start your machine, in this case your Joggler.  A BIOS will boot your machine by looking at the master boot record and starting the boot loader that your installed operating system has put there; your operating system is responsible for booting itself.  EFI does away with this, moving the responsibility for booting operating systems into the firmware interface itself, you no longer need a boot loader for your operating system.  Instead, the boot loader is now just another EFI program that runs within the simple EFI environment I mentioned earlier.

You've been wondering what this FAT partition on your Joggler image is all about?  FAT is just another file system like NTFS for Windows or ext for Linux, it's very widely understood so is commonly used these days on USB sticks but not necessarily many other places.  If your disk is to be used to boot an operating system then EFI says you need a FAT file system as the first partition of that disk.  EFI actually says FAT12 or FAT16 must be used for "removable media" so for us Joggler users with USB sticks or hard disks we should be using FAT16 even though EFI can understand FAT32 as well.  You could boot any other disk from your FAT partition but all the simple Joggler cases would just involve booting an operating system somewhere else on the same disk i.e. the second partition.

Fortunately for us, when you start your Joggler its EFI looks both at its internal disk (the one with the O2 interface on it) and removable media (your USB disk).  The FAT partition is discovered on your USB disk and by convention the file called startup.nsh is executed.  This file is simply a script which can be used to execute any EFI script commands you wish.  For Joggler USB booting it just runs a local script on your disk to start your boot loader EFI program.

So for the Joggler we might have something like this in startup.nsh on our disk in order to call the boot.nsh:
fs1:boot2
fs0:boot


And the following in the file boot.nsh to start the grub EFI boot loader program:
fs1:
grub


You now know what to do in order to boot your Joggler from a USB disk but the final missing piece to the puzzle is the EFI boot loader program itself. In the example above I used grub as the boot loader program. Yes, this is the same grub you're familiar with from booting Linux on BIOS based machines. However, in this example it's an EFI program so you'd be right to be wondering how you go about getting a copy of it.  In my example here your FAT partition already has 2 files on it (startup.nsh and boot.nsh) and you'll need another 2 files (grub.efi and grub.cfg) to be able to boot your disk

There are two versions of grub.  The old version, grub 1 or grub legacy as it's know known is not the one you want.  You're looking for the current version which is (or will become) grub 2.  At the time of writing grub 1.98 is the latest version, download the released version.  Unfortunately, it doesn't work on the Joggler without applying a patch.  So it's with thanks and reference to the guys over at Joggler Hacks I got my Joggler booting with my own grub 2.

To compile an EFI version of grub 2, unpack the source you've downloaded, then apply the Joggler grub 2 patch (using patch -p1), run ./configure --with-platform=efi and make.  The compilation should proceed through to completion leaving you just finish off by making the grub EFI program.  You can do this with ./grub-mkimage -d . -o grub.efi part_msdos hfsplus fat ext2 normal sh chain boot configfile linux.  The file grub.efi will be created and you can copy this to your FAT partition.

The one remaining thing to do is create the grub configuration file.  In grub 2 this is called grub.cfg and can be put in the root directory of your FAT partition with the other three files already there.  If you've got your root file system on your second partition then the following should be enough for you to boot it:
set timeout=0
menuentry "Linux" {
set root=(hd0,1)
linux /vmlinuz root=/dev/sda2 acpi=force ro idle=halt
initrd /initrd
}


This configuration requires your kernel (vmlinuz) and ram disk (initramfs or initrd) to be on the FAT partition too.   The final piece to the puzzle is to copy these files from your installed version of Linux in the second partition from the /boot directory.  With all six files in place on the FAT partition you're all set to boot the OS on the second partition.  Most recent versions of Linux should at least boot on the Joggler. However, the Joggler does have some interesting hardware which may not be optimally supported.  Hence, for the quickest out of the box working system you're still better off using a pre-built image from someone else as now you've got the thing booted the hard work is only about to begin.

You can find a lot more of my information about the Joggler at my Joggler Index post. I also have a list of Joggler Bookmarks.

Sunday 30 May 2010

Upgrading Fedora 12 to 13

I'm pleased to report that after problems upgrading from Fedora 10 to 11 and minor issues upgrading Fedora 11 to 12 that I've finally had a no problem upgrade from Fedora 12 to 13 on my home machine.

I have only a very slightly unusual setup in that I've got Fedora running on top of a hardware RAID environment which has caused some issues with preupgrade in the past. Upgrades I have tried on other equipment such as my work laptop have always been flawless and now it seems the issues with RAID installs have gone away too.

So this brings to an end my blog trilogy about upgrading Fedora, short and sweet, it just works! Now onwards to enjoy using a great new distribution that's pushing the boundaries in pretty much every area of Linux usage. Thanks to the Fedora team, Goddard looks fab.

Tuesday 25 May 2010

Pre-built Joggler Images

It seems everyone buying a Joggler is doing so for their own good reasons with thoughts about how to hack the device to their needs. I include myself in this too, why else write these blog posts? The majority of people aren't so interested in the hacking side of things as simply getting the device to do what they want and that's where using a pre-built, already hacked, operating system image can come in very handy indeed.

The Images
Easily the two most popular images are Ubuntu based although there are Joggler communities for Android, Mer and Meego, all of which are Linux based platforms. I've only tried the first of these but can lend my recommendation to either of

As I said, both are Ubuntu based with the key difference being the first image uses the Ubuntu Netbook Remix (a.k.a UNR, Ubuntu Netbook Edition and UNE) while the second one uses "normal" Ubuntu.  You'd perhaps expect them to be in fierce competition with each other but in good open source spirit quite the opposite is true. Both are produced by nice guys who help each other (and the rest of the community out) by sharing what they do.

There's no sense in me reproducing how to download and use either of these images.  Both come with pretty bullet-proof instructions on what to do.  I would, however, heartily recommend you produce the images from a Linux system having recently helped a friend struggling with downloading the images successfully and finding the right tools to do the job under Windows.

Fair's Fair
From my own investigations and messing around with putting Fedora on the Joggler I can certainly vouch for the amount of time and effort these guys have put into producing such good quality, usable hacks.  So, if you do more than just evaluate these for your own use i.e. you really are using your Joggler with either of these images then do give serious consideration to spending a few quid giving something back to the guys as they ask through a small donation.  I have no idea how much they might stand to make through donation and other revenue such as the Google ads, but it's probably not a huge amount and is definitely well earned.

Modification
If you try the images out and there's something you don't like, fine, you don't have to stick with that particular quirk.  There's never going to be a one-size fits all approach so if you don't like, for example, the on screen keyboard, the user interface or something else then feel free to change it.  It's your system once you've downloaded and booted it after all.  There are a lot of, dare I say, complaints on the forums about things not being quite right.  If it's something major then let the guy know who produced the image, it will probably get fixed in their next version.  Also, there's a huge wealth of help and support out there in various places so try looking for someone who's already "been there, done that".

Subject to some of the Joggler Hardware Gotchas it is possible to use these images on devices much bigger and faster than a 4GB USB stick.  I've tried with an 8GB stick and USB hard disks from 80GB through 320GB and even one disk of 1TB.  Simply follow the instructions for either image to write to your larger device as if it were a 4GB stick.  Then use a tool such as gparted (again I recommend Linux simply because it's easy and the tools are readily available) to resize the second partition to be as big as you like.  If you move to a hard disk (rather than USB stick) then you can undo some of the modifications made in the images for efficiency and to try and protect your stick:
  • Change the file system back to ext3 from ext2
  • Add a swap file or swap partition
You can change the file system type from ext2 to ext3 either before or after changing the size of the partition.  Simply boot the image on your Joggler and run the command "tune2fs -j /dev/sda2" then edit the file /etc/fstab to change bit that says ext2 to say ext3, save that file and you're all done.  The reason for making this change is your files will be a little safer in the event of unplanned events such as sudden loss of power.  This was quite rightly turned off for the USB stick images because more data is written to the device and since USB sticks are only capable of being written to a relatively small number of times the trade-off between stick reliability and file system reliability has to be made.

Adding a swap file (if you don't know what this is then have a go at understanding paging)is probably easier in many ways than adding a swap partition and with a recent version of Linux such as the ones used in these images doesn't lead to any loss of performance as might have been expected in older versions of Linux.  Feel free to add a swap partition in gparted though, don't forget to add a line to /etc/fstab to tell Ubuntu to use this partition as swap.  To add a 1GB swap file simple run the command "dd if=/dev/zero of=/swap bs=1M count=1024; swapon /swap" then add a line to /etc/fstab so next time you reboot Ubuntu will use this file for swap space.

You can find a lot more of my information about the Joggler at my Joggler Index post. I also have a list of Joggler Bookmarks.