Cumbers

Pollen Forecast on Twitter

June 24, 2008 · 1 Comment

I recently attended a hackday event with Dale. Mashed2008 was my first, and it certainly will not be my last. We hacked together a current cost idea, and won! However that was not this hack. On the train on the way in I was discussing some simple hacks with @thomasj. One issue I have is that my hayfever is very up and down, and the bbc pollen forecast seems to be quite good at being ‘High’ when I want to rip my eyes out, and ‘Low’ when I can get away with not eating ant-histamines like smarties.

So using the power of twitter (when it is not down), and a simple perl script to get the data from the page and I now have @pollen_south which gives me the south feed. If I get requests I might add the other areas that the bbc use, but as a simple hack it work pretty well. The only downside was that I totally forgot about doing the hack until the point during the presentations when I slowly lost the will to live.

→ 1 CommentCategories: hackday
Tagged: , ,

openmoko software repairs

June 3, 2008 · 1 Comment

Last September Dale went to MobileCampLondon, and managed to snaffle an openmoko neo1973 device. Search on google for more information about openmoko then I can talk about here, but basically it is an opensource mobile phone, running on an ARM processor and using a linux operating system. At some point whilst playing with it Dale managed to break the device and it has sat in his house ever since.

Today however he gave the device to me, with the initial task of making it usable again. The symptoms firstly where that it would not turn on. No feedback, no backlight, nothing. A quick google search and flick through the openmoko wiki told me to “Remove the battery for 30 seconds, and then charge for around 2 hours before turning on”. This worked, and I was soon presented with the bootup screen. Boot up takes around 3 minutes when you first start it, and if all is working well you are briefly confronted with a “Please Wait…” message followed by the UI loading. I managed to get to the Please Wait message, but it would go no further. Hmmmm….

There is a usb port on the side of the phone, and connecting it to a laptop (mine is running linux) enables you to connect to the phone using ethernet over usb. Simply set up the port using:

sudo ifconfig usb0 192.168.0.200 netmask 255.255.255.0

and then you can

 ssh as root to 192.168.0.202

where the default root password is blank. It may take short while to connect, so be patient! Looking in /var/log/messages I found that the kernel and rootfs were corrupt, which would require that I flash the phone again. Not only would I have to flash the phone but I would be flashing someone else’s phone so turning it into a useless brick was definately not an option. Fortunately there are really easy to use tools to do this.

dfu-util is an application written by openmoko to help with flashing your phone. As the phone is still very much in development this is probably an every day occurrence and so the tool is very quick and easy to use. Firstly I installed the required ubuntu libraries:

sudo apt-get install libusb-dev autogen pkg-config

and then downloaded the debian version of dfu-util from http://packages.debian.org/dfu-util. You also need to have usb file mounting, which can be enabled by adding:

 usbfs   /proc/bus/usb   usbfs   defaults

to your /etc/fstab. A reboot maybe required to enable the usbfs, unless you know of a better way. From there I used the

dfu-util -l

command to display the usb devices I could use, I got the following output (using root):

root@jester:~# dfu-util -l
dfu-util - (C) 2007 by OpenMoko Inc.
This program is Free Software and has ABSOLUTELY NO WARRANTY

Found Runtime: [0x1457:0x5119] devnum=2, cfg=0, intf=2, alt=0, name=”USB Device Firmware Upgrade”
Found Runtime: [0x0a5c:0x2110] devnum=3, cfg=0, intf=3, alt=0, name=”UNDEFINED”
root@jester:~#

Using the following two commands I was able to upload the kernel and rootfs:

dfu-util -a kernel -R -D ./uImage-2.6.24+git20080421-r0-om-gta01.bin -d 0x1457:0x5119
dfu-util -a rootfs -R -D ./Openmoko-openmoko-devel-image-glibc-ipk-P1-Snapshot-20080421-om-gta01.rootfs.jffs2 -d 0x1457:0x5119

Note that as I had two devices using dfu-util -l I had to specify the one I was interested in using by specifying the -d flag.

