To get started with OpenSync you probably need:

  • OpenSync itself. It is a library and does not contain any plugins or user interfaces.
  • The plugins you need: there is one plugin per type of thing to synchronize (files, PDAs, smartphones, Google Calendar, whatever).
  • Some kind of user interface (UI), such as multisync or kitchensync. Multisync contains both a command line tool msynctool and a GUI written in GTK. Note that multisync versions older than 0.90 are not relying on opensync, and won't work.

Warning: the version number for the OpenSync core must match that of the plugins you want to use. This means that you shouldn't use OpenSync 0.35 (or any further 0.3x) just now, unless you want to develop or port the plugins yourself (see PluginPortingGuide-0.30).

You have the following options to get these packages:

  • Download the softwarestudio.org/Tzfile/Europe/Madridsource tarballs
  • openSUSE repository packages for openSUSE/SUSE Linux, Mandriva, Fedora Core build by openSUSE Buildservice
  • Install 0.22 packages for Debian or Ubuntu
  • Gentoo Just follow this link to get to the procedure shown below
  • Install subversion packages for Debian or Ubuntu
  • Check out directly from subversion

Source Tarballs

Source tarballs for all releases can be found at here: http://www.opensync.org/download/releases/. For special instructions to build releases 0.3x, please look here. To download all bzipped tarballs of an entire release, please use wget like this replacing parameters as necessary: $ wget --accept bz2 -r -nd -l1 -P. http://www.opensync.org/download/releases/0.35/

openSUSE Build Service Repository

The openSUSE Build Service Repository provides currently released OpenSync and OpenSync?-related packages for Mandriva 2006 (x86), Fedora Core 6 (x86/x86_64), SUSE Linux 10.0 (x86/x86_64), SUSE Linux 10.1 (x86/x86_64), openSUSE 10.2 (x86/x86_64) and openSUSE Factory (x86/x86_64).

oSBS repo for released packages

Note: please don't send bugs to Mandriva, Fedora Core or SUSE Linux/openSUSE if you have problems with these packages. Please use the OpenSync Ticket system instead.

Debian/Ubuntu 0.22 Packages

All/most opensync packages are available in Debian testing/unstable and Ubuntu Hardy.

For older Ubuntu releases up to Feisty, an unofficial repository maintained by Punktart.de is available. Since these are not part of the Debian or Ubuntu projects proper, bugs should not be reported to the Debian or Ubuntu bug tracking system!
Please use the Ticket system at http://opensync.gforge.punktart.de for package bugs and the OpenSync Ticket system for other problems.

Gentoo Packages

Update (31jul08): I requested new ebuilds to be created and added, it can be seen at http://bugs.gentoo.org/show_bug.cgi?id=233416.

EDITED: All opensync packages are available in the official Gentoo tree but they are neither the appropiate ones or include all the required patches. This is what I had to do to get it working as of July 26, 2008:

0 INTRODUCTION

I have a Qtek S200, which is an OEM version of the HTC's Prophet model that I upgraded to WM6, and managed to get it to sync against Evolution on my Gentoo system so this is a brief explanation of what I've done to succed.

Regarding evolution, if you emerge it or evolution-exchange for the first time remember it has to be run to let it create its ~/.evolution file structure or the sync will, of course, fail. I did so and had no issues but if you already have evolution's addressbook, calendar, mail, memos and/or tasks there, I think a backup copy of your ~/.evolution is advisable just in case something goes wrong. Yet another possibility, mainly to test it, is to create the file structure without actually installing evolution (you could add more .ics fields to avoid timezone issues while syncing):

mkdir -p ~/.evolution/addressbook/local/system
touch ~/.evolution/addressbook/local/system/addressbook.db

mkdir -p ~/.evolution/calendar/local/system/
echo "BEGIN:VCALENDAR" > ~/.evolution/calendar/local/system/calendar.ics
echo "END:VCALENDAR" >> ~/.evolution/calendar/local/system/calendar.ics

mkdir -p ~/.evolution/tasks/local/system/
cp ~/.evolution/calendar/local/system/calendar.ics ~/.evolution/tasks/local/system/tasks.ics

By the way, this also led me to think we really don't need a lot of contacts/tasks/calendar plugins, one for each applications, but just only one as long as we can configure where addressbook.db, calendar.ics and tasks.ics are located plus a file type conversion in case a given application requires it (i.e. kmail, uses, by default, ~/.kde3.5/share/apps/kabc/std.vcf instead of ~/.evolution/addressbook/local/system/addressbook.db).

