TaW: Week 6 – Arduino Based Syma S107G Tx and Xbox 360 Controller Interface

After the last two TaW items have been less than successful, and as a last minute tie in to the No ‘Air Ambulance Challenge I’ve decided to upgrade one of my old projects.  Rather than an RC car I’ve gone with a Syma S107G 3ch helicopter and standing in for the Netduino is an Arduino.  I had a go at implementing the IR protocol in the .NET Micro Framework but it proved a little tricky.  More information can be found in this post along with a video demo.

Xbox 360 controller interface to enable control of a Syma S107G.
Xbox 360 controller interface to enable control of a Syma S107G.

Subversion to TFS 2012 Migration: Part 2

If you followed the steps in the previous article and everything went smoothly, good for you!  My migration hit a few snags, here are the big issues we hit and how we worked around them.

The first issue we hit was due to the fact we use HTTPS and hit an issue with the certificate, this isn’t immediately obvious from the Integration Platform UI however.  Follow the steps in Martin’s blog entry and you should be up and limping in no time!

That issue out of the way the migration started in earnest and we hit our first code bug in the adapter, it relates to the Subversion version control analysis provider and occurred when a null change set is detected in Subversion.  We added a check for null changesets at line 355 in SubversionVCAnalysisProvider.cs to allow analysis to continue.

SVNVCAP

 

Another issue resolved, migration was resumed.  This was when we hit a really odd issue, we started getting “path not found” errors, upon further investigation we discovered that for some reason there were folders in TFS that included “%20” rather than spaces.  The same folders in Subversion never had these characters so it seems the issue was with the adapter.  We tracked the issue to the BatchedItem.cs file and made the following change to the code to URL decode each path when the string has a value assigned, at which point we had to restart the migration from scratch as the damage was done.  The TFS11 (TFS 2012. codename “dev11”) adapter inherits an awful lot from TFS 2010, hence the TFS 2010 adapter needs updating despite us migrating to TFS 2012.

SVNURLENC

 

The last major issue we hit was another issue with missing files;
“Microsoft.TeamFoundation.VersionControl.Client.CheckinException: TF10141: No files checked in: resolve the conflicts and try again.”

It seems to be caused by a random deletion in Subversion that was somehow out of order and the adapter couldn’t handle it.  Setting the source and target to the same value, that of the TFS checkin rather than Subversion, resolved this “conflict” and the history appears in tact in TFS.  I’ve had to start the migration again and can’t get passed this error anymore so this may not be accurate, see part 3 for an update.  Regarding the confusing conflict resolution system in the Integration Platform, head back to Martin’s blog for an explanation.

The last hurdle wasn’t related to the Integration Platform but I’ll mention it hear for completeness, this blog is as much for my reference as for others after all.  We kept seeing a CRC error popping up in the logs similar to this;
“The CRC in GZip footer does not match the CRC calculated from the decompressed data.”

It seems that this was related to the network adapter on either the TFS box or my desktop, investigations are ongoing but it’s one or the other.  There was an issue in TFS 2010 regarding large files in IIS but it has been fixed and presumably included in TSF 2012, further reading can be found here;

http://social.msdn.microsoft.com/Forums/en-US/tfsbuild/thread/3000b6f7-f029-46e6-98c8-f0f7a21e5fec
http://social.msdn.microsoft.com/Forums/eu/tfswebaccess/thread/c9b773f9-3606-4013-a49a-a72dec34c97e

We haven’t quite finished out migration yet so there may yet be more issues we hit, if so I’ll add another post in this series.  Good luck and I hope this has helped.

Subversion to TFS 2012 Migration: Part 1

When I started at VoiceVault I mentioned I used to support Team Foundation Server in a previous life, it came to light that it has functionality that may benefit the company and make things a bit easier to manage than Subversion.  I was then tasked with investigating migration from Subversion to TFS, my first stop was to have a look at the TFS Integration Platform crafted by the ALM Rangers.  Alas, it wasn’t one of the projects I was involved in while I was a member… 