So now I have a fully working openmoko phone, and it is running the latest recommended build. Just need to do something with it now! I will be testing the phone over the next week and may well post my thoughts on how the development is doing. Who knows maybe there is an openmoko/currentcost idea to be developed…..

→ 1 CommentCategories: linux · openmoko
Tagged: , ,

So now I have a slug with SLUGOS…..

May 28, 2008 · 3 Comments

….what should I do (aside from upload currentcost data)?! Dale has an excellent post about the installation, and for me it was pretty much the same. The only real difference was that as Dale is very much a windows chap he used Sercomm Firmware Updater, and as I am more of a linux chap I used upslug2 to flash the device. upslug2 is a simple application that scans for slugs that are in admin mode, and then if you pass the correct parameters will go ahead and flash the firmware, very quick and easy to do!

This post is about getting the slug to be a functional mini linux box (for example the creation of a non-root user).

Bash

I prefer bash to the sh shell, so ‘ipkg install bash’ was the first installation I did. Job Done.

Who wants to be root anyway?

I am primarily an Ubuntu user, have been now for over 2 years and am very happy with it. I like the lack of root user, although you can configure it, and the more or less enforced use of sudo. So my first task was to add a user that was not root, and setup sudo. I started trying to use ‘useradd’, but it was not there, but swapping the two words to ‘adduser’ brought up what we come to expect. a cryptic message stating that I should use ‘adduser {OPTIONS] username‘. Note the lack of mentioning what the actual options could be! A quick google search and I found the following: http://tinylogin.busybox.net/TinyLogin.html which on it details the required options and what to do with them, and thus I constructed: ‘adduser -s /bin/bash -h /home/cumbers cumbers’. Next I created the user directory, chown’d it to my user and did a passwd to set my password.

sudo was just as simple as installing bash. ‘ipkg install sudo’ was all that was required, and then a visudo to edit the sudoers file. I like to use the wheel group with a password so uncommented the relevant line, and then created a wheel group using ‘addgroup wheel’.

With the two steps above I now had a system that I felt was a little more secure in my sometimes careless typing world!

Timezones and ntp

According to the tzdata packages we (the UK) are not in tzdata-europe as you would suspect, but are in fact in tzdata-misc package! A simple ln -s /etc/localtime /usr/share/zoneinfo/<final path to your locale> and I was setup. Again using the ipkg tool I installed the ntpclient and ntp-tools packages. There are various sites that deal with configuring this, so just give it a google!

Miscellaneous

I also installed the following (in no particular order)

  • findutils - gives me locate and updatedb
  • coreutils - something no admin should be without
  • tar
  • gzip
  • ncftp - powerful ftp client, including bookmarks
  • grep

What next for the slug?

The device is surprisingly repsonsive and I am looking forward to pushing it to its limits. Dale has already recompiled perl modules so that he can use the full mysql package, before find out about sqllite, but there seems to be a lot you can do with this piece of kit, so who knows maybe an mp3 server, or just a samba share point for the house! This device was bought to replace an old shuttle pc, that seemed to use about 40W to publish the data, my resting wattage in my house is now around 60, which is pretty damn good!

→ 3 CommentsCategories: CurrentCost · linux
Tagged: , , , , ,

Breakdown of currentcost xml output

May 7, 2008 · 16 Comments

With all the blogject/tweetject activity going on with James Taylor, Chris Hodgins, Nick O’Leary and of course Andy-SC, and with Nick’s excellent guide to getting the data and creating custom graphs, I thought it would be good to blog about the actual xml data, and in doing so create a reference article for new people joining the currentcost foray! I do not know what all the data stands for, and this article will get updated as and when I am told/I work it out!

Updated: XML notations have been updated in line with comments to blog post. Thank you to everyone for helping with this!