Finally, I started trying out opensync 0.36 but I could only get some of the fields for the contacts succesfuly imported and just empty tasks and nothing for the calendar so I decided to go for opensync 0.22 as recommended in several places. I tried 0.36 formerly because a lot of those sites have very old information regarding the related packages and I was wondering if they could work now.

Rolando Zappacosta

1 KERNEL

1.1 Make ensure you have, at least, a kernel 2.6.25 based system. If this is not the case, emerge the latest version of it.

uname -r
2.6.25-tuxonice-r6

I upgraded to 2.6.26-tuxonice and it worked fine too. Just remember, if you are running a suspendable kernel like I do, the suspend hangs when the device is pluged in and sync-engine is running!!!. May be we should try to unload modules but I didn't try it yet. 1.2 Configure the kernel:

cd /usr/src/linux
make menuconfig

and check for the following:

Device Drivers
	Network device support
		USB Network Adapters
			<M> Multi-purpose USB Networking Framework
			-M-   CDC Ethernet support (smart devices such as cable modems)
			<M>   Host for RNDIS and ActiveSync devices (EXPERIMENTAL)
	USB support
		USB Gadget Support
			<M>     Ethernet Gadget (with CDC Ethernet support)
			[*]       RNDIS support (EXPERIMENTAL)

1.3 Compile and install the modules

make modules && make modules_install
ls -1 /lib/modules/`uname -r`/kernel/drivers/net/usb
cdc_ether.ko
rndis_host.ko
usbnet.ko

2 SYNCE

2.1 Prepare the system to be ready for local ebuilds if it's not. Check for PORTDIR_OVERLAY in /etc/make.conf:

grep PORTDIR_OVERLAY /etc/make.conf
PORTDIR_OVERLAY="/usr/local/portage"

If it's not there, add above line to it and then:

mkdir -p /usr/local/portage/profiles
echo local > /usr/local/portage/profiles/repo_name

2.2 Download the latest synce ebuilds:

wget -nv -m -erobots=off -R "index.html,synce-wm5-layman.xml,manifest1_obsolete" -np -nH --cut-dirs=4 \
-P /usr/local/portage/ http://synce.svn.sourceforge.net/svnroot/synce/dist/gentoo/ 2>&1 | grep -v index.html

and sync your system:

emerge --sync

2.3 Edit /etc/portage/package.mask adding this:

=app-pda/synce-sync-engine-9999
>=app-pda/libopensync-0.30
>=app-pda/libopensync-plugin-python-0.30
>=app-pda/libopensync-plugin-evolution2-0.30
>=app-pda/msynctool-0.30

and /etc/portage/package.use adding:

app-pda/synce syncengine usb wininstallers
app-pda/multisync evo

2.4 The package we need to install is synce-sync-engine, checking what gets pulled in by it we get:

emerge -p synce-sync-engine
These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] dev-python/pyrex-0.9.8.4  USE="-examples"
[ebuild  N    ] dev-libs/check-0.9.5
[ebuild  N    ] dev-python/pyxml-0.8.4-r1  USE="-doc -examples"
[ebuild  N    ] dev-python/pygobject-2.14.2  USE="-X -debug -doc -examples -libffi"
[ebuild  N    ] app-pda/libopensync-0.22  USE="python -debug -doc"
[ebuild  N    ] dev-libs/libmimedir-0.4
[ebuild  N    ] net-libs/gnet-2.0.8  USE="-debug -doc -test"
[ebuild  N    ] app-pda/synce-libsynce-0.11.1  USE="hal -desktop"
[ebuild  N    ] app-pda/synce-librtfcomp-1.1
[ebuild  N    ] dev-python/dbus-python-0.82.4  USE="-test"
[ebuild  N    ] app-pda/libopensync-plugin-python-0.22
[ebuild  N    ] app-pda/synce-librapi2-0.11.1
[ebuild  N    ] app-pda/synce-odccm-0.11.1
[ebuild  N    ] app-pda/synce-librra-0.11.1
[ebuild  N    ] app-pda/synce-sync-engine-0.11.1

2.5 but as librra doesn't compile because of an error related to pyrra.pyx, we need to have its patch and edit its ebuild to include it

2.5.1 Here you can use whatever path you want but be carefull while editing the build in the next step so they are the same:

mkdir -p /var/tmp/SynCE
cd /var/tmp/SynCE
wget http://www.opensync.org/attachment/wiki/download/pyrra.pyx.patch

