# [HOWTO]: Sync between Windows Mobile 6 & Evolution 2

## Sinker

[HOWTO]: Sync between Windows Mobile 6 & Evolution 2

Tested with:

Dell Axim x51v with Windows Mobile 6.1 Classic

HTC Touch (ELF100) with Windows Mobile 6 Professional

Pocket Informant 8.51

IBM Thinkpad T41

Evolution 2.26.1.1

Opensync 0.22

Synce 0.13

Multisync-GUI 0.91.0

Kernel 2.6.29

1 Introduction

1.1 This guide is a step by step process of what I did to be able to sync the calendar, task list and contacts on my PocketPC with the Evolution software that comes with Gnome.

1.2 I've spend many, many hours trying to get this to work. It isn't actually that difficult, the problem is the documentation that's available from the developers is dreadful, or at least dreadfully old. There are many user created HOWTOs but, again they are very old, dealing in the main with the old serial style connection used with Windows Mobile 2003. None of guides explained exactly how it all hung together, what packages were actually needed and what versions nor how to configure it all to sync. Lots of guides stopped with just a connection to the PocketPC, so you could browse files etc, but not sync your data. There also appears to be an overlap of what bits of what package do what. But, after a lot of trial and error it dawned on me how it's all meant to work and then it was easy.

1.3 I hope you find this useful, I know I would have done! Here goes!

1.4 Disclaimer: This is all given in good faith and I cannot be held responsible if you lose all your data / melt your PocketPC / anything else!

2 Installation

2.1 Kernel

2.1.1 The connection to the PPC is a network link so certain kernel items need to be built for the link to work. I tend to build things directly into the kernel. I assume building as modules will work.

```
Device Drivers -->

   Networking device support -->

     USB Network Adapters -->

        <*>   Multi-purpose USB Networking Framework

        -*-   CDC Ethernet support (smart devices such as cable modems)

        <*>   Host for RNDIS and ActiveSync devices (EXPERIMENTAL)
```

2.2 Packages

2.2.1 Only opensync version 0.22 can be used. Version 0.3x (a development version for a future 0.4x release) causes data curruption! I tried it; it deleted stuff.

Versions of multisync-gui higher than 0.91.0 do not work with opensync 0.22!

2.2.2 Ensure the evo, hal and gnome USE flags are used then install the packages.

```
~ # sudo emerge -vat multisync-gui synce

These are the packages that would be merged, in reverse order: 

Calculating dependencies... done! 

[ebuild  N    ] app-pda/synce-0.13  USE="gnome hal -kde -serial" 0 kB 

[ebuild  N    ] app-pda/multisync-gui-0.91.0  USE="evo" 0 kB 

[ebuild  N    ]  app-pda/libopensync-plugin-evolution2-0.22  0 kB 

[nomerge      ] app-pda/synce-0.13  USE="gnome hal -kde -serial" 

[ebuild  N    ]  app-pda/synce-gvfs-0.2.1  USE="-debug" 0 kB 

[ebuild  N    ]  app-pda/synce-hal-0.13  0 kB 

[ebuild  N    ]   app-pda/synce-sync-engine-0.13  0 kB 

[ebuild  N    ]    app-pda/libopensync-plugin-python-0.22  0 kB 

[ebuild  N    ]     app-pda/libopensync-0.22  USE="doc python -debug" 0 kB 

[ebuild  N    ]    app-pda/synce-librtfcomp-1.1  0 kB 

[ebuild  N    ]   net-misc/dhcp-3.1.1  USE="doc -minimal (-selinux) -static" 0 kB 

[ebuild  N    ]   app-pda/synce-serial-0.7  0 kB 

[ebuild  N    ]   net-libs/gnet-2.0.8  USE="doc -debug -test" 0 kB 

[ebuild  N    ]  app-pda/synce-trayicon-0.13  USE="-debug" 0 kB 

[ebuild  N    ]   app-pda/synce-librra-0.13  0 kB 

[ebuild  N    ]    dev-libs/libmimedir-0.4  0 kB 

[ebuild  N    ]   app-pda/orange-0.4  0 kB 

[ebuild  N    ]    app-pda/dynamite-0.1.1  0 kB 

[ebuild  N    ]    app-arch/unshield-0.5.1  0 kB 

[ebuild  N    ]   app-pda/synce-librapi2-0.13.1  0 kB 

[ebuild  N    ]    app-pda/synce-libsynce-0.13  USE="hal" 0 kB

Total: 20 packages (20 new), Size of downloads: 0 kB
```

2.2.3 Another package of note is msynctool. This is a CLI tool that does the same job as multisync-gui and could be useful for debugging.

2.2.4 Now install the synce plugin for opensync:

```
~ # sudo synce-install-plugins.py

Resetting python-plugins directory... 

OpenSync version 0.22 installed.

Using driver synce-opensync-plugin-3x.py
```

Don't worry about the above version mismatch, it does work.

2.2.5 synce-trayicon does install a gnome autostart script, but run it manually now so it can be used.

```
~ # synce-trayicon

** (synce-trayicon:29599): DEBUG: Forking into background
```

You should now see a darkened PDA icon in the systray. This is synce-trayicon.

2.3 Plug in your PocketPC

2.3.1 Plug in your PPC using it's USB cable. synce-trayicon should notify you of the connection and update the systray icon to reflect the connection.

