Saturday, March 31, 2007

Synchronizing Sony Ericsson K320i Calendar with Evolution Calendar

Sorry for the long absence, I'm quite busy with my studies and project works .. well its that time of the semester again .. *sigh

As promised , here is a simple howto for synchronizing Sony Ericson K320i with Ximian Evolution

Step 1: Getting the packages

  • multisync

  • libsyncml

  • bluez-utils

  • libopensync-plugin-evolution2

  • libopensync-plugin-syncml


All of these packages can be acquired from Fedora repositories except for libopensync-plugin-syncml which you can follow this guide to install it or until somebody push it into the repositories. If you would like a GUI for multisync, yum for multisync-gui. In this guide, however, I'll cover the console based set-up only.

Step 2: Setting up a multisync group

First, create a multisync group that will contain a member from evolution2 plugin and a member from syncml plugin. In this example I name the group SyncMe

msynctool --addroup SyncMe
msynctool --addmember SyncMe evo2-sync
msynctool --addmember SyncMe syncml-obex-client


Step 3: Configuring the SyncML plugin

Now to configure the SyncML plugin. You will need 2 informations for this.
  • You phone's Bluetooth MAC address

  • The channel where SyncML OBEX Client is listening on you phone


Getting you phone's MAC address

Turn on Bluetooth discovery on your phone. From the PC use hcitool to scan for your phone's MAC.

$ hcitool scan
Scanning ...
xx:xx:xx:xx:xx:xx K320i


The xx:xx:xx:xx:xx:xx is your phone's MAC address. Copy it and paste it somewhere.

Getting the SyncML OBEX Client Channel

$ sdptool browse xx:xx:xx:xx:xx:xx


From the output, find the block that look similar like this

Service Name: OBEX SyncML Client
Service RecHandle: 0x00000
Service Class ID List:
UUID 128: 00000000-0000-0000-0000-0000ee000000
Protocol Descriptor List:
"L2CAP" (0x0000)
"RFCOMM" (0x0000)
Channel: 11
"OBEX" (0x0000)


Take the channel number and remember/paste it somewhere.

Configuring the plugin

Run this to open a Vi session for editing the SyncML plugin config

msynctool --configure SyncMe 2


Edit the config. Put your phone's MAC address into the bluetooth_address tag and the SyncML OBEX Client channel into bluetooth_channel tag.

Set also the wbxml tag to the value 1 and the type tag to 2. For the calendar tag, change the value from calendar to agenda.

You configuration should look somehow like this after editing

<?xml version="1.0"?>
<config>
<!-- (Only for blue) The bluetooth address if the bluetooth mode is selected -->
<bluetooth_address>xx:xx:xx:xx:xx:xx</bluetooth_address>

<!-- (Only for blue) The bluetooth channel to use (usualy the 11) [x] -->
<bluetooth_channel>11</bluetooth_channel>

<!-- (Only for USB) The usb interface number of the SYNCML-SYNC target. use syncml-obex-client -u (as root!) to find it. -->
<interface>0</interface>

<!-- The string that the plugin will use to identify itself. Some devices need a special string here. -->
<identifier></identifier>

<!-- The syncml version to use: 0 for 1.0, 1 for 1.1 and 2 for 1.2 -->
<version>1</version>

<!-- if the plugin should use wbxml -->
<wbxml>1</wbxml>

<!-- The username to use. Leave empty to not require a username -->
<username></username>

<!-- the password for the username -->
<password></password>

<!-- sets the connection type to use. 5 means obex over usb, 2 means obex over bluetooth -->
<type>2</type>

<!-- If wbxml is enabled, defines wether the wbxml should use string tables -->
<usestringtable>0</usestringtable>

<!-- Never send ADD command, but send REPLACE (not needed normally) -->
<onlyreplace>0</onlyreplace>

<!-- Sets the maximum allowed size in bytes of incoming messages (some device need this option set). Example: 10000 -->
<recvLimit>0</recvLimit>

<maxObjSize>0</maxObjSize>

<!-- The name of the contacts db. Must be the same as the phones sends -->
<contact_db>contacts</contact_db>

<!-- The name of the calendar db. Must be the same as the phones sends -->
<calendar_db>agenda</calendar_db>

<!-- The name of the note db. Must be the same as the phones sends -->
<note_db>notes</note_db>
</config>


Synchronizing

Now that the configuration is done, you can sync your phone's calendar with Evolution's calendar by running this command.

msynctool --sync SyncMe


Done~. Your calendars should be synchronized after that.

Btwm there are some problems I'm facing with the sync process. For the contact sync, your contacts might be duplicated a lot of times (which annoys me and made me disable contact syncing altogether). Another problem is that the TODO sync doesnt work, and I get write error sometimes.

If anybody got a workaround for this , please tell me kay :D.

References
http://en.opensuse.org/OpenSync/SyncML-OBEX-Client
http://www.gentoo.org/doc/en/bluetooth-guide.xml
http://www.harald-hoyer.de/linux_and_syncml_multisync_with_nokia_6280
http://blog.dukanovic.com/?p=5
Post a Comment