Wednesday, 26 August 2009

Extracting CAB files for Windows Mobile without ActiveSync

I received an old bluetooth GPS that I write about here. To install the software, I simply had a Windows (not mobile) executable. I don't have Windows and ActiveSync installed, so how do I go about getting the contents out of the executable and onto my Windows Mobile phone?

In most cases it's quite easy! Here are some tips:

Try 1: Is a plain CAB alternative offered?

This may seem obvious to some, but check if the software is offered in two forms - as a Windows executable, and a plain CAB file download. Browse around the website or CDs for files ending in .CAB

Try 2: Is it a self-extracting zip file?

This is the easiest form of executable! Zip files can be made "self extracting" by containing both executable code and the embedded zip structure. To find out (from Linux, Unix, BSD etc) just run an incantation of zip that understands dos-based PKZIP archives, such as info-zip. (You may have this version of zip already).

info-zip comes with zipinfo which lists information about zip files. In my case, the TomTom executable is called navupd521.exe
$ zipinfo navupd521.exe
Archive: navupd521.exe 4409856 bytes 5 files
-rw-a-- 2.0 ntf 4762417 b- defN 16-Jan-06 13:17 setup.apk
-rw-a-- 2.0 ntf 81 t- defN 23-Feb-05 23:28 cp.txt
-rwxa-- 2.0 ntf 2498560 b- defN 16-Nov-05 15:49 setup.exe
-rw-a-- 2.0 ntf 0 t- stor 24-Feb-05 11:05 TomTom Update.cid
-rw-a-- 2.0 ntf 22 t- stor 11-Jul-05 08:54 ttn.txt
5 files, 7261080 bytes uncompressed, 4377788 bytes compressed: 39.7%
If you see a list of files, then the executable is understood by zip. But alas! there's no CAB files in here. Unless they're in that setup.exe...
$ unzip navupd521.exe
Archive: navupd521.exe
inflating: setup.apk
inflating: cp.txt
inflating: setup.exe
extracting: TomTom Update.cid
extracting: ttn.txt
$ ls
cp.txt setup.apk TomTom Update.cid
navupd521.exe setup.exe ttn.txt
$ zipinfo setup.exe
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
zipinfo: cannot find zipfile directory in one of setup.exe or, and cannot find setup.exe.ZIP, period.
And here's the end of the line! The setup.exe file is not a zip archive (even though they sometimes are called setup.exe).

Try 3: Temporary files

Use wine to start the install process, and look for temporary files.

