GSoC updates: the client agent

This follow-up post is about my proceedings for my GSoC project to integrate SyncML support in Akonadi. This consists basically of two parts, a server agent and a client agent. The former allows other devices to talk to your Akonadi server while the latter let’s your Akonadi server speak with others. Quite simple? Not really, SyncML is a complex and error-prone beast. That said, the server component might take some time to be ready, but the client agent is actually useful now. So let’s have a little test session!

The following stuff is pretty low-level, requires some compiler/shell knowledge, a KDE development environment set up and is not intended for end-users. Still there?

Compilation
If you have your KDE development environment up and running, just checkout trunk/playground/pim/syncml from KDE SVN. You need to have libfunambol installed, which you can either compile for yourself from source our use a package from that repository (a patched libsyncml is available too, if you want to build the server agent). Not much to say here, just build and install it.

Setup
If you’ve reached this step you now should be able to add a SyncML client agent in the Akonadi resource configuration control module (system settings -> advanced tab -> akonadi configuration):

syncmlclient-agent-3

If you did so, you should now be presented with the following configuration dialog:

syncmlclient-agent-4

There you can setup the remote server (speak web-service) you want to sync with. Your job is basically to decide what parts of your PIM-data you want to be synced (contacts, calendar, etc.) and how to match the corresponding local Akonadi resource with the remote database on the server. Some more advanced values will be exposed soon, SyncML has gazillions of options available! Here are some possible values to toy with:

myFunambol.com

URL: http://my.funambol.com/sync
username/password: you should register!
contacts remote db: card
events remote db: event
tasks remote db: task
notes remote db: note

ScheduleWorld.com

URL: http://sync.scheduleworld.com/funambol/ds
username/password: you should register!
contacts remote db: card
events remote db: cal
tasks remote db: task
notes remote db: note

Mobical.net

URL: http://www.mobical.net/sync/server
username/password: you should register!
contacts remote db: con
events remote db: cal
tasks remote db: task
notes remote db: vnote

Rumors have it that some Google services are also SyncML-capable but I don’t know the settings needed. Feel free to post a comment if you know something here. As a sidenote, you can actually have multiple agents for several remote sides in parallel.

Showtime!
For now all that stuff lacks a GUI, there’s some initial work on a KControl module but for now we have to communicate via D-Bus with the client agent. The same is true for visual feedback. The agent is able to tell you whether the sync succeeded or not. If you want to know more, you have to watch Akonadi’s debug output for now. Fire up a terminal and enter the following stuff:

$ akonadictl restart
$ qdbus org.freedesktop.Akonadi.Agent.akonadi_syncmlclient_agent_0 / sync

Before you actually try this, be warned! This is unstable code that is still in heavy development and all kind of weird things may happen to your PIM data, so make a backup before you proceed.

syncmlclient-agent