<msg>
  <date>
    <dsb>00030</dsb> // This is the ‘days since birth’
    <hr>00</hr><min>20</min><sec>11</sec> // The Time
  </date>
  <src>
    <name>CC02</name> // The name of the device
    <id>00077</id>  // Communication channel for device
    <type>1</type> // Hardware version of the device.
    <sver>1.06</sver> // Software version
  </src>
  <ch1>
    <watts>00168</watts> // Value from the 1st channel clamp
  </ch1>
  <ch2>
    <watts>00000</watts> // Value from the 2nd channel clamp
  </ch2>
  <ch3>
    <watts>00000</watts> // Value from the 3rd channel clamp
  </ch3>
  <tmpr>25.6</tmpr> // Current Temperature as recorded by unit
  <hist>
    <hrs> // Total Kwh used in 2 hour blocks
      <h02>000.3</h02>
      ….
      <h26>003.1</h26>
    </hrs>
    <days> // Total Kwh used per day(s)

      <d01>0014</d01>
      ….
      <d31>0000</d31>
    </days>
    <mths> // Total Kwh used per month(s)

      <m01>0000</m01>
      ….
      <m12>0000</m12>
    </mths>
    <yrs> // Total Kwh used per year(s)

      <y1>0000000</y1>
      ….
      <y4>0000000</y4>
    </yrs>
  </hist>
</msg>

Questions that I would like answered.

  • Is the data stored in persistent memory? Answered by AndySC. Yes it is flash memory :)
  • What does DSB stand for? Answered by Nick in comments below and xml above

→ 16 CommentsCategories: CurrentCost
Tagged: , ,

GTA IV: A week on from the release.

May 6, 2008 · No Comments

GTA IV has been with out a doubt one of the most anticipated games if not since gaming began, then certainly on the so called ‘next-gen’ consoles of the Xbox360 and PS3. Ever since it has been announced at E3 in 2006 that Rockstar were going to release it alongside the PS3 edition the anticipation has grown and grown. Microsoft thought it was such a big game that they ensured that only they had downloadable episodic content. Needless to say, unless you have been sleeping in a cave, you will know that it is out!

So after a week of playing and with all the pre-release hype dying down, and the 10/10 reviews that some gamer sites have been giving it I thought I would give me take on the game. I am roughly 25% of the way through the game, having taken about 10 hours (Addiction Level: Getting Sketchy) to get that far. I am playing on the xbox360 and only have 7/50 acheivements so far, (see here for complete list). I am a GTA fan, having played the original when it was written by a company based in Scotland, so I know the roots and the format well. I will not go into the story too much as that has probably been done now to death by everyone else. Instead I will just go straight for what I like, and what I do not and a short piece on the mini games. So here goes:

The Good

I guess the first thing to talk about is the graphics. They are pretty spectacular as they should be after all the delays. Driving round either by night or day offers stunning visuals, I especially like the haze in the distance, which adds a certain amount of realism. There are issues however, see “The Bad”.

There are lots and lots of nice touches, you can turn your headlights on full (xbox360 - Hold X whilst in a car), when it rains you can watch people get their umbrella’s out, and if you scare the little old lady with her groceries in her arms then she drops them, and they are all individual objects, all of which add to the sense of realism. Another nice touch is toll booths, but I really could go on forever about all the little things…..

The introduction of a mobile phone as a way of keeping in touch with in-game characters, keeping updated via text about potential jobs, and the addition of an organizer that holds times/dates of potential activities is brilliant and feels completely natural. Don’t want to talk to your girlfriend when she rings? Then hang up! Actions like these have consequences on your relationship, but sometimes you don’t want to talk to her! Later in the game you get a new phone, which is another great idea, but I won’t go into details about that….

Finally before this entry gets too long, there are the choices that can be made. There are probably not as many choices as I thought there would have been, I initially envisaged Rockstar making it a lot more freeform then it is when it comes to missions, but dotted around the story are decisions that you have to make. My latest one was to either take out “Business Partner A” and get a lot of money, or “Business Partner B” and potentially get nothing except a good friend. I did not take on this mission for a little while and found myself agonising over which character I should ‘dispatch’ of. Let’s just say I valued friendship over money!

The Bad

There is not much wrong with this game. It is a great game but I feel I should point out some annoying things that I have found since playing it. All great games have their flaws, and it is no big deal that they exist in this game, however I feel they should be talked about and discussed.