2.5.2 and edit the ebuild:

vi /usr/local/portage/app-pda/synce-librra/synce-librra-0.11.1.ebuild

adding these lines:

src_unpack() {
        unpack ${A}
        cd "${S}/python"
        epatch /var/tmp/SynCE/pyrra.pyx.patch
}

Again, be carefull about the path for epatch.

2.5.3 Reflect the changes:

ebuild /usr/local/portage/app-pda/synce-librra/synce-librra-0.11.1.ebuild digest

2.6 We are now ready to install sync-engine:

emerge -q synce-sync-engine

2.7 It's better to add some dependencies to the provided odccm initialization script, so:

cd /etc/init.d
rm ._cfg*_odccm
wget http://www.opensync.org/attachment/wiki/download/odccm
chmod +x odccm

2.8 Start or restart odccm:

/etc/init.d/odccm restart

2.9 and add it to rc:

rc-update add odccm default

2.10 Log the system messages:

tail -f /var/log/messages

and connect the PDA. You'll hopefully get something like this:

Jul 25 21:57:29 RJZ-LNX hub 1-0:1.0: unable to enumerate USB device on port 2
Jul 25 21:57:30 RJZ-LNX usb 2-2: new full speed USB device using uhci_hcd and address 2
Jul 25 21:57:30 RJZ-LNX usb 2-2: configuration #1 chosen from 1 choice
Jul 25 21:57:30 RJZ-LNX usb 2-2: New USB device found, idVendor=0bb4, idProduct=0bce
Jul 25 21:57:30 RJZ-LNX usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jul 25 21:57:30 RJZ-LNX usb 2-2: Product: Generic RNDIS
Jul 25 21:57:30 RJZ-LNX usb 2-2: Manufacturer: HTC
Jul 25 21:57:30 RJZ-LNX usb 2-2: SerialNumber: 00367035-5874-0156-8800-0050bf3f5173
Jul 25 21:57:30 RJZ-LNX usbcore: registered new interface driver cdc_ether
Jul 25 21:57:30 RJZ-LNX rndis_host 2-2:1.0: RNDIS_MSG_QUERY(0x00010202) failed, -47
Jul 25 21:57:30 RJZ-LNX eth2: register 'rndis_host' at usb-0000:00:1d.0-2, RNDIS device, 80:00:60:0f:e8:00
Jul 25 21:57:30 RJZ-LNX usbcore: registered new interface driver rndis_host
Jul 25 21:57:30 RJZ-LNX udev: renamed network interface eth2 to eth4
Jul 25 21:57:30 RJZ-LNX odccm[2073]: DEBUG: PDA network interface discovered! udi='/org/freedesktop/Hal/devices/net_80_00_60_0f_e8_00'
Jul 25 21:57:31 RJZ-LNX odccm[2073]: DEBUG: device_info_received
Jul 25 21:57:31 RJZ-LNX odccm[2073]: DEBUG: f1 ea 81 50 c4 44 98 68 41 c3 2e e3 1d ef d0 5f 05 00 00 00 02 00 00 00 0b 00 00 00 48 00 54 00 43 00 2d 00 50 00 72 00 6f 00 70 00 68 00 65 00 74 00 00 00 05 02 f5 4c 11 0a 00 00 05 00 00 00 3b fb d8 07 00 00 00 00 0f 00 00 00 50 6f 63 6b 65 74 50 43 00 53 53 44 4b 00 00 05 00 00 00 50 4d 33 30 30 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
Jul 25 21:57:31 RJZ-LNX odccm[2073]: DEBUG: extradata:
Jul 25 21:57:31 RJZ-LNX odccm[2073]: DEBUG: 10 00 00 00 0c 00 00 00 5d 00 00 00 01 00 00 00
Jul 25 21:57:31 RJZ-LNX odccm[2073]: Message: device_info_received: registering object path '/org/synce/odccm/Device/_5081EAF1_44C4_6898_41C3_2EE31DEFD05F_'

Press <CTRL>c to interrupt the dump and you can check for the presence of a new "eth" interface. On my system I finally got eth4, as can be seen above in "Jul 25 21:57:30 RJZ-LNX udev: renamed network interface eth2 to eth4" so for me it's:

ifconfig eth4
eth4      Link encap:Ethernet  HWaddr 80:00:60:0f:e8:00
          inet addr:169.254.2.2  Bcast:169.254.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:20 errors:14 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1096 (1.0 KiB)  TX bytes:1299 (1.2 KiB)

