My Porsche 944 S2 – The Journey Begins

Time for an update I think ūüôā

I’ve had the 944 for around 10 months now and covered about 3200 miles in it. It’s running really well and it is feeling like it is getting better the more I use it, probably because it is actually being used on a regular basis. I have been really surprised at just how usable the car is day to day. Its ride is fantastic for a sport car and the balance it has round corners really makes it an enjoyable drive when pushing on. While I not really concerned about the fuel consumption it has been returning me a solid 28 mpg which I was quite happy about considering how old the car was. However, filling up can be painful on the wallet as it has a 85 liter fuel tank :P.

I managed to find out what the ‚Äúhot start‚ÄĚ issue was. Turns out it is nothing mechanical or to with the engine. Its the old alarm/immobiliser system. I think there is some kind of earth on in the drivers side door as the car will start without fail if the drivers side door is left open. I’ll get it looked into at some point as it would be nice to keep the original alarm system on it. But for the time being it’s not too much of a hassle to leave the door open when starting the car.

Replacing the rear seal on the glass hatch has stopped the squeaks coming from that area. I’ve also had the sides and rear of the car resprayed as there was some small areas of rust forming in sill end of the arches (This can be seen in the last picture in the OP). This also had the bonus of clearing up 23 years of car park chips down each side of the car so it looks awesome now. All in the repaint cost ¬£900 from a local body shop which I thought wasn’t too bad.

The next job on the car is to get some new tyres for it and get a full suspension geometry done. While it handles great now, this will hopefully sharpen everything up so it is as good as it can be. The other thing that I have been meaning to do is to fix the digital clock in the dash. These always break on the 944 and 968 but they cost ¬£300 new from Porsche. Needles to say I wasn’t paying that so I’ve got a kit from eBay to fix it for ¬£40. Hopefully it wont be a fiddly job :p.

One of the other things that was bothering about having an older car was the lack of Bluetooth in it. I didn’t really want the replace the stereo as it looks quite cool so I managed to find a Bluetooth cassette adapter. This allows me to take phone call hands free and also stream music from my phone through the car speakers.

IMG_2177

However, to get the full 80’s experience I also had to purchase some old cassettes ūüėÄ

IMG_2176

Here is how the car is looking now:

IMG_2169

IMG_2165

IMG_2175

IMG_2172

IMG_2167

IMG_2163

Selecting from a # temporary table via a stored procedure into an XSD table adapter

When making complex stored procedures it is sometimes necessary to aggregate your results into a temporary table before you do your final select. This approach will work fine until you try to add this stored procedure to an XSD table adapter. Doing this will normally result in the following error message

Generated SELECT statement.¬†Invalid object name ‘#temptable’

This error makes sense as visual studio will not be able to get a definition for the table to hard-wire up the table adapter.

However, if you add the following code to the very top of your stored procedure it will work.

I have no idea why this work but it does. If you know why it works I would be very interested to know why in the comments below.

My Porsche 944 S2 ‚Äď Project Log – Introduction

About a month ago I purchased a 944 S2 mainly as a weekend toy to use alongside my GT6 but also as a car that I could use everyday when I wanted a change from my Abarth. It took months of searching (4 to be exact) to find this car. I wasn’t set on an S2 when I started my search as I was open to any of the models. I ‚Äútest drove‚ÄĚ a ’86 turbo for 500m and then the gearbox gave up and saw some others but they were all in quite bad condition despite the pictures looking good on the adverts (there is a lot of rubbish out there). After travelling over most of the south of England most weekends over 4 months this one came up for sale 5 miles down the road from where I live (bloody typical). I snapped it up straight away as one this good, for the price I paid for it, doesn’t stay around long.

The car is a standard 944 S2 with a couple of options (Extended cloth seats, upgraded stereo which has been taken out I think) and 127k on the clock. It also still has its original tool kit, tyre compressor and spare wheel which are quite hard to come by.

IMG_2086

IMG_2087

It is even has a tape deck ūüėÄ

IMG_2084

Needless to say as with most 23 year old cars there are a couple of things that need sorting on it but it is a very, very good base from which to start from. The car is solid with no rust on the sills and all of the paint looks original (apart from the sunroof which has been repainted). There are 23 years worth of chips on it but it cleans up well.