Graphics…yes they are great, but every so often textures take 2-3 seconds to load, or worse objects suddenly jump into the scene. This does slightly detract from the game, but does not happen often enough to annoy me too much.

Money. I am terrible at saving, but at the moment I have $45304 burning a hole in my pocket, money is not a problem except that I cannot spend it. I seem to recall in previous versions of the game that you could buy houses etc, and maybe there will be a use for my large stash soon, but for the moment I am restricted to buying every bit of clothing from the high end clothes shops :(

The autosave functionality is great, a nice touch so that all my progress from a mission is not lost. The flaw in this aspect of the game is that the first time it wants to autosave after turning on the xbox and entering the game the xbox asks you what storage device to store the data on. A few times there has been information given to me in the top left hand corner that I cannot read because I have the xbox save blade open so I can select my HardDrive :(

Finally the mobile phone is a great idea, but why can I not run with it? Why can I not get into the car? Not too much to ask is it?

Mini Games

In addition to driving around killing both innocent civilians and nasty criminals you can go out for a social with the friends in your mobile phone contact list. These include bowling, pool, darts, a comedy club, strip club, a bar and a couple of others. The last one mentioned has proven quite controversial and I will leave it up to individuals to decide whether it is a good thing or a bad thing. I have ummed and erred about what is reasonable to say about this matter and have decided to leave it to others. The rest of the mini games are brilliant and well thought out. There is a surprise for anyone who visits the Comedy Club, but I won’t let the cat of the bag!

Summary

The game is fantastic, graphics, gameplay and general feel are spot on (minor flaws excepted), and I am proud to say I own this game. I have yet to make a serious attempt of the multiplayer games, but on the single player game alone I feel I have gotten my monies worth. I would give this game a not unreasonable 9.5/10.

→ No CommentsCategories: xbox360
Tagged: , ,

Upgrading to Hardy Heron

April 25, 2008 · 1 Comment

At work I have been using Ubuntu for over 2 years on my laptop (most use Windows XP), I think I have been an Ubuntu user since 5.04 and the upgrade process in the last few releases has been getting better, although never without its problems. My upgrade from Gutsy Gibbon was amazingly easy, a few clicks and about an hour later I had 8.04 installed, so easy and now I am completely up-to-date.

HardyHeron comes comes with the latest and greatest GNOME 2.22, and from a day of using it there are minor improvements, but nothing mind blowing. The biggest change I noticed even as I was upgrading was a change in fonts. I do not know why the new fonts are better, but I feel I like them a lot more, maybe just because they are new and shiny!

My T61 Thinkpad comes with nvidia drivers and, as I like using compiz-fusion, I cross over to the dark side and use nvidia’s properitary driver, which seems to work very well. I still have more issues with external monitors then I would using XP, but overall it is a pleasant experience. Compiz-fusion is improving with every release. With Gutsy Gibbon I had issues with changing effects where they were only implemented after a restart of X, this has been fixed in this release.

The Network Config Manager has changed, mainly for the better. When I want to set a manual config change, I am not initially asked for the admin rights, but have to click a button to ‘unlock’ the admin features. LEAP network authentication has always been an issue, this seems to have improved in this release and I have actually managed to connect to the IBM secure network, although this is still not as good as it was with Windows XP.

Firefox 3 has been bundled in and whilst I am a user of flock (built on Firefox-2), I am impressed with the speed of Firefox 3 and look forward to Flock building off the latest version (they are still only Beta2). Have not had any issues with my plugins unlike Dale.

OpenOffice is now 2.4 (noticed that the splash screen now has the Sun Logo). Comes with ODF (competition with OOXML). My biggest problem with OpenOffice is spreadsheets, specifically graphing data. Having had a quick play, I see massive improvements compared to previous versions, and could potentially use it as a replacement for Microsoft’s Excel.

The biggest problem…..My Numlock does not seem to work with Keypad :( It appears that the upgrade changed my numpad to be a mouse pointer, and a quick google search gave me the link I needed. (http://ubuntuforums.org/showthread.php?t=765584).

All in all I am very happy with the new release!

→ 1 CommentCategories: linux
Tagged: , ,

Skiing in Tignes

April 24, 2008 · No Comments

The boys at the top of the glacier in Tignes

Last Saturday I set off with some IBMers on a skiing trip to Tignes, France. This was to be my first experience of the white stuff on a mountain with 2 planks strapped to my feet. I had 4 morning lessons whilst out there, and in the afternoons I was free to improve my skills with the others on the holiday (see photo for most of them).

My first day saw a large fall, which shook my confidence, but was probably the best thing to happen as it curbed my over-confidence and showed me what can go wrong if I get too cocky! By the end of theMont Blanc in the distance holiday I had managed to slip down a small black run, and a dodgy red. We saved the best till last and managed to get up the funicular to the top of the glacier, and above the clouds had some amazing views, including what we believe to be Mont Blanc in the distance!

I definately have the bug now!

→ No CommentsCategories: Uncategorized
Tagged: ,

Angry Chickens fall at final Hurdle

April 14, 2008 · No Comments

Last Friday saw the start of the Annual IBM 5-a-side football tournament at Keele, and I was attending for the first time. The format for this year was 2 leagues of 7 teams from which 4 would progress from each. Our league form was varied, but we managed to scrap to a 3rd place finish which put us in the pot for the knockout draw. On the way to qualification we lost twice to Aidy Spenders‘ Dynamo Chicken Kievs, who played some outstanding football, and were probably the in form team.

The Sunday knockout saw us scrap past The Scruffies, another Hursley team, before again scrapping past a team of old boys from Havant. Hopes of an all Hursley final were scuppered when the Dynamo Chicken Kievs were soundly beaten by The Toon Army, which left it up to us to retain our title… We took the lead, but with 1 minute to the final whistle we conceded and we ended up losing 2-1 in extra time.

Apart from the final result I had a great time, and have all penciled in the date for next year (17th-19th April). Nightlife was good too, but not for posting here!

→ No CommentsCategories: Uncategorized
Tagged: ,

3KW spike 2pm - 4pm

April 10, 2008 · 4 Comments

Using the CurrentCost meter and the graphing that has been setup, I noticed yesterday a 3KW spikethat lasted an hour, before dropping to 2.4KW for 40 minutes.

I had a feeling that my Storage Heaters were to blame, but wanted to double check. I am currently with Scottish and Southern Energy (SSE), and am on their SuperDeal tariff. A quick check on their website (which does not render in firefox on linux :( ) did not provide any tariff information. So after a lengthy phone call and the guy on the phone needing to refer to a book(!) I got my answer that between 2 and 4 in the afternoon I get a boost of electricity! Since then I have turned off the boost, and lowered the overall temperature on the heaters and today I am down 750W(ish) on yesterday which is a good start. Hopefully when this weather sorts itself out I can lower them further and save my precious pennies (and help “Save the Planet”!).

→ 4 CommentsCategories: CurrentCost
Tagged: , ,

CurrentCost - Initial thoughts

April 10, 2008 · 12 Comments

There is a small CurrentCost craze going on at Hursley, which involves people setting up their piece of kit and seeing what cool things they can do with the data.

CurrentCost is basically an induction meter. Clamp one end to your electricity meter, and plug in the little lcd display and (fingers crossed) you should start seeing the current electricity usage of your humble abode.

There are a couple of reasons why this is cool. Firstly anyone can set this up. No need for Andy Standford-Clark skills to be up and running with this. Therefore it is something that is accessible to the masses, which is a good thing. Using this unit you can see what happens when you turn lights on, what the dishwasher has done to your power, and from this you could start changing the way you live to try and save money. Secondly (and this is the geeky part) you can get the data from the unit via a serial cable. Every 7ish seconds the unit will send data over the wire in xml format, which you can then do what you like with.

I have already spoken to one Hursleyite that has managed to save about £7 a month as he did not realise that his home hifi was drawing a large amount of power even in standby! I have just had my first full 24 hours of using the kit and will blog about my findings later…..

→ 12 CommentsCategories: CurrentCost
Tagged: