What I’ve been doing recently

Today I found out that an application I built for the iPhone has become available on the iTunes store.  It’s a simple little app to estimate electricity bills for a household.  Check it out on the iTunes store via the following link πŸ™‚ AGL Energy Efficiency
I’ve also been working on the Windows Live Mail compression code some more and have gotten some good results.  Below in an example of what I’m getting

X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0wO0Q9MTtTQ0w9MA==

X-Message-Status: n:0

X-SID-PRA: Daniel Parnell <me@danie******pl <m********.com>-Status: n:0Info: JGTYoYF78jHVrAq/T4xfKLLpTvwPwE0t6g/vyq6tyzbqln5iNnXwcSMg41wQCSulCxd5N8UB57Lq6un/ug7i0YsGX30yo+pm

ReceLjEE7*d: from randymail-a4.g.dreamhostm>-S ([208.97.132.207]) by bay0-mc8-f11.bay00***.hot-a4. ([2*with Microsoft SMTPSVC(6.0.3790.2668);

Thu, 29 Jan 2009 16:06:38 -080


and this is what I should be getting.


X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0wO0Q9MTtTQ0w9MA==

X-Message-Status: n:0

X-SID-PRA: Daniel Parnell <me@danielparnell.com>

X-Message-Info: JGTYoYF78jHVrAq/T4xfKLLpTvwPwE0t6g/vyq6tyzbqln5iNnXwcSMg41wQCSulCxd5N8UB57Lq6un/ug7i0YsGX30yo+pm

Received: from randymail-a4.g.dreamhost.com ([208.97.132.207]) by bay0-mc8-f11.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668);

         Thu, 29 Jan 2009 16:06:38 -0800


I’ve been throttled

OH NO!  I’ve used up all of my download limit for the month and have been throttled down to 64kb/s.  It’s like being back on dialup again πŸ™

localhost.localdomain-billion-month.png

Admittedly it is all my own fault.  As you can see from the chart above there was a period of sustained download earlier this month when I was downloading a very large torrent.

Ah well…  I just have to wait another 5 days for the next billing cycle to kick in to get my speed back to normal.

FreeTDS and my new Mac Pro

I’ve been having some “fun” with my new Mac Pro.  In order for me to be able to use it for my daily work I need to be able to connect to a Microsoft SQL Server instance from the Rails app I’m working on at my day job.  Normally this is just a simple matter of installing FreeTDS, Ruby-ODBC and the Ruby DBI and DBD packages.  When I did this, as soon as I tried to make a connection to the SQL Server instance my application would crash with a bus error!  After a bit of digging around with gdb I discovered that the application was crashing when FreeTDS was trying to deallocate a string using the standard C library memory function free.  The really weird thing is that the string was pointing to a valid string.  I dug a little further and found that if I changed the code that was allocating the string to use malloc and strcpy instead of strdup it worked!  If anybody out there knows why this might make a difference I’d really like to hear from them about it.

Windows Live compression update

I had a bit of time yesturday to spend working on the Windows Live compression reverse engineering.  I successfully decompressed around 20 bytes.  The previous record was 2 bytes πŸ˜‰  There are two parts to the compression.  First is the compressed data and the second is pointers back into decompressed data.  The compressed data is working quite well, but the pointers to repeated blocks that have already been decompressed is off a little so I see some correct data and some rubbish.  Hopefully I’ll get some more time in the next couple of days to work on it some more. 

PSMTabBarControl and Interface Builder 3.0

For one of the projects I’m working on I needed a nice looking tab bar control.  Under previous versions of Mac OS X I used the PSMTabBarControl.  The control is nicely integrated into Interface Builder 2.0, but I no longer have IB 2.0 installed as I’ve upgraded to more recent versions of XCode.  I’ve done a very quick port of the code for IB 3.0 and made it available here on github.

Enjoy πŸ™‚

OS X 10.5.6

As many people are aware Apple released Mac OS X 10.5.6 yesterday.  Unfortunately this broke the HttpMail plugin πŸ™  After a little bit of poking around I found and fixed the problem.  The result is a new release of the plugin 1.53.  

Head on over to my downloads site at http://www.automagic-software.com/
Now, for a status report on Windows Live Mail reverse engineering.  I am still making progress.  I’m not getting as much time to work on it as I would like these days due to having two small children πŸ˜‰  If anybody wants to donate a copy of the Hex-Rays decompiler then I imagine things would progress much faster πŸ˜‰

IT LIVES :)

After a bit of playing about I’ve got my water level sensor working πŸ™‚
I’m using Munin to log the data coming back from the unit attached to the sensor.
The unit is overkill for my needs, but since I had it lying about here and I didn’t want to spend anything to do this job it’ll have to do πŸ˜‰
It’s a nice little PIC based board with 4 analog inputs, 8 digital inputs and 8 mains switchable outputs.  It also has an ethernet adaptor and the software I’m using responds to modbus commands.  I’ve had fun getting everything working.
I’d forgotten how much fun it is to make computers actually do something in the real world!

Some tinkering I’ve been up to recently

I’m working on building a system to measure the water level in my rain water tanks.  Finally today I’ve managed to get my hardware all working, and now I need to build the physical measurement device.  Originally I was going to use ultra-sound to measure the depth of the water but I decided that was a bit too fiddly.  Then I considered using some sort of pressure sensor, but they are a bit on the expensive side.  Finally I came up with the idea of using a variable resistor attached to an arm with a float on the end.  This seems like the easiest and above all the cheapest way to get what I want πŸ™‚

It should be interesting to see how it all comes together πŸ™‚
 

Windows Live Mail

Just a quick note to let everybody know that I’m making good progress reverse engineering the Windows Live Mail protocol.  With the help of a couple of other people I’ve managed to determine the nature of the compression used on the message data.  We’ve successfully managed to build the decompression table and I’m now working through the routine to do the actual decompression.  IDA Pro is an amazing piece of software and I highly recommend it if you ever need to do any reverse engineering of compiled programs.