Synce
From openSUSE
Contents |
Installing Synce on openSUSE 10.2 and 10.3
Synce is a Linux application for syncing windows mobile based devices. It currently supports CE2003, Windows Mobile 5 and Windows Mobile 6. More information can be found at http://www.synce.org/ and #synce on freenode.
For installation i have created a script. It is recommended that you download it to you home directory and run it from there. Please avoid using your desktop as download storage. What it does is download all the synce sources need to build and install synce and also the kernel source for you distro (there is a script for 10.2 and one for 10.3). It then builds the required kernel module and continues on to build the engine. All a user really needs to do is configure opensync and her preferred pim client at the end.
Prerequisites
Before you install synce you will need to check in YaST's software manager for the following packages (copy and paste them in to the search box). For 10.2 you will need to add the Opensync repository to installation sources. Here's the url http://download.opensuse.org/repositories/OpenSync:/OpenSync-0.2x/openSUSE_10.2/
- dbus-1-devel
- kitchensync
- libopensync
- libopensync-devel
- libopensync-plugin-* (all packages with libopensync-plugin in their names should be selected to install)
- msynctool
- python-opensync
- pyrex
- python
- python-devel
- python-gobject2
- python-gobject2-devel
- python-xml
- pyxml
- libwbxml2-0
- libwbxml2-devel
- libxml2
- libxml2-devel
- libxml2-python
- wbxml2
- libxslt
- libxslt-devel
- libxslt-python
- expat
- libexpat0
- libexpat1
- libexpat-devel
- swig
- subversion
- gnet
- gnet-devel
Big list, isn't it? you will also need to get libmimedir but this will be automatically downloaded and built by the script linked below.
Or if you want you can copy the following command and run it as root
yast -i dbus-1-devel kitchensync libopensync libopensync-devel
yast -i libopensync-plugin-file libopensync-plugin-gnokii
yast -i libopensync-plugin-google-calendar libopensync-plugin-gpe
yast -i libopensync-plugin-irmc libopensync-plugin-kdepim libopensync-plugin-moto
yast -i libopensync-plugin-opie libopensync-plugin-palm
yast -i libopensync-plugin-palm-devel libopensync-plugin-python-module
yast -i libopensync-plugin-sunbird libopensync-plugin-syncml libopensync-tools
yast -i msynctool python-opensync pyrex python python-devel python-gobject2
yast -i python-gobject2-devel python-xml pyxml libwbxml2-0 libwbxml2-devel libxml2
yast -i libxml2-devel libxml2-python wbxml2 libxslt libxslt-devel libxslt-python
yast -i expat libexpat0 libexpat1 libexpat-devel swig subversion gnet gnet-devel
Building Synce
To build synce you will need to obtain the source code from sourceforge. I suggest you use 0.10.0 over svn, that is unless you get problems with 0.10.0. I have written a script that automatically obtains the 0.10.0 source and libmimedir 0.5 then builds them. All you need to do is input your root password a few times (needed to run 'make install')
here's the link to the script. It's now completely unified so there is now only one for both versions of suse: http://www.noquestionsasked.co.uk/synce_instV221.sh . If you use gnome you will probably want to uncomment the lines at the start of the script that dl and extract the source for synce-gnome. If you have a custom kernel the script is unable to check for it so you MUST comment out the version checking if construct.
once it's downloaded make it executable using 'chmod +x synce_instV22.sh' and run it using ./synce_instV22.sh
Connecting Your Device
For most devices to work (all usb devices) you will need to either patch your kernel or build usb-rndis-lite.
USB-rndis-lite
USB-rndis-lite is the preferred method. There are two versions 0.10.0 and svn. It is recommended to use the svn version of usb-rndis-lite as it has support for devices with samsung cpu's and many other goodies.
The script you downloaded earlier now downloads the default kernel source for you distribution and then builds this module. there is no need o do anything but wait here now.
if you experience any problems building the module please see this page: http://www.synce.org/index.php/Connecting_your_Windows_Mobile_2005_device_via_USB_%28usb-rndis-lite%29
Start odccm
odccm should be started as your root user. This can be done by executing:
su -c "/usr/local/sbin/odccm"
On at least some models of phone, the device must be in suspend mode (with the screen off) before plugging it in to the USB connection.
Start synce-gnome
Note: Despite this being called synce-gnome, this is not Gnome-specific.
This can be started as your normal user.
cd synce-gnome-0.10.0/src python test.py
Note: Gentoo and Debian users need to install python-dbus and notify-python for this to work.
Start a connection
NOTE: your device must be set to use RNDIS, instead of the legacy USB serial sync mode. You will need to know the specific method for your device.
Once odccm is started, you then must start a connection to your device. Just plug in your device and it will be detected by odccm.
If you have odccm running in a console window you will see something like the following:
- (process:13124): DEBUG: running mainloop
- (process:13124): DEBUG: PDA network interface discovered! udi='/org/freedesktop/Hal/devices/net_80_00_60_0f_e8_00', device='rndis0'
- (process:13124): DEBUG: device_info_received: registering object path '/org/synce/odccm/Device/_7A37B965_2F39_EAE1_17C6_9D5F3FD484DC_'
Note: if you get the "interface discovered"-message, but not the "registering object"-message, you might want to check your firewall settings.
If synce-gnome is running correctly then a notification bubble will tell you a device has been connected.
Test connection
Once you have started a connection you can test it using the pls command:
pls
You should receive an output like:
Directory 2006-03-01 11:00:16 My Pictures/ Directory 2006-03-01 11:00:20 My Music/ Directory 2006-03-01 11:00:20 My Videos/ Directory 2006-03-01 11:00:20 UAContents/ Directory 2006-03-01 11:00:22 My Midlets/ Directory 2006-03-01 11:01:18 Frames/ Directory 2006-06-20 23:41:24 Notes/
Synce Engine
Firewall
For synce to be able to connect to your device you will need to either set you firewall to the internal zone or allow these ports
- 999
- 5678
- 26675
Downloading and Installing software
This is now all done by the install script. skip on to configuring opensync
OpenSync
Determine the full path to where OpenSync's python plugins are installed. This is the following:
/usr/lib/opensync/python-plugins/
This path will be referred to as PLUGIN_DIR below.
Determine the full path to the sync-engine directory created in the previous step. This path will be referred to as SYNC_ENGINE_DIR below. This is:
/where/you/ran/the/script/synce_source/synce-sync-engine-0.10.0/
Make a symbolic link to the synce plugin:
su -c ln -sf SYNC_ENGINE_PATH/opensync-plugin.py PLUGIN_DIR/synce.py
Be sure that OpenSync is aware of the new plugin. If you execute the command 'msynctool --listplugins' you should see output similar to the following:
Available plugins: ... synce-plugin ...
Using sync-engine
Starting sync-engine
Before you start sync-engine, it is necessary to copy the basic configuration file to your home directory. If you would like to sync files, you need to edit the file as well. In the sync-engine directory, type:
mkdir ~/.synce cp config.xml ~/.synce
To sync files, you need to create a local path to mirror the files on the handheld:
mkdir ~/PDAFiles
Now you can start SyncEngine by entering:
./sync-engine
To test that it works, execute the following in a new console:
(cd sync-engine/tools && ./list_partnerships.py)
This will list any partnerships already configured on your device.
Configuration
Configuration of sync-engine is accomplished through the ~/.synce/config.xml file. This can be edited in your favourite text editor. The basic default config.xml reads as follows:
<?xml version="1.0" ?>
<syncengine-config>
<Global>
<SlowSyncDisable>0</SlowSyncDisable>
<!--
AuthMethod can be one of the following:
INTERNAL_GUI uses internal GUI auth prog
INTERNAL_CLI uses internal console auth prog
[pathname_to_prog] uses external auth prog
Note: INTERNAL_GUI uses GTK to display the box.
INTERNAL_CLI uses the console and will work on systems without GTK
If this element is not specified, the default will be INTERNAL_CLI
-->
<AuthMethod>INTERNAL_GUI</AuthMethod>
</Global>
<Autosync>
<AutoSyncCommand>xterm -e msynctool --sync wm5sync</AutoSyncCommand>
<Disable>1</Disable>
</Autosync>
<FileSync>
<LocalFilePath>/nfshomes/jgow/PDAFiles</LocalFilePath>
<Disable>0</Disable>
<LocalUpdateFreq>10</LocalUpdateFreq>
<ExtraDeleteDelay>0</ExtraDeleteDelay>
<ObjectReportTimeout>8</ObjectReportTimeout>
</FileSync>
</syncengine-config>
Each aspect of sync-engine is controlled by the appropriate XML stanza. Taking these in turn:
Sync Engine Configuration
<Global> - general sync-engine configuration.
o <SlowSyncDisable> - control slow sync behaviour
+ can be '1' or '0', default is '0'
+ If set to '1', the internal slow sync database used by sync-engine to facilitate OpenSync's slow-sync mode will be disabled. You probably do not want this, so leave it set to '0'. Its primary use is in debugging/testing, or if OpenSync changes the way in which slow sync is carried out.
o <AuthMethod> - select authorization method for password-protected devices
+ can be 'INTERNAL_GUI', 'INTERNAL_CLI' or <path-to-program>, default is INTERNAL_CLI
+ INTERNAL_GUI - will use GTK to pop up a box asking for the password when a password-protected handheld is connected.
+ INTERNAL_CLI - will provide a password request in the sync-engine console when a password-protected handheld is connected.
+ <path_to_program> - Path to a user-provided executable program to perform the authorization. The program should take a single string command line argument consisting of the d-bus objectID and should return an exit code of nonzero if successfully authorized, zero if not.
<Autosync> - control device-triggered synchronization.
o <AutoSyncCommand> - command run by sync-engine in response to a device-triggered synchronization
+ can be set to any executable program specified by the user
+ The default, in the absence of this element, is an empty path - nothing is run. The config.xml file provided in the sync-engine distribution contains a command to run msynctool in an xterm, as an example of how this can be used.
o <Disable> - disable or enable device-triggered synchronization
+ can be '1' or '0', default is '1'
+ if set to '1', device-triggered synchronizations will have no effect and <AutoSyncCommand> will be ignored
+ if set to '0', and <AutoSyncCommand> contains a valid path, then the executable specified in <AutoSyncCommand> will be run when the handheld triggers an automatic synchronization
<FileSync> - control file synchronization. Note that file synchronization is independent from PIM data synchronization, and is handled entirely within sync-engine (does not use OpenSync).
o <LocalFilePath - the path to the directory on the desktop that will mirror the handheld.
+ This should point to a valid path to a directory. When first creating the partnership, ensure this directory is empty.
o <Disable> - disable or enable file synchronization
+ can be '1' or '0', default is '1'
+ if set to '1', no file synchronization will take place
+ if set to '0', file synchronization will be enabled
o <LocalUpdateFreq> - additional delay in approximate seconds between local directory scans.
+ Actual delay is <LocalUpdateFreq>+10. The default is '10' and should not need to be reduced below this figure.
+ Increasing it will increase the delay between local files being written and them being reflected on the handheld
o <ExtraDeleteDelay> - controls the delay between a local object being scheduled for deletion and the delete occurring
+ Default is '0' and it should not be necessary to change this value unless you have a slow handheld.
o <ObjectReportTimeout> - controls the amount of time we wait for the device to make its initial object list report
+ Default is '8' and it should not be necessary to change this value unless you have a slow handheld - OK to increase this but it should not be decreased.
The configuration file is read both when sync-engine is started, and again when a device is reconnected after having been disconnected. This allows changes to be made to the configuration of a running sync-engine without stopping it; the changes to be picked up when the device is re-plugged.
Managing Partnerships
First, open a new console and change to the sync-engine/tools directory:
cd sync-engine/tools
Create a partnership between your Linux computer and the device:
./create_partnership.py "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
When specifying items to sync, they must be separated by commas. You must also surround the list in double quotes and the string must not contain any whitespace.
Ensure that the newly-created partnership is selected as the current partnership
./select_partnership.py
First, create an OpenSync group for synchronization, and add the SynCE plugin to the group:
msynctool --addgroup pda-sync
msynctool --addmember pda-sync synce-plugin
Evolution
Add the Evolution plugin to the group:
msynctool --addmember pda-sync evo2-sync
msynctool --configure pda-sync 2
Kontact
Add the KDE-Pim plugin to the group:
msynctool --addmember pda-sync kdepim-sync
Note: There may be issues under KDE-Pim with event times being off by an hour, especially in the case of recurring events that span a Daylight Savings Time transition. The cause might be this bug.
Synchronization
Contacts, Calendar, Tasks
Triggered from OpenSync
Tell OpenSync to start the synchronization:
msynctool --sync pda-sync
Notes
This page was compiled with the blessing of and information, directly or indirectly provided by, the synce team. It is not how ever affiliated with them in any way and is maintained by a third party.
openSuSE is a trademark of Novell inc. and is used here without permission but only as a necessary reference
Thanks go out to the synce team for allowing this wiki to be created. Also to guru for coding checking V1 of synce_dlbs.sh and Jop, of suselinuxsupport.de, for proof reading this page and the version checker code.
Interesting Links
http://www.synce.org
http://packman.links2linux.org/
http://linux01.gwdg.de/~pbleser/
http://www.suselinuxsupport.de
http://forums.suselinuxsupport.de/index.php?showtopic=63175
http://suse-irc.org