Check yours as it's most surely another interface on your system.

2.11 We can also see the modules that got loaded:

lsmod
Module                  Size  Used by
rndis_host              6016  0
cdc_ether               4288  1 rndis_host
usbnet                 12552  2 rndis_host,cdc_ether
mii                     4096  1 usbnet

and ping the PDA:

ping 169.254.2.1
PING 169.254.2.1 (169.254.2.1) 56(84) bytes of data.
64 bytes from 169.254.2.1: icmp_seq=1 ttl=128 time=2.73 ms
64 bytes from 169.254.2.1: icmp_seq=2 ttl=128 time=3.05 ms

2.12 Copy /usr/share/synce-sync-engine/config.xml to ~/.synce/:

mkdir ~/.synce/
cp /usr/share/synce-sync-engine/config.xml ~/.synce/

2.13 Launch the synce engine in another console:

sync-engine
SynCE sync-engine starting up
2008-07-26 09:50:46,120 DEBUG syncengine : running main loop
2008-07-26 09:50:46,121 DEBUG syncengine : creating SyncEngine object
2008-07-26 09:50:46,128 DEBUG syncengine : installing signal handlers

plus a lot of lines of dump.

2.14 If you want to see the partnership the device already has (mine was synced with WinXP before):

list_partnerships.py
            AVAILABLE DEVICE PARTNERSHIPS
Index   Name            Device          Host         SyncItems
-----   ----            ------          ----         ---------
0       Windows PC      HTC-Prophet     RJZ-WIN      (Server)

2.15 Create the partnership specifying what you want to sync (the options are Contacts, Calendar, Tasks and Files):

create_partnership.py "Linux PC" "Contacts,Calendar,Tasks"
Creating partnership...
Partnership created

and list_partnerships.py now shows:

list_partnerships.py
            AVAILABLE DEVICE PARTNERSHIPS
Index   Name            Device          Host         SyncItems
-----   ----            ------          ----         ---------
0       Linux PC        HTC-Prophet     RJZ-LNX      [Contacts Calendar Tasks ]
1       Windows PC      HTC-Prophet     RJZ-WIN      (Server)

3 OPENSYNC

3.1 It's now time to go for opensync 0.22. The first thing we have to do is to install msynctool:

emerge -q msynctool

3.2 then check for its plugins availability:

msynctool --listplugins
Available plugins:
testmodule
synce-opensync-plugin

3.3 Note the synce plugin already shows up as it was installed as:

/usr/lib/opensync/python-plugins/synce-opensync-plugin.py

by app-pda/synce-sync-engine:

qfile /usr/lib/opensync/python-plugins/synce-opensync-plugin.py
app-pda/synce-sync-engine (/usr/lib/opensync/python-plugins/synce-opensync-plugin.py)

In fact, even though the unnecesary plugin could be theoricaly emerged, it's masked out by the system:

emerge -p libopensync-plugin-synce
These are the packages that would be merged, in order:

Calculating dependencies... done!

!!! All ebuilds that could satisfy "app-pda/libopensync-plugin-synce" have been masked.
!!! One of the following masked packages is required to complete your request:
- app-pda/libopensync-plugin-synce-0.22 (masked by: package.mask)
/usr/portage/profiles/package.mask:
# Piotr Jaroszyski <REMOVED email address!!! :-) > (28 Mar 2006)
# Unusable for now.

- app-pda/libopensync-plugin-synce-0.20 (masked by: package.mask)

For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.

An ebuild to just copy synce-opensync-plugin.py could be written but it would be necesary only to get a nice message of the package been installed when running the "emerge -p libopensync-plugin-synce" command.

3.4 So, we only need to go for the evolution2's one.

3.4.1 Create the ebuild:

mkdir -p /usr/local/portage/app-pda/libopensync-plugin-evolution2
cd /usr/local/portage/app-pda/libopensync-plugin-evolution2
cp /usr/portage/app-pda/libopensync-plugin-evolution2/libopensync-plugin-evolution2-0.22.ebuild .

open it for edition:

vi libopensync-plugin-evolution2-0.22.ebuild 

add these lines into it:

inherit eutils
src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch /var/tmp/SynCE/libopensync-plugin-evolution2-0.22.patch
}

3.4.2 and ebuild it:

ebuild libopensync-plugin-evolution2-0.22.ebuild digest

3.4.3 Download this required patch:

cd /var/tmp/SynCE
wget http://www.opensync.org/attachment/wiki/download/libopensync-plugin-evolution2-0.22.patch