The car does seem to have a hot start issue. I’ll drive the car for 30 mins and stop off somewhere, come back to it 2 hours later and it wont start first time. I have changed the DME relay but this had no effect so I suspect it may be some sort of thermostat issue as it was running a little hot today (first nice day of the year). So this is something I’ll have to look into. I have also purchased a box of goodies which includes:

  • A new accelerator cable clip
  • Rear boot hatch seal
  • Real lock seal
  • A book of specs (Threads and torques of certain bolts nuts etc…)
  • Touch up paint
  • Some new front bulbs

IMG_2074

I’ll try and keep this thread up to date with the latest work on the car

IMG_2091

IMG_2090

IMG_2089

IMG_2080

IMG_2079

IMG_2077

IMG_2075

Dynamically calling a web service without a web reference in C#

Adding a web reference to your C# project and keeping it up to date, especially in times where many changes are being made, can be very tiresome. It occurred to me the other day that it must be possible to call a service on the fly in C# code using refection. Surely¬†this functionality is included in the .Net framework. I was correct, it is, but it is not too well documented (Probably because it is slower at executing when compared with using a web reference – reflection etc…). However sometimes flexibility is more important than speed so I decided to look into implementing a solution.

Initially I had tired to read in the service’s WSDL via the ServiceDescription¬†and parse it, however this proved to be very problematic and slow.¬†Then in my travels around the many useless Google results I came across and Article on CodeProject.com¬†by Ehsan Golkar. In this article Ehsan uses the¬†ServiceDescription¬†but loads the output into a ServiceDescriptionImporter. This then allows the creation of a compiled¬†assembly into memory that will interface with the web service. Ehsan code seemed rather hard wired to his UI so I have taken the liberty to create a class that makes its operation much more generic.

Here is my Visual Studio solution which includes a test web service and a win forms application with uses ServiceInspector to call the test web service.

VS 2012 Solution Files for ServiceInspector

Triumph GT6 Project Log: Entry 1

Noting too major has needed to be done on the car and it spent most of its time at shows, meets and being driven at the weekends throughout the summer of 2012 (Pictures at the bottom of this post).

