Installation
First check out libsyncml:
svn co http://svn.opensync.org/libsyncml/trunk libsyncml
Then check out the latest libsoup from gnome cvs. There are some required patches in there:
svn co http://svn.gnome.org/svn/libsoup/trunk libsoup
Now run autogen.sh, configure and install libsoup.
Also, please make sure that you are using a patched wbxml library. if you dont have the patched wbxml library please download wbxml2 from http://sourceforge.net/project/showfiles.php?group_id=55834&package_id=77694
Then apply the patch from misc/wbxml2-0.9.0.patch to the library and install it.
Then build and install libsyncml
cd libsyncml autoreconf -sfi ./configure make install
If you installed libsoup in a non-standard location, please set the path to the pkg-config files using: EXPORT PKG_CONFIG_PATH=/path/to/dir/with/pcfiles
Also make sure that at the end of the configure of libsyncml, it says "Http Server: Enabled". Otherwise please review your installation of the libsoup.
Now, the tool is ready to use.
Usage
Please make sure that the port you want to use is accessible from the outside (check firewall etc)
Now you can run the first "sync" against the device. syncml-http-server is not a real synchronization tool. It is rather used for testing. The tool will list all entries that the device wants to sync and is also capable of adding items to the device.
If you want to display the contacts for example you could type:
syncml-http-server --sync text/x-vcard Contacts
The --sync options states that you want to sync vcards and that your local database is named "Contacts". This example would send syncml as plain xml. The tool would then go into listening mode and wait for incoming connections. You then have to enter your ip address, port etc on the device and start the sync.
Another example:
syncml-http-server --sync text/x-vcard Contacts --sync text/x-vcalendar Calendar --port 9999
This would get the contacts and the calendar entries (This example works for a Nokia 6680). It would also listen on the port 9999 for incoming connections. Note that you dont have to set wbxml explicitly. libsyncml detects the incoming packets and sets wbxml automatically if needed.
You can also add content to the device by using this for example:
syncml-http-server --sync text/x-vcard Contacts --sync text/x-vcalendar Calendar --add text/x-vcard ~/test.vcard
The test.vcard file has to be a file containing a plain vcard that the phone can understand (mostly 2.1 vcards).
Troubleshooting
If it does not work try the following:
- Change the name of the database ("Contacts" and "Calendar" in the example)
- You can safely ignore the "I/O error : Attempt to load network entity" errors
- Check with netstat -npa when the tool is running to see if the port is opened
- Use a network sniffer like ethereal to take a look at the data being transmitted
If it does not work at all, please send me a bug report (see below)
Bug Reports
First, you should enable tracing by typing:
export SYNCML_TRACE=/path/to/log/dir
Run the tool again with tracing enabled to get a trace (2 files in the log directory). Then send these 2 files to armin.bauer@desscon.com (busy with work) dgollub@suse.de, along with information about the manufacturer and model of your device.
Thanks for your help!
