To synchronize events between Google Calendar and a Windows Mobile device over USB, I wrote a script in python which makes use of OpenSync and Synce to transfer data between Linux and the telephone.

This is quite a hacked together script designed to get the functionality I wanted in a minimal way possible. If you decide to use this script, please make sure you make a backup of your calendar before trying it. There are several missing features, and also bugs, but the information here provides a starting point for calendar synchronization. I accept no responsibility if you lose data through running this script or following the instructions.

Setting up OpenSync/Synce on Ubuntu Intrepid Ibex

This is based on the instructions at the Synce wiki. If you get errors when following these instructions, make sure you don't have old versions of the libraries from the official Ubuntu repositories installed already.

  1. Add
    deb http://ppa.launchpad.net/synce/ubuntu hardy main
    deb-src http://ppa.launchpad.net/synce/ubuntu hardy main
    to your /etc/apt/sources.list
  2. Install the synce HAL information, etc.
    sudo apt-get install synce-hal librra0 librapi2 librra0-tools librapi2-tools
  3. Reboot. Connect your device and run synce-pls, which should output a directory listing showing the device's memory.
  4. Install the packages for OpenSync and Synce:
    sudo apt-get install multisync-tools opensync-plugin-evolution opensync-plugin-synce \
      synce-sync-engine python-opensync opensync-module-python python-rra
    
  5. Run synce-sync-engine.
  6. Create a partnership for calendar synchronization.
    synce-create-partnership "Linux calendar" "Calendar"

Known issues

Calendar synchronization

Click here to download the python code for the synchronization.

Insert your login credentials in GoogleCalendar.py also providing the identifier from Google for the calendar you want to export (See Google's page about exporting an XML feed for more information).

Run synce-sync-engine if it is not already running. The output here should let you diagnose any problems.

Run wmcalsync.py to synchronize events from your Google Calendar to the mobile device.

Known issues