For the sake of anyone else who might want to know about this in advance, I'll blog my failure.
I tried with Kubuntu Karmic, and the following steps:
Install the necessary packages:
sudo aptitude install opensync-plugin-kdepim opensyncutils barrybackup-gui barry-util opensync-plugin-barryPlug in the Blackberry, and choose "Mass storage" mode on the Blackberry.
Set up permissions to allow a non-root user to access the device. I added the file
/etc/udev/rules.d/040-devices.rules, with the following contents:BUS=="usb", SYSFS{idVendor}=="0fca", SYSFS{idProduct}=="8004", GROUP="admin"The above line gives permissions to all users of group 'admin', which includes my normal user. The numbers "0fca" and "8004" are device numbers obtainable from
lsusb:lsusb | grep "Research In Motion"Result:
Bus 002 Device 008: ID 0fca:8004 Research In Motion, Ltd.You will need to unplug the Blackberry and plug back in after this step.
Check you can access the Blackberry.
btool -tThis should list a series of databases on the Blackberry
Back up the current contents:
barrybackupNote the pin for later, and follow the prompts to backup the Blackberry data.
Back up your KDE-PIM data, in case of any corruption, duplicate elements etc. (It happened to me!).
Create a msynctool configuration for doing the synchronisation.
msynctool --addgroup Blackberry msynctool --addmember Blackberry barry-sync msynctool --addmember Blackberry kdepim-sync msynctool --showgroup BlackberryThe final command should show the first member as missing configuration. Do the following
msynctool --configure Blackberry 1and insert your pin in the relevant place.
Moment of truth. Close KOrganizer and KMail, then:
msynctool --sync Blackberry
I came across the following major bugs:
- Syncing never completes, and I have to press Ctrl-C to abort.
- When I try to sync a second/third time, I end up with lots of duplicates on my computer, caused by items from the Blackberry being copied back. I'm not sure if they are to do with the unclean abort, or the following symptoms:
- 'All day events'. A duplicate appears with the start time set to '0:00'
- Daylight savings problems - for summer events, a duplicate appears 1 hour different from the original
- Items from my Google calendar (which is a read only calendar) got copied back to my main calendar.
- Each time I attempt to sync, duplicate events and contacts build up on the Blackberry as well.
- Using barrybackup to restore to a clean state with the backup made previously fails with lots of errors. By removing some items in ``~/.barry/backup/<pin>/config, I've got it to apparently succeed, but the contacts and calendar on the Blackberry are not cleared out, which is the point of the exercise.
- There is a way to clear calendar/contacts on the Blackberry. Go to Calendar -> Menu -> Options. Type RSET. The calendar will be cleared (though it says nothing). Repeat for contacts. This time you will get a prompt about clearing. Clearing out the msynctool database is also a good idea to keep further attempts clean and fast.
In the end, a one-time, one-way sync is all that I have been able to achieve. That is quite disappointing, since none of the web pages I found before deciding on a Blackberry mentioned any problems like these.
I tried upgrading all the barry packages from 0.14 to 0.16, but got lots more errors - when trying to send data to the Blackberry I just got "Timeout in usb_bulk_read" blah blah and do data was actually sent.
Sources:
Comments §
Shane
I think I can provide some useful hints about syncing the Blackberry with Evolution, especially the one-way problem:
My configuration on a Fedora 12 machine is:
evolution-2.28.3-1.fc12.x86_64
evolution-data-server-2.28.3-2.fc12.x86_64
syncevolution-0.9.2-1.fc12.x86_64
barry-opensync-0.17-0.1.20100329git.fc12.x86_64
barry-libs-0.17-0.1.20100329git.fc12.x86_64
barry-0.17-0.1.20100329git.fc12.x86_64
libopensync-plugin-syncml-0.22-3.fc12.x86_64
libopensync-plugin-irmc-0.22-3.fc12.x86_64
libopensync-plugin-evolution2-0.22-3.fc12.x86_64
libopensync-0.22-5.fc12.x86_64
(don't think everything is necessary)
FIRST: MAKE BACKUPS OF YOUR EVOLUTION FOLDER!! Also make a backup of the phone, barrybackup seems to work fine.
It is important to configure udev so that a normal user can access the Blackberry. You wrote about this, and its essential, otherwise the sync does not happen.
<?xml version="1.0"?>
<config>
<address_path>default</address_path>
<calendar_path>default</calendar_path>
<tasks_path/>
</config>
I changed that to:
<?xml version="1.0"?>
<config>
<address_path>file:///home/[USER]/.evolution/addressbook/local/system</address_path>
<calendar_path>file:///home/[USER]/.evolution/calendar/local/system</calendar_path>
<tasks_path/>
</config>
But I realized that this changed back after a while. Cannot say if the reason was that I deleted the directory 'group1' to start from scratch or barry writes
the 'default' entry back into the file. Unsure if this makes a difference at all. But for any case I changed the owner to 'root' and then the permissions so that only root can change the file and everyone else can read it. Since then, the file is unchnaged of course, and the sync works.
All my first syncs failed, and then next barry runs a slow sync ("last sync unclean blah blah"). You should always avoid that, just delete the empty file "lock" under ~/.opensync/group1.
I cannot tell why the first syncs do not complete (had it run overnight once, but useless). I guess that when you just sync the first time and it has to resolve a lot of conflicts (had 10.000+ calendar entries to sync), barry just gives up (barry needs an awlful lot of system resources). Have no better explanation, maybe someone knows more.
[ENTRY IN EVOLUTION]
...
<summary:Sabine>
[ENTRY IN BLACKBERRY]
...
<summary:Sabine Lipp>
So the contents of the compared entries are different, and I wonder why I am asked to keep one and throw away the other. But this only happened when syncing the contacts.
If you want to start the sync from scratch, I assume you have to deleted the file calendar.ics-blackberry.db and blackberry.changes.db in the Evolution sub-folders. These must be information about earlier syncs, so this might be the reason for duplicates. It may also be a good idea to delete the files barry_calendar_cache.txt, barry_calendar_idmap.txt, barry_contacts_cache.txt, barry_contacts_idmap.txt id in the evo-barry sub-folder of opensync.
I think I can provide a solution to the one-way sync problem:
Evolution synced to the Blackberry, but changes in the Blackberry were not synced to Evolution. This happened after (!) a configured an email address on the phone. When you add an email address, the Blackberry automatically adds a CICAL service for the email, you find it in the advances settings / service book. This is a calendar for the email address, and the Blackberry then takes it as default calendar. So you end up with two different calendars on the phone, BUT ONLY ONE IS SYNCED.
If you have only a one-way sync, try the command 'btool -t' to look at the entries in the phone. There is one directory called 'Calendar' and one called 'Calendar -All'. if 'Calendar is empty and 'Calendar - All' full of entries, there is something wrong. If you have only one calendar on the phone (i want it that way), then there should be the same number of entries in 'Calendar' and 'Calendar - All'. I guess 'Calendar - All' is an aggregation of all calndars on the phone. Run 'btool -T' and have a look.
Database database:
Database: 0x0 'Calendar Options' (records: 1)
[...]
Database: 0x2c 'Calendar - All' (records: 10738)
[...]
Database: 0x3c 'Calendar' (records: 0)
My solution was: hard-reset the Blackberry (!this semms to be necessary!), set up the email address, CLEARED THE CICAL-ENTRY IN SERVICE BOOK, so there was only the default calendar on the phone, synced (which was only an import of the Evolution entries to the empty Blackberry calendar). Afterwards, 'btool -t' showed:
Database database:
Database: 0x0 'Calendar Options' (records: 1)
[...]
Database: 0x2c 'Calendar - All' (records: 10738)
[...]
Database: 0x3c 'Calendar' (records: 10738)
That' OK! My Blackberry suddenly synced two-way with Evolution! If you add another email and do not want that the Blackberry adds a calendar for it, delete the CICAL-entry immediately!
There is another flaw in my syncs: syncing repeating events does not work properly. If I transfer a repeating event from the Blackberry to Evolution, the event is written to the data file (calendar.ics) but not shown by Evolution. It is not thrown away, Evolution simply in most cases refuses to show it on the screen - some repeating events are shown, but only as one-time events. Evolution is a piece of shit - it has been for years, just got used to its flaws so I don't mind anymore.
Another problem was that my Evolution calendar goes back many years, but the Blackberry calendar has the default setting to throw away entries older than sixty days! At one early sync, this wiped out all the older entries in Evolution! If you do not want that, change this setting.
I also have not found a way to access the SD card over USB on Linux. But you can always take the card out and put it into a card reader.
One last word: the Blackberry is a nice thing, but the configuration is very tricky - configuring it for syncing with Linux even more. I spent so many hours on this, you wouldn't believe. Hope this all helps others a bit! Sorry that there is so much guessing in my text, but at least I got the sync to work.