6.0.0-git
2024-04-25
Last Modified 2006-09-28 by Guest

How to configure a device to sync with Horde 3.1

General information

Syncing is not yet production-level code - you need to be able to at least read logfiles! Testing is welcome; please report to the sync list (sync@lists.horde.org), but please keep in mind that the code is still in heavy development.

  • you have to use the cvs version or a cvs snapshot. The latest stable release won't do.
    • client configuration is as follows:
      • The sync URL is http(s)://pathtoyourhordeinstall/rpc.php
        • Username/password: your Horde account data
    • Databases (sometimes called remote settings or 'server path') must be calendar, tasks, notes, or contacts.
    • For debug output create dir /tmp/sync and make it writeable by web server
    • Set log level to PEAR_LOG_DEBUG in Administration:Horde Setup_Logging. It may be helpful to filter the logs as follows:


tail -f /tmp/horde.log | grep "SyncML:"

  • The SyncML part of the logs is now alswo available on the SynclML options page of the horde options (use a recent prefs.php or go directly to http(s)://pathtoyourhordeinstall/rpc.php/services/portal/syncml.php)

Additional information for syncing with Outlook

  • You need the sync4j outlook connector. Go to http://www.sync4j.org/ -> Download -> v2.2 stable release -> SyncClient PIM Outlook 1.4.3. Download and install.
    • Configure as mentioned above. Device ID must be sc-pim-outlook or anything containing the text sync4j so that the Horde backend can identify the connector. If you're using multiple instances of the connector (one on your home pc, one on your laptop), make sure that the device ID is different on those.
    • Sync4J Outlook Client needs to have the port configured in the sync url when using https, i.e. https://pathtoyourhordeinstall:443/rpc.php

Additional information for syncing PDAs

  • Syncing of PDAs requires the Synthesis Sync Client available from http://www.synthesis.ch/. There's a 30 days trial version.
    • Make sure to set the events server path to "calendar"
    • Uncheck the "only from 30 days before until 90 after today" setting

Sync clients being used succesfully:

  • Synthesis client (v2.5.0.30) -> PDA -> USB serial cable -> Powerbook G4 running The Missing Sync (http://www.markspace.com/missingsync_palmos.php) -> Horde test installation
    • Sony Ericsson P800/P900
    • Outlook with Sync4j SyncClient PIM outlook 1.4.3
      • NOTE: Sync4j is now called Funambol (http://www.funambol.com). Various problems syncing Horde 3.1 with "Funambol Outlook Client 3.0 beta 1".

*UPDATE: Notes, tasks and calendar work well with "Funambol Outlook Client 3.0 beta 7" however selecting contacts will cause a memory overflow. http://www.funambol.com/opensource/download_form.html?file_id=funambol-outlook-plugin-3.0.7.exe

Cleaning up when testing

DO NOT USE THIS IN PRODUCTION!

If you're debugging and want to clean out data between sync attempts, you can try this set of commands if you use mysql (or adjust appropriately for other backends):


delete from kronolith_events where calendar_id='YOUR CALENDAR';

delete from horde_datatree where group_uid='syncml';

delete from horde_datatree_attributes using

    horde_datatree_attributes left join horde_datatree on

    horde_datatree_attributes.datatree_id=horde_datatree.datatree_id where

    horde_datatree.datatree_id IS NULL;

You can clear all session files (assuming the default backend) with rm -f /tmp/sess_*.

You'll have a lot of entries in the datatree with a group_uid of 'horde.history'. You will lose information from more than syncing by clearing them out, but you can do so. It is also useful to clear out horde.log and /tmp/sync to get a better feel for what is from the current sync attempt and what is not.

Using a Palm simulator to test the Synthesis client

  1. Download Palm simulator (for version 5.4) from http://www.palmos.com/dev/tools/simulator/ (free registration required).
    1. Unzip somewhere, start debug/PalmSim_54_dbg.exe, select a suitable ROM (included in debug dir)
    2. Right-click on Simulator and click Settings > Communications > Redirect SocketLib Calls to Host TCP/IP
    3. Download and unzip synthesis client for PalmOS from http://www.synthesis.ch/
    4. Install simulator by dragging the enclosed .rpc file into the simulator window.
    5. Start & configure the Synthesis client. Start a sync run.

How to write a SyncML test case

The SyncML package contains a testing script to replay prerecorded test sessions. This allows the developers to check if changes break things for one particular phone. So it would be great to have test cases for as many phones as possible. Here's how to create one:

  • Preparations in Horde:
    • create a user "syncmltest" with password "syncmltest" in horde. If the user's already there first delete and then recreate to get a fresh start.
      • create a single test entry in the app you want to test (kronolith|nag|mnemo|turba). The entry should be named "server1" and the description should contain an umlaut for charset testing.
    • Preparations in the Client (PDA/Outlook/whatever)
      • Create a single testentry named "client1". A description containing an umlaut is also helpful. The database must only contain this single entry (so you might need to do a backup of your phone first)
    • Clean /tmp/sync: rm/tmp/sync/
    • Clean Horde SyncML Data. Login as user syncmltest and go to http:[yourinstall]/horde/services/portal/syncml.php. Use the button "Delete all SyncML Data" to delete all data for the syncmltest user.
    • Do a first sync run
    • In Horde: rename the "client1" entry to "client1s1" and create a new simple entry named "server2"
    • In the client: rename "server1" to "server1c1" and create a new simple entry named "client2"
    • Do second sync run
    • Do a third sync run. This should do nothing
    • In the client, delete server2
    • in the server, delete client2
    • do a fourth sync run
    • The test itself is now finished. The database should now have to entries: client1s2 and server1c1
    • If your phone uses wbxml this must be converted to xml first: in /tmp/sync do a for a in *.wbxml; do wbxml2xml -m 0 -o syncml_server_42.xml syncml_server_42.wbxml; done
    • copy all *.xml in /tmp/sync into a directory under framework/syncml/tests with name testcase_[descriptionoftestcase]
    • in framework/syncml/tests do a ./testsync.php --dir=testcase_[descriptionoftestcase] to run the test.

Links

SyncMLDevicesFileFormats

SyncRoadMap

FAQ

Syncing of events fails with a log entry like "No sync object found for URI=calendar?dr(-30,90)"

Syncing of date ranges as used by the Synthesis client is not yet supported. Please uncheck the "only from 30 days before until 90 days after today" checkbox.

I can't find any *.xml log files in /tmp/sync anymore. They used to be there!

We now use our own wbxml libary in the XML_WBXML package. The wbxml gets directly passed and processed, no xml is produced. To see the xml, you can manually decode it like this:


for a in *.wbxml; do wbxml2xml -m 1 -i 4 -o `basename $a .wbxml`_conv.xml $a; done 2>/dev/null

I really don't want to upgrade my complete Horde installation. What can I do?

Nothing. This is cutting edge technology, so you need to invest a bit if you want to participate at these exciting new features.