View Single Post
Posts: 74 | Thanked: 142 times | Joined on Oct 2009 @ Chicago, US
#1
I recently bought a used N900 and I was unhappy with the state of syncing multiple google calendars to the N900. There is "Erminig-NG". However, it is still alpha-quality software and recently some users reported problems (possibly due to changes on the google side). So I started looking for alternatives..

Luckily, Syncevolution recently gained CalDAV/CardDAV support, which means we can use it to sync to google calendar without using a third-party SyncML server.

The following howto describes how to setup syncing the default calendar and another calendar to google.

BE WARNED: A mis-configuration may screw up your calendars and I will not take responsibility for this. Also: I have yet to figure out how to get Syncevolution to accept google's SSL certificate. For now, SSL certificate verification is disabled, which opens the doors to MITM attacks and synchronization should only be performed from trusted networks. Hopefully we will soon figure out how to get SSL working correctly.

Prerequisites:

Install syncevolution version 1.1.99.5-1 (earlier versions don't support CalDAV/CardDAV)

A) Synchronizing the Default Calendar:

This is really simple. On your N900 execute the following (as user, not root):

Code:
syncevolution --configure \
             --template google-calendar \
             username=USER@gmail.com \
             password=PASSWORD \
             target-config@default_google


syncevolution --configure \
              --template SyncEvolution_Client \
              syncURL=local://@default_google \
              username= \
              password= \
              default_google \
              calendar
Disable SSL verfication by setting "SSLVerifyServer = 0" in ~/.config/syncevolution/default_google/peers/target-config/config.ini

Then perform the initial synchronization:
Code:
syncevolution --sync slow default_google
If this doesn't work, you can replace "slow" with "refresh-client", which will DELETE ALL ENTRIES ON THE N900 and copy all google entries to the N900.

After that, you can perform incremental synchronizations using

Code:
syncevolution default_google

B) Synchronizing Other Calendars:

This is somewhat more complicated to setup and I am sure there is a better way. Assume you have a calendar called "Test" on your N900 which you would like to sync to a google calendar (other than your default calendar on google).

The following assumes that you have already setup synchronization of the default calendar, as described above.

First, get the calendar ID by going to the google calendar settings page. The ID is where it says "Calendar Address:", next to the ICAL/XML/HTML buttons. Here we assume the ID is

Code:
m8e82832ooj4vcdcdcsdcdaa@group.calendar.google.com
On your N900 execute the following (as user, not root):

Code:
syncevolution --configure \
             --template webdav \         syncURL=https://www.google.com/calendar/dav/m8e82832ooj4vcdcdcsdcdaa@group.calendar.google.com \
             username=USER@gmail.com\
             password=PASSWORD\
             target-config@test_google 


syncevolution --configure \
              --template SyncEvolution_Client \
              syncURL=local://@test_google\
              username= \
              password= \
              test_google \
              calendar
This sets up a synchronization with the "test calendar" on google with the default calendar on the N900, which is not what we want. To get it to synchronize correctly do the following:

Code:
cd ~/.config/syncevolution
cp -r default test
rm -rf default/peers/test_google
rm -rf test/peers/default_google
Then specify which calendar on the N900 should be used by editing the file test/sources/calendar/config.ini and setting
Code:
database = Test
Note: You can list the available calendars on the N900 by running syncevolution without any parameters.

Disable SSL verfication by setting "SSLVerifyServer = 0" in ~/.config/syncevolution/test_google/peers/target-config/config.ini

Then perform the initial synchronization:
Code:
syncevolution --sync slow test_google
and after that do incremental syncs using
Code:
syncevolution test_google
That's it . Now you can just run the sync commands as a cronjob and you are all set.

As mentioned above, I still haven't figured out how to get the SSL certificate verification working. I tried downloading a ca-cert-bundle and setting SSLServerCertificates in the config.ini file, as described here, but for some reason it doesn't seem to work.
 

The Following 14 Users Say Thank You to pinsh For This Useful Post: