Wednesday, February 4, 2009

Been off the air for a while

I've been on the D/L since I broke a hand and ran into other fun problems. I will start posting more regularly once the whole situation gets back to "normal"... whatever that is :)

Windows Mobile 6: GPS device settings lost after installing FakeGPS

This is not the usual subject matter, but since it happened to me, and I could not really find a solution through the great Google, here it is:

If you happen to develop mobile apps, and you're tinkering with location-aware apps, beware that if for some reason you install the FakeGPS utility on the actual target(a bad idea), it will happily disable your integrated GPS device! The best part is, the uninstaller will not restore your old settings, and you will then have one of two choices:
  • Hard-reset the device (and wipe out everything)
  • Roll up your sleeves and modify the registry
The first option was not acceptable for me (although I did a full backup in expectation that I might have to), so I looked at the second option.

The "good" thing is that WinMo6 has the concept of an intermediate driver that allows you to swap between device ports while shielding the apps from the changes. It's basically a COM port proxy. The FakeGPS utility overwrites the default GPS driver entry for the intermediate device driver.

In \HLKM\System\CurrentControlSet\GPS Intermediate Driver\Drivers, change the CurrentDriver entry to read:

GPSOneDevice

Exit whatever registry editor you're using, then power cycle (not a soft reset) the device to ensure the registry hive is flushed and saved.

Once you restart the device, the GPS should work again.

Later,