In my case, when I run wine navupd521.exe:
  • While the TomTom installer is complaining that your computer does not support the device blahblah or somesuch rubbish, look for a directory in <>/windows/temp that wasn't there before. If necessary, create an index of all the files in your wine c drive before you run the installer. Then do it again with the installer running, then check for differences. There should be a temporary file or directory somewhere!
  • copy the entire directory (for TomTom that's "<.wine>/drive_c/windows/temp/WZSE0.TMP/") to somewhere safe
  • Exit the installer, and search for CAB files in the directory you just copied.
  • For TomTom you will find:
  • Choose the right CAB file matching your device by name or directory. I'm going with the pocketpc directory for my pocketpc!
Now all that's left is to copy the CAB files to your device using bluetooth, USB, or storage card; then select them in Windows Mobile to start the install.

(This example is for the TomTom Navigator 5 December 2005 update. After installing your original TomTom Navigator, run these CAB files to update to the new version)

And that's how you can get CAB files without Windows!

Tuesday, 25 August 2009

What do do with a bluetooth GPS

I received a bluetooth GPS, by TomTom, which came with TomTom Navigator 5.

It installs on my O2 Windows Mobile 5, it pairs, it works, but there are no maps for Australia. It is, after all, from 2005.

(I've made some notes on extracting and installing CAB files in Linux without ActiveSync, which you might be interested in).

I've searched for map downloads, but as far as I can tell, they're not available for Australia for this version of Navigator. Nor are TeleAtlas maps, which are supposedly compatible.

So the question is: What do I do with this bluetooth GPS? It works fine with my phone, and no doubt would work with my laptop. I don't want Google Maps, because it doesn't give voice guided directions, nor does it allow you to download maps. (You have to be within range of a 3G tower at all times).

I would have liked a voice-guided navigator for my mobile, but I can't find one. Nor do I want to hack or download the latest Tomtom Navigator, or equivalent.

Your suggestions please! The more unusual the better! Duct tape required! Perhaps a GPS-aware back to base alarm for my car? You think of something...

Ideas so far:

  • Download a compatible program and create data for OpenStreetMap. (OpenStreetMap is creating a royalty free and open GPS street map of the world, but they need GPS data). I could permanently mount my GPS and phone in the car, and upload the data from time to time.

    The only problem is Yahoo has provided some free data already which covers most of the city I live in...

  • Sell it (no box, CD's, used condition, I might get $20USD...)

  • (Waiting for idea #3)

Wednesday, 12 August 2009

Dell Inspiron 9100 infra red port

My old Dell laptop has a built-in infra red port on the front. In the 4 or more years that I've had it, I've had no need for the port.

Now that it is becoming my (MythTV) media centre, the infra red port becomes useful! Here are the steps I used to get it working. I had some small hassle with the built-in serial port driver taking over.

  1. First, make sure it's enabled in the BIOS, and take note of the serial port it's attached to.

    There are no other serial ports on this laptop, so anything that looks like a serial port is likely to be the infra red port.

  2. I used lirc to receive and configure the port.

    In Gentoo enable the lirc global USE flag (global means put it in make.conf because many programs can make use of it). Also add this line to make.conf:

    In other distros, you have to somehow build the sir driver.

    Also add the lirc USE flags hardware-carrier and transmitter. You can do this in /etc/make.conf, or better use /etc/portage/package.use, or better still, make package.use a directory, and add the file /etc/portage/package.use/lirc-20090806 with the contents:
    app-misc/lirc hardware-carrier transmitter

    (You can of course make any-named file in /etc/portage/package.use)

  3. (re)compile! This includes lirc, MythTV, mplayer and anything else that might be able to take advantage of your new lirc USE flag.

    In Gentoo, you could use the command:
    emerge --update --newuse --deep world
    to find and rebuild all packages that have changed USE flags.

  4. Now you need to load the lirc module. For com1, run this command:
    modprobe lirc_sir io=0x2f8 irq=3 threshold=5

    options lirc-sir io=0x2f8 irq=3 threshold=5
    Also add this line to remove any conflicts:
    install lirc_sir setserial /dev/ttyS0 uart none; modprobe --ignore-install lirc_sir

    Make sure you run update-modules; then unload and reload the lirc_sir module after any changes to lirc.conf

  5. Test your configuration with mode2. Run mode2 as root and then press buttons on a remote. You should see some output like
    pulse 591
    space 96900
    pulse 9042
    space 2277
    pulse 591
    space 96900
    pulse 9042
    space 2273
    pulse 594
    space 96901
    pulse 9042
    space 2274
    pulse 593

    If not, make sure you've unloaded any serial related module. Check dmesg after loading the lirc module to make sure your hardware is recognised:
    $ dmesg | grep lirc_sir
    lirc_sir: I/O port 0x03e8, IRQ 4.
    lirc_sir: Installed.

  6. You're almost there! Now you can download remote codes from the LIRC website, or make your own with irrecord. I made my own, since my remote wasn't there.

    Copy the remote code file to /etc/lircd.conf

    Leave the /etc/conf.d/lircd blank or all commented out if you have the same hardware

    Start lircd: /etc/init.d/lircd
And that should be that!

Many thanks to:

Wednesday, 5 August 2009

SynCE 0.14 updates

SynCE 0.14 ebuilds are now available in the overlay for all SynCE packages. (See the instructions here for details)

You should have no trouble compiling and installing (of course, let someone know if you do!)

Most of the SynCE problems seem to come from configuring and using (or trying to). So before you report any bugs, please try these steps. Note: this is a short summary! Please read the SynCE wiki for full instructions.
  1. First verify you have version 0.14 of everything, using eix, equery, genlop or whatever.
  2. Backup all your Contacts, Calendar, Tasks and Files. (I use Sprite Backup that came with my Treo Pro). This is important as Windows Mobile 6 will delete all data associated with a deleted partnership.
  3. Remove the multisync group (your command may vary)
    $ msynctool --delgroup synce-sync
  4. Remove the partnership
  5. Delete the ~/.opensync and ~/.synce directories (copy any local config files first)
    $ rm -rf ~/.opensync ~/.synce/*
  6. Create a new partnership (change the name and objects to synchronise)
    $ "TreoPro" "Calendar"
  7. Create a new opensync group, and add members (alter members to suit your needs)
    $ msynctool --addgroup synce-sync
    $ msynctool --addmember synce-sync evo2-sync
    $ msynctool --addmember synce-sync synce-opensync-plugin
    $ msynctool --showgroup synce-sync

    If these steps fail, check the output from --listplugins
    $ msynctool --listplugins
    Available plugins:
If you upgrade sys-apps/hal to >= 0.5.13 (which is now in ~x86) you will have to compile synce-hal again. This is because the hal scripts directory has changed, and synce-hal only detects this at install-time.

Errors similar to were fixed for me by following the steps above.

Let me know of your success / failure. SynCE 0.14 will be in portage in the fullness of time!
Copyright 2009 Another Blog. Powered by Blogger Blogger Templates create by Deluxe Templates. WP by Masterplan