33 thoughts on “GSoC updates: the client agent

  1. You have no idea how much synchronization is missed on kde right now. This may be a life saver. I am not much of a programmer but if you ever need help translating of on artwork, just shout.

  2. For GMail, google only supports Contacts. Calender or tasks or notes are not supported. You can find details @
    http://www.google.com/support/mobile/bin/topic.py?topic=22181

    erver version: 1.2
    Server ID: Google (capital ‘G’ is important)
    Host address: https://m.google.com/syncml (Important to enter https for a secure connection)
    Port: 443
    User name: your Google Account username, e.g. you@googlemail.com
    Password: your Google password
    contacts remote db: contacts

  3. can it be some more foolproof ? i can’t firegure out what syncML settings i need to set 😦

  4. Maybe you can make use KHNS (? KHot New Stuff) to share profiles for different SyncML profiles (eg a google one, a tunabol …)?

  5. Good work Sasha, I hope that it get mature enough to be added in akonadi.

    I’m just curious about syncml over bluetooth (i.e. required to sync your cellphone directly with the desktop). What is the status of it?

    Regards

    Adenilson
    a.k.a. Savago

  6. Hi,

    I have some trouble making this work. Installation of libfunambol and syncml-client work great and after a restart of the Akonadi server, I also can add the SyncML Client Agent.

    I paste the correct settings (same as on my phone) and then want to set the local contact resource (I use a std.vcf file and have configured it in Akonadi). But when I click on the floppy icon, the new window which should contain a list of resources is empty.
    When I use an older version of the agent, clicking “OK” will colour the missing resource red but clicking on the floppy icon again will give me no choice of resources.

    When I uncheck all resources (no contacts, events, todos or noted), and click “OK”, no new entry will show up in the Akonadi list.

    I use KDE 4.3 on a current Gentoo system.

    Best regards,
    Freddy

  7. Can I help you somehow with finding the problem? Do you need any further information?

  8. Hi Sascha, how is the project going?

    I’ve seen some Wrap up’s from other GSoC students. But this project I’m eager to hear about remains quiet ;(

    No, just kidding, but can you give a status update? I know the GSoC period is over now and there’s still a lot to do for this project. I can’t code myself, but it might get the attention of some others?

  9. Hi and thanks for your work on this. I was able to sync my contacts from my computer to my phone over Funambol, which was quite nice considering that I just lost all my data as I had to full-reset my phone.

    This was using Fedora 11 with KDE 4.3, with homecompiled syncml client and the libfunambol package offered in the repository you linked.

    Thanks a lot again 🙂

  10. Sorry for the late answer, you can expect more stuff and a blog post soon… Hower, at the moment I’m still on vacation (4th week now), so an update might take à agile.

  11. Wow, just found this page and am deeply impressed how far the thing iwas dreaming about already got… But do you know about the “akunambol” project (somewhat around end 2008) which also tried to make a funambol/syncml-client for akonadi???

  12. Hello, I installed both funambol and the syncML client, but when I go to Akonadi and the client, nothing happens. It closes the add screen, but no config dialog comes up and it is not listed in the resource list. Any ideas?

  13. Yes, I built and installed both from scratch. I’m running Arch with KDEMod 4.3.3

  14. Nope, it certainly won’t. First of all we’re already past the feature freeze, furthermore the code is just not ready yet. I haven’t had the time to improve it much recently, however this will change soon.

  15. Hi, I also managed to install your Plugin on Gentoo with kde-4.3.4. But when I close the config dialog, it doesn’t show up in the Resource List, though it is apparently present: qdbus shows a new instance oforg.freedesktop.Akonadi.Agent.akonadi_syncmlclient_agent_ each time I close the config dialog.

    But when I issue the dbus command at the console, the KDE Crash Handler shows up and reports a segfault in akonadi_syncmlclient_agent, and at the konsole appears:

    Error: org.freedesktop.DBus.Error.NoReply
    Message did not receive a reply (timeout by message bus)

  16. I read that SyncML have been moved to KDE core in 4.4 version:
    http://www.omat.nl/2009/10/17/akonadi-meeting-day-1-discussions-api-review/
    # Work on the SyncML client is improving steadily. It will be merged into KDE 4.4. It is an Akonadi Agent and I think we still need an GUI for it, but the framework will be there. I’ll blog about it more when we have had the demo.

    I have KDE 4.4 Beta2 on Kubuntu Karmic, but can’t find any records about SyncML near akonadi 😦
    How I can add the akonadi syncml agent to my KDE?

  17. It certainly won’t make it for KDE-4.4, it simply isn’t ready for that, yet. Furthermore I’m in the middle of adapting to a different SyncML backend. If you want to test it, you have to build it from source (it’s found under playground/pim/syncml in KDE SVN).

  18. Sascha, does version from svn works successfully on kde 4.4 or it isn’t ready for normal work at now?
    I didn’t try to compile from sources before, but I try to start with your package, because I very needs to SyncML sync my mobile contacts and KDE addressbook.

  19. I have try to build from SVN and have the error:
    $ cmake .
    — Found Qt-Version 4.6.0 (using /usr/bin/qmake)
    — Found X11: /usr/lib/libX11.so
    — Phonon Version: 4.3.1
    — Found KDE 4.4 include dir: /usr/include
    — Found KDE 4.4 library dir: /usr/lib
    — Found the KDE4 kconfig_compiler preprocessor: /usr/bin/kconfig_compiler
    — Found automoc4: /usr/bin/automoc4
    — checking for one of the modules ‘libsyncml-1.0’
    — found libsyncml-1.0, version 0.4.6
    — Could NOT find FUNAMBOL (missing: FUNAMBOL_LIBRARY FUNAMBOL_COMMON_INCLUDE_DIR FUNAMBOL_POSIX_INCLUDE_DIR)
    — Configuring done
    — Generating done

    Where can I find FUNAMBOL include files?

  20. As I said, it can be used and (mostly) works but it is not ready for productive use, it could even eat your contacts, who knows. Be sure to have a backup ready before trying it. I promise to continue work after christmas *g*

  21. You can use the funambol packages from my buildservice repository if you’re an openSUSE user. Otherwise you simply have to build it for yourself like I explained in this blog posting.

  22. No, I’m not on OpenSUSE, I’m a Kubuntu user 😦
    I’ll try to build something something myself…

  23. Hello, I installed funambol and the syncML client. I open Akonadi and the syncml client appears to be added. The configuration dialog opens and I can write on it,but when I push “ok” in this dialog, it is not listed in the resource list. I don’t get any error message, simply nothing happens. What could be wrong? Thank you!

  24. Hi Sascha,
    I’d really like to use your tool, but I can’t even get akonadi to show it.
    I installed funambol, even installed the libfunambol from your repository (aliened it do kubuntu), checked out the source and moved it to /opt/kcmsync.
    Ran cmake, make, make install.
    Did I do something terribly wrong?

    Regards,
    chmuilmastar

Comments are closed.