SynCE with Windows Mobile 5/6/6.1 on Ubuntu
This guide is for both Ubuntu 8.04 (Hardy) and 8.10 (Intrepid) and 9.04 (Jaunty). Just make sure that you use the right name when it is mentioned.
Important note: When you have enabled KDE4 PPA's in ubuntu, there is a big chance things will not work for you with opensync part for the actual syncing. The reason for this is that in those repositories, KDE4 depends on an experimental version of opensync which is not backwards compatible.
Important note: If you copy these instructions to your own page, or to a forum, please always keep a link to these original instructions
Contents
Setting up connection between device and computer
Setting up the device correctly for connections
With the introduction of Windows Mobile 5, microsoft introduced a second way of connecting windows mobile devices to the computer:
- There was the legacy way, used by wm2003 and earlier devices which uses the ipaq kernel driver to communicate via PPP over serial over USB.
- The new way is to use the RNDIS driver, which is actually ethernet over USB. It is this RNDIS way that is the preferred way for connecting now.
On most windows mobile 6/6.1 devices ans some windows mobile 5 devices, the way the device tries to connect can be chosen by going to:
Start -> Settings -> Connections -> USB
By checking the checkbox, the RNDIS way will be used, which should be enabled. Make sure that the checkbox is checked.
Also, make sure that you have ActiveSync on the device setup to work on USB connections. You can ensure this by going to:
Start -> Programs -> ActiveSync -> Connections
In that screen, the checkbox should be checked, while in the Combobox there should be something like USB.
Setting up your computer correctly
First you will have to add additional package repositories, this is done via the following steps:
Go to System -> Administration -> Software Sources
- Click on Third Party software
- Click Add...
- Paste the line:
deb http://ppa.launchpad.net/synce/ubuntu your_ubuntu_version main
where you replace your_ubuntu_version with hardy, intrepid, or jaunty, depending on which version you are running.
- Click Close
- Click Reload
Advanced users can just add the following lines to their /etc/apt/sources.list (and run sudo apt-get update afterwards):
deb http://ppa.launchpad.net/synce/ubuntu intrepid main deb-src http://ppa.launchpad.net/synce/ubuntu intrepid main
(Note, in the above please replace intrepid by hardy if you are running ubuntu hardy or by jaunty if you are running ubuntu jaunty)
Sometimes the public key of the key that is used for signing the packages is not present. You can install this key with the following command:
sudo apt-key adv --recv-keys --keyserver subkeys.pgp.net 7D2C7A23BF810CD5
Install the main SynCE packages
You can install the main SynCE package with the following command
sudo apt-get install synce-hal librra-tools librapi2-tools
Test whether the connection is working
Connect your device and run the following command:
synce-pls
In case you see a list of files, congratulations, you have a working connection and you can continue with setting up everything for syncing.
In case you do not see a list of files, please visit /ConnectionProblems. As long as the command synce-pls does not show you files on your device, it has no use to go on with setting up everything for syncing, first this connection must be working.
Syncing your device to Kontact (KDE) / Evolution (Gnome)
Due to the fact that OpenSync is used for syncing data, the actual syncing is done in two steps:
A sync between your device and the internal database of our sync-engine. This is done via ActiveSync and this requires a partnership to be setup between your device and sync-engine. This partnership will contain information about what type of items should be synced.
A sync between the internal database of sync-engine and your PIM application (i.e. Evolution/Kontact). This is done via OpenSync and this requires an OpenSync syncgroup.
Important note: You cannot sync your device to Kontact in KDE4. At the moment there is not a plugin available for OpenSync that will allow you to do so. You can only sync your device to KDE3.
You can install the required packages with the following command:
sudo apt-get install multisync-tools opensync-plugin-synce synce-sync-engine
Furthermore, you need to install the OpenSync plugin for your PIM application also:
For Kontact: sudo apt-get install opensync-plugin-kdepim
For Evolution: sudo apt-get install opensync-plugin-evolution
Setting up a partnership
To setup a partnership between your device there are multiple options. You can use the command line tools, [wiki:SynceTools/SynceKpm SynCE-KPM] (KDE), or SynCE-Trayicon (Gnome).
One important limitation of microsoft is that you can only have 2 partnerships with normal computer and 1 additional partnership with an exchange server. If your device already has 2 normal partnerships, you cannot create a third one for SynCE and you must delete one of the existing ones.
Creating partnership with SynCE-KPM
Follow the these steps:
- Start SynCE-KPM
- Go to the partnership manager page
- Press the Add button
- Select the type of items you would like to sync and press Create
You can view a screencap of SynCE-KPM in action on the author's homepage.
Creating partnership with SynCE-trayicon
Follow these steps:
- TODO
Creating partnership with commandline tools
First check whether you a free slot to create a partnership by checking whether there are not 2 normal partnerships on the device already with the command:
synce-list-partnerships
In case you don't have a free slot, you can choose to remove one of the already present partnerships with the command:
synce-delete-partnership
If you have at least one free slot for a partnership, you can create one with the following command:
synce-create-partnership "Linux desktop" "Contacts,Calendar"
The "Linux desktop" string can be any string of 20 characters or less. The available items for synchronization are:
- Contacts
- Calendar
- Tasks
- Files
After you ran the previous command, you can verify with synce-list-partnerships whether the partnership was created.
Setting up an OpenSync sync-group
To setup an OpenSync sync-group, first you must check whether the correct SynCE plugin is available to OpenSync. You can verify this by running the command:
msynctool --listplugins
and in the output of this command there should be the plugin synce-opensync-plugin. Please note that you must NOT use the synce-plugin (without the opensync in the middle) because this is the plugin that is used for the legacy (wm2003 and earlier) devices.
You can now create a sync-group with the following commands:
msynctool --addgroup synce-sync msynctool --addmember synce-sync synce-opensync-plugin
Now you only have to add the plugin for your PIM application (please only use of the lines below):
For Evolution: msynctool --addmember synce-sync evo2-sync
For Kontact: msynctool --addmember synce-sync kdepim-sync
Actually syncing your device
If you got till here, it means that everything should be setup for syncing completely. You can now initiate a sync by running the following command:
msynctool --sync synce-sync