I thought I’d make notes regarding the issues I hit, along with the solutions, in the hope it’ll help others following the same path.  As the Subversion adapter wasn’t released and is still in “alpha” state it can be a bit tricky to get it up and running as you need to build the platform yourself first.

First of all, get the bits from here;
http://tfsintegration.codeplex.com/

Once downloaded and extracted, you should find a readme file in the “IntegrationPlatform” folder which you should read. Twice.  Maybe three times, just to be sure.  It includes information regarding building the platform specific to setting up the build environment as well as the required prerequisites to build the Subversion adapters.  I’d recommend grabbing the latest bits for each of the prereqs rather than the specific versions listed.  I’ll not add links here as they’ll be out of date in no time.  There are also a couple of batch files in the same location which automates a few of these steps, further details are in the readme file.

Once you’ve followed the above, open the solution in Visual Studio and attempt a build.  You’ll likely hit a few little issues, I recall I did, but they should be simple enough to work around and if not grab one of your devs to give you a hand.  The first time through I hacked and slashed at projects until I removed a number that I thought weren’t required, then once I messed it all up I started again.  One thing you can do is to not build the installers, I deselected these projects from the configuration manager at the solution level as I’d never be installing the platform, just building and copying across the binaries. 

With regards to the database, you can find it in the “Tfs_IntegrationPlatform” project in the “Framework” folder.  You should be able to deploy it from there.  A non-Express instance of SQL Server is recommended as if you’ve a large repository to migrate you’ll hit the size limit of Express quite quickly.  The connection string you’ll need to change for the tool to connect to the database is in the MigrationToolServer.config file, located in the “Tools\MigrationConsole” project.

Right, once you’ve got this far the fun really begins.  Load the TfsIntegrationShell.exe application in the “IntegrationPlatform\Binaries\Debug\Bin” folder, if you’ve a database deployed and the connection string updated you should be presented with the start screen.  Click “Create new” and navigate to the configurations folder, you should find an example Subversion config, then click open.  Select the source and targets then the dialog should change.  You’ll see a tab at the bottom of the screen labeled “xml”, if you have a number of users you wish to map then you’ll need to click on this and edit the <UserIdentityMappings /> section, an example is below; 

    <UserIdentityMappings EnableValidation=”false”>
      <UserIdentityLookupAddins />
      <DisplayNameMappings DirectionOfMapping=”LeftToRight”>
        <DisplayNameMapping Left=”tom” Right=”tfs\tom” MappingRule=”SimpleReplacement” />
        <DisplayNameMapping Left=”dick” Right=”tfs\dick” MappingRule=”SimpleReplacement” />
        <DisplayNameMapping Left=”harry” Right=”tfs\harry” MappingRule=”SimpleReplacement” />
      </DisplayNameMappings>
    </UserIdentityMappings>

Click save to database, things will happen, then click “Start” under “Current Migration” in the left hand menu.  If you are lucky, after a while, your migration will be complete.  If you aren’t then the next article in the series may be of some help as it details some of the issues we hit, along with the fixes and links to the source materials for further reading.

TaW: Week 5 – UPS Cable

I’ve a few weeks to make up for due to the madness of the Air Ambulance challenge but here is the belated Thing for week 5, a UPS cable for my PC at work.  I used a cable from one of my colleagues machines to get the pinout at the RJ45 end, cut a spare USB cable and crimped it.

Alas, I didn’t notice that the original cable had 10 pins and RJ45 only has 8…  Fail!  The thing is ultimately useless but a valuable lesson learned.

Week 5 - Failed UPS Cable
Week 5 – Failed UPS Cable

The Challenge: Context

Two weeks ago today, while drunk, I agreed to do something stupid for charity.  I often do stupid things while drunk, as is the human condition, but when I woke up I rolled with it.  If I’m honest, despite the effort I’ve put into publicising it, I’ve mentally down played it to myself as the latest random thing I’ve got myself roped into.

