Active Topics

 


Reply
Thread Tools
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:
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#2
THANKS A LOT!

I have just noticed a few minutes ago that there was a new version of syncevolution (frontend only?) on extras-devel.

I have updated it and re-sync'd my contacts (I only use it for that), and worked OK (I did not expect that, to say the truth

For now I'll continue using erminig-NG for the calendar, but when I have some time to experiment I'll try syncevolution.. so thanks again for this HOWTO
 
Posts: 74 | Thanked: 142 times | Joined on Oct 2009 @ Chicago, US
#3
I'm glad you like it . Let me know if you have any problems or find out how to get SSL working correctly.

BTW: I just tested if repeating events work. I created an event that repeats weekly (for a specific number of occurrences ) and I see the event correctly on the N900 (including repetitions etc) and editing the event on the N900 works.

On the other hand, I created an event on google that repeats twice per week on Wed and Fri at a specific time. The event shows up correctly on the N900 but when editing it is says something like "Complex repetition, unable to edit" (for the repetition pattern, other things can be edited). Deleting the event on the N900 correctly deleted all instances of it on google calendar.
 

The Following User Says Thank You to pinsh For This Useful Post:
Posts: 46 | Thanked: 8 times | Joined on Sep 2010
#4
Hello.

Thanks a lot for this!! However, I'm trying to do this and i'm getting this error.

Nokia-N900:~$ syncevolution --configure \ --template google-calendar \ username=X \ password=X \ target-config@default_google
ERROR: no configuration template for ' --template@default' available. Use '--template none' and/or specify relevant properties on the command line to create a configuration without a template. Need values for: syncURL
Available configuration templates (clients and servers):
template name = template description
eGroupware = http://www.egroupware.org
Funambol = http://my.funambol.com
Google_Calendar = event sync via CalDAV, use for the 'target-config@google-calendar' config
Google_Contacts = contact sync via SyncML, see http://www.google.com/support/mobile...py?topic=22181
Goosync = http://www.goosync.com/
Memotoo = http://www.memotoo.com
Mobical = https://www.everdroid.com
Nokia_N900 = Template for all Nokia phones which support contacts, notes and combined tasks+events
Oracle = http://www.oracle.com/technology/pro...ive/index.html
Ovi = http://www.ovi.com
ScheduleWorld = server no longer in operation
Sony_Ericsson_K750i = Template for old Sony Ericsson phones, with separate databases for contacts/events/tasks/memos and SyncML 1.1
Sony_Ericsson_W595 = Template for all current Sony Ericsson phones, with separate databases for contacts/events/tasks/memos and SyncML 1.2
SyncEvolution = http://www.syncevolution.org
SyncEvolution_Client = SyncEvolution server side template
Synthesis = http://www.synthesis.ch
WebDAV = contact and event sync using WebDAV, use for the 'target-config@<server>' config
Yahoo = contact and event sync using WebDAV, use for the 'target-config@yahoo' config
Nokia-N900:~$
 
djdas's Avatar
Posts: 77 | Thanked: 49 times | Joined on Apr 2010 @ Italy
#5
Uhm, it seems the template name is wrong, try "Google_Calendar" (without quotes) instead of "google-calendar" in the command line.
 
Posts: 46 | Thanked: 8 times | Joined on Sep 2010
#6
Hmmm, thanks but still:


ERROR: no configuration template for ' --template@default' available. Use '--template none' and/or specify relevant properties on the command line to create a configuration without a template. Need values for: syncURL
 
djdas's Avatar
Posts: 77 | Thanked: 49 times | Joined on Apr 2010 @ Italy
#7
Try this (all in a row) substituting your real username and password instead of "X"
Code:
syncevolution --configure --template Google_Calendar username=X password=X target-config@default_google
 

The Following 3 Users Say Thank You to djdas For This Useful Post:
Posts: 46 | Thanked: 8 times | Joined on Sep 2010
#8
This seemed to work!

Excuse me, as I did not understand that the \ meant line break not to be included in the code (facepalm).

Ok. Now, the N900 calendar didn't get test events I created on google calendar's web client.

I deleted all my calendars in N900 (except from N900 and Private, which can not be deleted) and repeated the sync refresh-client command, and now it works!

Used the syncEvolution app to daily set syncs!

Thanks a lot!

PS: Anyidea for birthdays? I have them set as all day events in gCal, but wanted to know if there is a more stilish way.
 

The Following User Says Thank You to iTor For This Useful Post:
djdas's Avatar
Posts: 77 | Thanked: 49 times | Joined on Apr 2010 @ Italy
#9
Well, my contribute stops here as I simply tried to solve shell errors but never used syncevolution, sorry!
The simplest way to get birthdays for me is setting the birth date of my contacts and they magically appear in my calendar
Glad to be helpful
Bye!
 

The Following User Says Thank You to djdas For This Useful Post:
Posts: 46 | Thanked: 8 times | Joined on Sep 2010
#10
Haha, thank you very much for the help, nonetheless!
 
Reply


 
Forum Jump


All times are GMT. The time now is 00:37.