3.4.4 Check the plugin is going to be pulled in from our local portage branch:

emerge -pv libopensync-plugin-evolution2
These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    ] app-pda/libopensync-plugin-evolution2-0.22  0 kB [1]

Total: 1 package (1 new), Size of downloads: 0 kB
Portage tree and overlays:
 [0] /usr/portage
 [1] /usr/local/portage

Look at the [1] at the end of the line for it and the reference on the last line and install it:

emerge libopensync-plugin-evolution2

3.5 msynctool now has to have the evolution plugin too:

msynctool --listplugins
Available plugins:
testmodule
synce-opensync-plugin
evo2-sync

3.6 Create a new group:

msynctool --addgroup synce2evolution
msynctool --listgroups
Available groups:
synce2evolution

and add both members (the plugins for evolution and synce shown above):

msynctool --addmember synce2evolution evo2-sync
msynctool --addmember synce2evolution synce-opensync-plugin
msynctool --showgroup synce2evolution
Groupname: synce2evolution
Member 1: evo2-sync
        Configuration : <config>
  <address_path>default</address_path>
  <calendar_path>default</calendar_path>
  <tasks_path>default</tasks_path>
</config>
Member 2: synce-opensync-plugin
        No Configuration found: Member has not been configured

3.7 Edit ~/.synce/config.xml:

vi ~/.synce/config.xml

and make, or not :-), the following changes:

<Global>
	<AuthMethod>INTERNAL_GUI</AuthMethod> => to <AuthMethod>INTERNAL_CLI</AuthMethod> if you want
	<AppendDefaultTimezone>0</AppendDefaultTimezone> => it's recommended to set it to 1 if having issues with
	appointments getting imported at wrong times but this wasn't my case (I left it set to 0)
<Autosync>
	<AutoSyncCommand>xterm -e msynctool --sync wm5sync</AutoSyncCommand> => <AutoSyncCommand>xterm -e msynctool --sync synce2evolution</AutoSyncCommand>
	<Disable>1</Disable> => you may want to set it to 0 in order to let the PDA start the sync
<FileSync>
	<BaseFilePath>~/PDAFiles</BaseFilePath> => point to whatever path you want to, I didn't change it actually.

3.8 Check the PDA and turn it on if it was powered off on itself and sync:

msynctool --sync synce2evolution

A lot of output will be shown in the console where sync-engine was left running. Note msynctool may take a real while to sync for the first time just like activesync under Windows does, please be patient.

4 APENDIX

4.1 There are several other usefull tools and some of them are really worth trying:

clean_partnerships.py
configure_bindings.py
create_partnership.py
delete_partnership.py
list_partnerships.py
pcp
pkillall
pls
pmkdir
pmv
prm
prmdir
prun
psettime
pshortcut
pstatus
rapiconfig	
synce-install-cab
synce-list-programs
synce-matchmaker
synce-registry
synce-remove-program

It's safe to ignore the "** Message: Hal reports no devices connected" message from some of them as far as I know.

Official Mandriva packages

Mandriva Linux contains OpenSync? packages in its official /contrib repository, since the release of Mandriva Linux 2008. For help with enabling the official online repositories (including /contrib), see this page. In Mandriva Linux 2008, you will find all the various parts of OpenSync? available in packages with 'opensync' in their names, along with msynctool. In the soon-to-be-released Mandriva Linux 2008 Spring there are also metapackages which will install all the necessary packages for synchronizing with certain types of hardware: task-wm5sync-kde and task-wm5sync-gnome for Windows Mobile 5 and later devices, task-nokiasync-kde and task-nokiasync-gnome for Nokia phones, and task-blackberry-kde and task-blackberry-gnome for Blackberries. Mandriva Linux 2008 Spring also includes packages for multisync-gui and kitchensync. In both releases, the OpenSync? version available is 0.22.

Public Repository

To get the latest version from our Subversion repository do:

svn co http://svn.opensync.org/trunk opensync
svn co http://svn.opensync.org/multisync/trunk msynctool

If you need a gui do:
svn co http://svn.opensync.org/multisync/trunk-gui multisync-gui

After that check out the plugin that you need:

svn co http://svn.opensync.org/plugins/{plugin-name}
To see all available plugins you can take a look with our source browser

Sometimes you additionally need the vformat plugin to decode the data retrieved by the plugins:

svn co http://svn.opensync.org/format-plugins/vformat

Attachments