Sync Windows Mobile with Linux

Even after using Linux for a long time, I’ve allways been having Outlook on my Windows XP/Vista installations just for the sake of synchronising all my PIM Data (Contacts, Tasks, Calendar, E-Mail) with my HP Ipaq and my Sony Ericsson Mobile Phone. When I found out about the SynCE project, I decided to give it a try and after carefully backing up my data on the Pocket PC, I decided to reset my PDA to the factory state (I’ve been planning to reset the PDA for a long time as the Microsoft OS became too slow for normal usage) and sync my Evolution address book with it. By the end I was surprised to find out that the process of synchronising works better with Linux. (I used to have a very unstable connection with Activesync/Windows Mobile Device Center. One out of maybe thirty attempts used to be successfull). So I’ll guide you on how i got it to work.

FYI. The PDA is a HP iPaq hx2490 running Windows Mobile 5 Pocket PC. My laptop runs a minimal install of Ubuntu 8.10 8.04 with Xfce.

Do not plugin the cable/cradle.

First, Add the following lines to the /etc/apt/sources.list file

deb http://ppa.launchpad.net/synce/ubuntu/ hardy main
deb-src http://ppa.launchpad.net/synce/ubuntu/ hardy main

Then run

sudo apt-get update

We dont want the ipaq kernel module to interfere. So first execute

rmmod ipaq

to remove the module from memory. And then add the following line to the /etc/modprobe.d/blacklist file

blacklist ipaq

Once you’ve done that, install synce-sync-engine with the command

sudo apt-get install synce-sync-engine

This should install all the dependant packages too. A package called odccm is also installed and started as a service. The output of this package can help us with determining a proper connection. Now run the following commands to stop the service and start it again in the forground.

sudo /etc/init.d/odccm stop
sudo odccm -f

Now turn on your Windows Mobile Device and connect it using a USB Cable/Cradle. You should see some output similar to this (a few values might differ)

** (process:15855): DEBUG: PDA network interface discovered! udi='/org/freedesktop/Hal/devices/net_80_00_60_0f_e8_00'
** (process:15855): DEBUG: device_info_received
** (process:15855): DEBUG: 94 e4 62 9b 2c 11 db a6 39 e4 73 9a 34 55 91 00 05 00 00 00 02 00 00 00 0b 00 00 00 48 00 54 00 43 00 5f 00 54 00 79 00 54 00 4e 00 5f 00 49 00 49 00 00 00 05 02 54 06 11 0a 00 00 05 00 00 00 d3 77 79 79 00 00 00 00 0f 00 00 00 50 6f 63 6b 65 74 50 43 00 53 53 44 4b 00 00 06 00 00 00 4b 61 69 73 65 72 00 02 00 00 00 05 00 00 00 02 00 00 00 05 00 00 00 02 00 00 00 00 00 00 00 10 00 00 00 0c 00 00 00 5d 00 00 00 01 00 00 00

If you get a similar output, you are ready to continue to sync. If you dont see this, but get a line something like this
** (process:15855): DEBUG: PDA network interface discovered! udi='/org/freedesktop/Hal/devices/net_80_00_60_0f_e8_00'

then try the following

  • Make sure the ipaq module is not running by using the lsmod command
  • Check your PDA for a setting on USB cable connectivity. It should be set to USB RNDIS mode. Some Windows Mobile 5 devices and all Windows Mobile 6 devices have an aplet called Activesync mode or something similar to check/change this. (Mine didnt have this when i bought it, but i found that it had been added during some of my experiments with different cabs :P)
  • Check http://www.synce.org/moin/SynceInstallation/Connecting for more trubleshooting options. Especialy the Motorolla Q.

Once you are connected, Unplug your device. Now Open another terminal (or switch to another prompt) and execute

sudo synce-sync-engine

Now plugin your device and you should see some output on the synce-sync engine console and the odccm console. Open yet another terminal and install the following.

sudo apt-get install libopensync0 python-opensync multisync-tools opensync-plugin-synce opensync-plugin-evolution

Once the install is over, run the following commands to create a sync pair between evolution and synce.

msynctool --addgroup synce-sync
msynctool --addmember synce-sync synce-opensync-plugin
msynctool --addmember synce-sync evo2-sync

then to synchronise run

msynctool --sync synce-sync

So there we should see some more text being prented by synce-sync-engine and we should land with a happy Sync pair.

Also look into this page… http://www.synce.org/moin/FrontPage

I might have missed out a point or so… If so do point it out… but this was the only wiki i read through to get this to work

Similar Posts:

10 Responses to “Sync Windows Mobile with Linux”


  1. 1 Ashwin

    dude..i don`t have a HP iPaq…
    wat do i do ??

  2. 2 Suraj

    Hmm… any windows mobile based device will work….

    Anyway, now you really have a goot reason to buy a HTC Diamond. :P

  3. 3 chuck

    i get
    SynCE sync-engine starting up
    2008-07-11 21:13:44,356 DEBUG syncengine : running main loop
    2008-07-11 21:13:44,356 DEBUG syncengine : creating SyncEngine object
    Traceback (most recent call last):
    File “/usr/bin/synce-sync-engine”, line 149, in
    engine = SyncEngine(configObj,mainloop)
    File “/usr/lib/python2.5/site-packages/SyncEngine/kernel.py”, line 71, in __init__
    dbus.service.Object.__init__(self, dbus.service.BusName(DBUS_SYNCENGINE_BUSNAME, bus=dbus.SessionBus()), DBUS_SYNCENGINE_OBJPATH)
    File “/var/lib/python-support/python2.5/dbus/_dbus.py”, line 217, in __new__
    mainloop=mainloop)
    File “/var/lib/python-support/python2.5/dbus/_dbus.py”, line 106, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
    File “/var/lib/python-support/python2.5/dbus/bus.py”, line 125, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
    dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ExecFailed: Failed to execute dbus-launch to autolaunch D-Bus session
    synce-sync-engine
    when i try to start

  4. 4 Suraj

    @chuck
    What linux distro do you use??

    I guess there is a problem with either dbus or python on your system.

  5. 5 marcello

    Hi admin, do you have verified that this method works for HTC Diamond?

    thanks

  6. 6 Suraj

    No marcello, I dont have a HTC Diamond to verify this. But i’ve heard this works with other phones based around the Windows Mobile 6 OS. So it should work with the Diamond.

  7. 7 keteflips

    Hi.

    I have a HTC Diamond and I cant follow this guide.
    The pakage odccm its not compatible with the pakage synce-sync-engine.
    When I install one the other muts be desintalled by the dependencies.

    I have Ubuntu 8.04.1

    Thanks dudes

    Sorry for my english.

  8. 8 Suraj

    Hi keteflips,

    Please make sure that the apropriate entries are added to your sources.list file. then run apt-get update.

    You might face the problem if this step wasnt completed properly.

    Cheers!!

  9. 9 Paul

    Hi Suraj,

    I have an Ipaq 112 and have it syncing all with evolution except email, does this method also sync email?

    thanks
    Paul

  10. 10 Suraj

    Paul,

    No. This method dosent sync mail :(
    I use Gmail’s Imap on my PPC to read my email. So my mailboxes are allways in sync.

    Regards,
    Suraj

Leave a Reply

This site is using OpenAvatar based on