I did however manage to track down why the car got so hot. The thermostat was not fully opening so it needed to be replaced. A simple job I thought. All I need to do is open up the housing an put a new one in. Oh no, nothing is ever that simple on this car :(. When I went to unbolt the housing the bolts has seized. This was not unexpected and just applying some heat should get them out. Nope that didn’t work either and in the end the bolt sheared off. S***!

IMG_1942

After various attempts at getting the stud out it was clear it would have to be drilled out. After doing this we had to use a tool called a helicoil as the original thread was destroyed.

IMG_2026

This tool works by drilling a hole which is larger than the original and threading it. Then one of the ‚Äúsprings‚ÄĚ that you see in the picture above is screwed down this. While it is hard to tell from the pictures the cross section of the spring is a diamond shape so it will screw into the larger hold and create a thread of the original size down its centre. Using this method the old bolt came out and allowed us to fit the new thermostat. While doing this I also replaced the top thermostat house as the metal had become brittle. Annoyingly this small housing cost ¬£45 but I guess that is preferable to it failing.

The MOT came around in the autumn and it got through with only two advisories.

  1. Anti-roll bar bushes on the far side being a bit loose.
  2. Front brakes not being balanced.

Fixing the anti-roll bar was pretty none eventful however pushing rubber bushes down it was a little time consuming. Here is the bar when I took it off and before it was repainted (Obviously the kitchen is the best place to do this sort of work :D).

741170_782258129135_2072382550_o (1)

Fixing the front brakes turned into quite an annoying job but this time it wasn’t that cars fault. My initial thought was just to change the front brake pads as they were most likely worn out. After jacking the car up and taking the old pads out it was evident that the old calipers were going to need replacing as one of the pistons on each side had seized. So I ordered a set of brand new calipers along with some braided hoses for the front and rear. Swapping over the calipers wasn’t too bad just a little messy. Anyway I got them all fitted

IMG_2001

IMG_2002

IMG_2003

The hand brake was then adjusted as the cable has stretched a little. This is done via this square adjuster on the back of the brake drum.

IMG_2005

Bleeding the brakes was a massive pain as there was some air trapped in the tubes so I decided to let the car settle and come back to it the next day. This where things got interesting as when I came back to the car the next morning there were two puddles of brake fluid under each of the front wheels. I initially though it was some left over fluid from the bleeding but I had wiped the calipers clean and after leaving it again for another half day it was obvious that both of the new calipers were leaking!! After some reading around it tuns out that I’m not the first to experience this with these new calipers. Another example of china chucking out poorly made parts :(. So some original re-con Girling calipers were purchased and fitted on. Bleeding this time was quite easy with no trapped air which was a bonus.

The car has had a bit of a tune up as well due to the car running much cooler now. I still haven’t got it quite right but the engine sure does go now. 40 ‚Äď 70 is suprisingly fast for a 46 year old car. I’ll have to get a video of it at some point.

The next thing to do is to replace the seat with some are are more comfortable. The current ones are period styled bucket seats which not very good over long journeys. I have purchased a set of original reclining seats but these will require recovering as they are knackered.

IMG_1955

The seat re-con kit (foams and covers) cost me ¬£260 which I didn’t think was too bad.

The other thing the car needs is some body work doing to it. The paint has seen better days and there is some rust coming though on the front and rear arches. So a respray and body work will be needed, not looking forward to that bill as going to be around £6000.

Anyway, the car will be used over the next few months. It will be at the Silverstone classic on the Triumph Sport Six stand as well as going to some pistonhead events as well.

Pictures :).

DSC_0104

DSC_0103

My ideal two car garage. I need one of these Ginetta G4s in my life

OLYMPUS DIGITAL CAMERA

How to stream media to an Android device over LAN or the Internet

A couple of weeks ago I purchased an Android tablet (The Google Nexus 7 which is excellent btw). One of the first things I wanted to do with it was to be able to stream my music and films to it over my home network. I¬†naively thought something like this would have been supported as standard in the latest version of¬†Android¬†(v4.2.2 at the time of¬†writing) but it isn’t. To get this working there are a number of steps that you will have to follow which I will outline below.

The first step is to set up a media server. Now what do I mean by this. Well ideally you want some software that can interface with all of your devices (not just Android). There are a set of networking protocols that allow this which come under the Universal Plug and Play (UPnP) system. So our server will have to support these. Also, many modern devices also support DLNA (Digital Living Network Alliance). Most modern TVs, games consoles, mobile phones and many more devices are DLNA certified so it would be ideal if our server software can interface with devices as well. After doing a bit of searching I found the Universal Media Server. It is a DLNA compliant UPnP server that is written in Java so it will work on Windows, Linux and OSX. After installing UMS you will be presented with the form below:

Universal Media Server

There are many things you can configure but the main thing we want to look at are under the “Navigation/Share Settings” tab. Here you can choose the folders you want to share and I also checked the “Hide #–Transcode–# Folder” option as you don’t want these cluttering up your view of the files.

transcode

Once you have made your changes to the sever settings, click “Save” at the top of the form and then restart the server. You now have a media server that is ready to serve all of your selected media over your home network (Don’t forget to add in firewall exceptions so Java can¬†communicate¬†through it). If you have an Xbox you will be able to see this server under “TV & Movies” -> “My Video Apps” -> “System Video Player”. You will then¬†prompted¬†to select a media source and the UMS should now be showing. You will then be able to play music and video through your Xbox so long it supports the format of media you are trying to play. However, this doesn’t help with my Android tablet I hear your cry. Well, to connect into the UMS that you just set up with an Android device you will have to download an app from the Google Play Store. There are quite a few apps that will do this however the one I would recommend is BubbleUPnP. BubbleUPnP is a¬†fully featured UPnP/DLNA Control Point and UPnP Media Renderer as well as an actual UPnP Media Server as well. The free version of this app will allow you to connect to a media server over your LAN only. If you want to connect to your media over the Internet via it you will have to pay for the fill version which is around ¬£3 at the time I am¬†writing¬†this blog. To connect BubbleUPnP to your UMS that you just set up go to the “Devices” tab. Here you will see all of the UPnP/DLNA servers on your network.

Screenshot_2013-03-23-15-06-30

You may have noticed a couple of things from the screen shot above. Firstly that my Xbox is listed in the renderers. A renderer is where the media will be played, so if I select “Local Renderer” it will be played on my tablet, if I select “Xbox 360” it will be played on my Xbox. Also if you have a TV with DLNA capabilities and have set it up on your home network it will also show on this list. This is how BubbleUPnP acts as a UPnP/DLNA control point allowing you to wirelessly choose where your media is played. You may have also noticed that my UMS that I set up is listed twice. The first UMS in this list is my tablet accessing the server over the LAN, the second is it accessing it over the internet. In this next section I’ll¬†explain¬†how to make your UMS¬†accessible¬†over the Internet.

The developer of BubbleUPnP has also made a bit of software called BubbleUPnP Server¬†that sits over the top of our UMS that we set up earlier. BubbleUPnP Server allows one or more UPnP/DLNA media servers to be broadcast over your internet connection so you can have access to your media anywhere in the world. Installing BubbleUPnP server is straight forward however setting it up can be a bit tricky if you are¬†unfamiliar with your router settings. However before setting up your router it is best to set up the BubbleUPnP server. Once it has been installed if the server management hasn’t opened up in your browser double click on the short cut it will have made on your desktop. You will then be presented with a page like this:

bubbleupnpserver1

This screen shows your external IP address (You will use this to connect to the server) and the ports that it will be running over. There isn’t anything you can change here but this page will be useful so we will come back to it later. The first thing you want to do is password protect your server otherwise anyone will be able to connect to it. Not doing this would be bad as not only would it be breaking the law in some countries but also it will eat up your¬†internet connections¬†upload bandwidth as people you¬†don’t¬†know can access all of your media. To do this click on the “Network and Security” tab.

bubbleupnpserver2

Here you can set up a Login and Password. These will be required when connecting to this server. Secondly you will have to say which media server you want to broadcast. This is done under the “Media Servers” tab.

bubbleupnpserver3

Once this has been done the server is good to go. To make this server visible to the outside world you may have to forward some ports through your router. The ports you will have to forward are 58050 (for HTTP traffic) and 58051 (for HTTPS traffic). Most modern routers have this¬†capability¬†so you will have to consult with the routers user manual if you don’t know how to do this.

If you want to connect to this BubbleUPnP Server through your Android tablet you will have to purchase the full version on BubbleUPnP on Google Play. Once you have done this go into “Settings” -> “Network & Settings” in BubbleUPnP on your Android device. Select one of the three “Unset” options and you will be able to enter in the¬†connection¬†settings. This is where the first “Status” page from BubbleUPnP Server will come in handy.

Screenshot_2013-03-23-15-18-39

The server address will be the in this form http://#ExternalIP#:58050 or for https https://#ExternalIP#:58051. You will also have to enter in the login name and password you set up in the BubbleUPnP Server settings. If you test the setting you have entered you will get a success or failure response. If you get at failed response then it will most likely be because you have entered in your IP address incorrectly or there is some not right in your router settings. If the connection is successful you will now be able to access all of your media from anywhere where your Android device has an Internet connection. The server will now be listed in the Libraries list and you will be able access all of your shared media files under the Library tab in BubbleUPnP.

Hopefully this guide will be useful and save someone a lot of time as this took me a good couple of hours to research all of the options and to get it all set up.

N.B. It is worth noting that streaming FLAC music files or HD movies over the Internet to your tablet will only work if your have a seriously good Internet connection as they will most likely use up all of your available upload bandwidth.

Changing C# Dataset (XSD) Connection Strings

One thing that I have often found I have needed to do when programming is to change the connection string properties of an dataset table adapter or queries table adapter. Allowing changes to the connection to be made programmatically can be very beneficial. For example time-outs can be controlled and the database or SQL server instance can be changed on the fly.

The usual way of accessing the connection is the make a partial class on the adapter that exposes the properties that you want to have access to. While this method does work it is not very generic and requires partial classes to be made and maintained. This is OK if you have a small set but can become an unnecessary overhead if you have a large collection of adapters. As such having a generic method of solving this issue was required.

The first thing we have to do is make connection and connection modifier properties on the adapter public because by default they are set to internal.

XSD Connection Moddifier

Next we need to make use of the .Net reflection¬†library. This will allow us to make a generic method that will work over all of the XSDs strongly typed datasets. Due to the way the table adapters and query table adapters are generated I created two methods, however if required I’m sure they could be combined.

Hopefully this code will be helpful to some people as I could find very little online on how to do this.

Hello world!

For a while now I have entertained the thought of doing a blog. I had previously not considered doing one as I wasn’t sure I would get anything out of it. However, after some thought I figured that, in a kind of selfish way, it would help me organise my thoughts and ideas on some subjects that I hold dear to me.

So here I am, sitting here at my computer typing this out with the world of blogging laid out before me. Hopefully this wave of confidence that has got me this far does not fade and leads me to write some interesting articles :).