Fast forward to today and £2060 has been raised with a week left in the campaign, I consider this no act on my part but a sign of the immense generosity of my friends.  I’m not a fan of using profanity on my blog, I can’t explain how amazing this is.

In the passed few days I’ve heard stories from someone who works in my local hospital regarding those brought in by the Air Ambulance, people presumed dead on arrival, who due to the rapid response of TVACAA are alive today.  I’ve also discovered I’d have never met a good friend of mine if not for the services of an air ambulance abroad.

I’m man enough to admit I cry when I watch soppy films, my favourite film is the romantic comedy LA Story followed by BTTF rather than the other way around and I once mounted an attempt to rescue a duckling from a swollen river as I couldn’t bare the thought of it struggling.  Right now I’m numb to the whole campaign out of self defence, not because of the waxing I’ll endure a week tomorrow but because of those the charity I’m supporting work to help and it’s all pretty damn awesome, using the word literally.

I’ve been in first aid situations before and I barely held it together, I can’t imagine what the paramedics of the air ambulance endure but I’m glad they do.  They have my thanks, my respect and hopefully your donations.  If you can, please donate and if you can’t please spread the word.

TaW: Week 4 – RepRap Controller Board

I’ve been working on this for over a week and to be honest, failing.  The driver boards I soldered at the Hackspace were a breeze and despite having the same soldering iron at home now I’m really struggling.  I’m going to head to the space on Wednesday for open hack night, take my kit and ask if anyone can point out where I’m going wrong.

This Thing isn’t finished yet but it’s important to acknowledge issues like this, I’ll update the post once I’ve figured out what I’m doing wrong along with how I improved matters.  In the mean time I’ll start on Week 5 in parallel to try and make up for lost time.  No idea what week 5 will be, it likely wont require soldering though…

No ‘Air Ambulance Challenge

A few weeks back my favoured pub, The Alehouse, was broken into and the charity boxes for the Thames Valley and Chiltern Air Ambulance were stolen.  Fast forward a few weeks and I was there for their winter beer festival, propping up the bar as usual, when a stereotypical question was asked;

How much would it take to get waxed for charity?

Click here to find out!

TaW: Week 3 – Dual Stepper Motor Controllers

After a trip to the Reading Hackspace and a few hours with one of the excellent soldering irons they have I’ve made short work of the two dual stepper motor controllers for my 3d printer.  The only components missing are the drivers which are ESD sensitive so I’m fitting once the main controller board is complete and all three boards are ready to be fit to the printer.

Week 3 - Dual Stepper Motor Controllers

Next up, the main controller board.

Tool Tip: Cleaning A Soldering Iron Tip

Still working on the electronics for the 3d printer, my overdue thing a week, so posting another tip I’ve just discovered regarding cleaning a soldering iron tip quickly.  Simply remove the tip, place it very carefully in the chuck of a cordless drill and spin it against some sandpaper.  I’ve only a cheap iron so no qualms over doing this, for fancier irons you may want to think twice.

There may be good reasons for this being a bad idea and if so feel free to get in touch, until then it seems to work a treat!

Cleaning a soldering iron tip using a cordless drill and some sandpaper.
Cleaning a soldering iron tip using a cordless drill and some sandpaper.

Hope this helps and that I’ve the damn electronics finished soon!

Kitchen Trick: Freezing Pesto and Passata

Between a minor electrical explosion at my local and a string of migraines my thing for week three is taking longer than expected so this week I’m sharing a kitchen trick that works a treat.

I love to cook but live by myself which means that sauces and things in jars often go off before I use them, the worst offenders for this was pesto and Passata.  I’ve discovered that silicon ice-cube trays are brilliant for storing these in the freezer in single serve portions.

IMG_2776

I often take cous cous based salads to work and putting a frozen cube of pesto in to the box in the morning will help keep the food chilled yet defrost by lunch.  Likely it doesn’t help that much but it can’t hinder matters.

The next post should be a Thing a Week post back to the more geeky topic of 3d printing as I’m currently working on the electronics for my 3d printer.  Stay tuned!