3 Configuration

3.1 Understanding the method

3.1.1 The synronisation process is a multi stage affair. opensync works by creating a group of two plugins and syncing data between the two. The plugins then communicate with either synce (synce-opensync-plugin) or Evolution (evo2-sync). A partnership is needed between synce and the PPC so the final stage of the sync process completes.

3.1.2 Here's a flow diagram of the sync process:

```
PocketPC <> synce <> synce-opensync-plugin <> opensync <> evo2-sync <> Evolution
```

3.2 Config of synce

3.2.1 To create the partnership between synce and the PPC right click on synce-trayicon and choose your PPC then view device status. On the Partnerships tab choose create. Give it a name and tick Calendar, Contacts and Tasks then choose OK and close the dialog box.

3.3 Config of opensync

3.3.1  Run multisync-gui (listed as Multisync-qad in the Gnome menu) and choose to add a new group. Choose a name, OK, then choose Edit. Click on Add Member and choose the evo2-sync plugin and the synce-opensync-plugin. Highlight the evo2-sync member and double check it's syncing with the right catagories (in my case Personal). Close the dialog box to bring you back to multisync-gui.

4 Synronisation

4.1 First Sync

4.1.1 With multisync-gui open click on Refresh. This will initiate the sync between Evolution and your PPC. It may appear to pause at times but it's a multistage process and tackles each stage in turn. It'll say the sync was successful (hopefully) when it's finished.

4.2 Intergration with Gnome

4.2.1 Open up the Removable Drives and Media preferences box from the Sytems > Preferences menu. On the PDAs tab make sure Sync PocketPC devices when connected is ticked then add the following to the Command box:

```
multisync-gui
```

5 Other useful stuff

5.1 You can browse the PPC using Nautilus by right clicking on the synce-trayicon, choosing your PPC then Explore with Filemanager. Or using the PPC icon on the desktop, or through Nautilus directly.

5.2 The View Device Status of synce-trayicon allows you to install PPC applications from a CAB file saved on your Linux box (and uninstall them).

6 Syncing with more programs

6.1 If anybody gets syncing working with other programs I'd love to hear from you. There is a plugin that should enable syncing with Mozilla Sunbird that's also meant to work with the Lightning add on for Mozilla Thunderbird, and another one for Google Calendar, for example.

7 Troubleshooting

7.1 On occasion the PPC would not be detected on insertion. Syslog would show a new USB device but the network connection wouldn't establish. Plugging the PPC into a different USB port worked fine.

7.2 On occasion the sync process would not complete. A hard reboot of both my PPC and laptop would fix this. I don't know which device was causing the problems. Has only happened once so far.

7.3 Sometimes objects (contacts, calendar entries etc...) wouldn't sync. This is probably due to me trying to sync with two PPC devices. Recreating the sync group within multisync-gui forced a complete re-sync and things were fine again. Sometimes the following files had to be deleted before creating a new group.

```
~/.evolution/addressbook/local/system/[name of sync group].changes.db

~/.evolution/calendar/local/system/calendar.ics-[name of sync group].db

~/.evolution/tasks/local/system/tasks.ics-[name of sync group].db
```

8 Feedback

8.1 I would appreciate any feedback, both positive and negative on all aspects of this HOWTO.

Good luck!

----------

## too7

Hi, Thanks for the Howto.

But It doesn't work for me.

I'm stuck with a segfault in synce-systray / librapi2 when connecting the pda.

Any idea ?

Edit :

Program received signal SIGSEGV, Segmentation fault.

[Switching to Thread 0x7f93c41bb780 (LWP 12730)]

0x00007f93be54619d in CeGetSystemPowerStatusEx () from /usr/lib/librapi.so.2

----------

## Ted79

Hi! I have follow every words in the SynCE Wiki and arrived at the point of creating the partnership, unfortunately i could not create the partnerships. The error is as follow: bash: create_partnerships.py: command not found.

Would any be able to lend a helping hand in this matter. I am stuck at this point in time.

Thanks in advance.

After trying several time, finally i managed to create the partnerships and now i am testing it.

----------

## fbcyborg

 *Sinker wrote:*   

> 2.3.1 Plug in your PPC using it's USB cable. synce-trayicon should notify you of the connection and update the systray icon to reflect the connection.

 

Nothing happens when I connect my PPC to the USB port.

I use KDE, so synce-kpm is my synce manager.

Furthermore, this is my /var/log/message when I connect the USB cable:

```
Dec 22 14:38:01 Gentoo kernel: usb 7-1: new full speed USB device using uhci_hcd and address 9

Dec 22 14:38:01 Gentoo kernel: usb 7-1: no configuration chosen from 1 choice
```

These modules are loaded:

```
rndis_host              4888  0

cdc_ether               3096  1 rndis_host

usbnet                 11264  2 rndis_host,cdc_ether
```

Probably, rndis_host module doesn't work. 

My kernel comes from gentoo-sources-2.6.31-r6, and I noted that the rndis_host driver doesn't work.

I installed usb-rndis-lite from an overlay on my notebook and I don't have any problem.

----------

## fbcyborg

I've just found out that the USB_SERIAL_IPAQ module was missing.

I compiled it and now Synce-kpm is able to recognize my TyTN II.

----------

