HOWTO: Sync Contacts between BlackBerry and Evolution on Fedora 10
1. Overview
Open source tools are available to sync a BlackBerry with Evolution but it appears these tools are not supported by Fedora 10. The main thing that seems to be missing is the Barry plugin for OpenSync. Maybe the reason that this package has not been created is that Barry requires OpenSync version 0.22, whereas F10 ships OpenSync version 0.36. This HOWTO explains how to build all of the required components from source code. If the required package becomes available, this HOWTO would then be redundant.
This entire build and installation is performed in the home directory of a non-root user to ensure that no system files are broken. Some of the commands in this HOWTO must be run as root, when this is the case it is stated explicitly and otherwise the commands in this document should be run under a non-root account. The username for the examples below is erik.
2. Be a Developer
When you install F10 you are prompted to specify the uses to which your computer will be put. Hopefully you selected software development, if not your machine will probably be missing many of the utilities required for this HOWTO.
3. Initialize Evolution
Open Evolution and click on all of the buttons at the left to ensure that the necessary databases are created.
4. Prepare The Environment
Create the directory where you will compile the source code:
Create the directory where you will install the binaries:
Code:
/home/erik/barry_install
Set an environment variable equal to the installation directory:
Code:
export IDIR=/home/erik/barry_install
5. Download and Uncompress the Source Code
Go to the
OpenSync 0.22 download page and download libopensync-0.22.tar.bz2, libopensync-plugin-evolution2-0.22.tar.bz2, and msynctool-0.22.tar.bz2.
Go to the
Barry 0.14 download page and download barry-0.14.tar.bz2.
Copy all the tarballs to /home/erik/barry and uncompress them.
6. Patch the Source Code
Phone numbers are not synced properly, as far as I can tell from the available info (
#1,
#2,
#3,
#4,
#5) this is thanks to a pair of bugs in opensync (?). The problem can be worked around with the hack below.
Code:
cd /home/erik/erik/projects/barry/barry-0.14/opensync-plugin/src
vi vcard.cc
Edit lines 187-192, change the literal strings to uppercase and append ";VOICE" to the strings "WORK" and "HOME":
Code:
AddPhoneCond("PREF", con.Phone);
AddPhoneCond("FAX", con.Fax);
AddPhoneCond("WORK;VOICE", con.WorkPhone);
AddPhoneCond("HOME;VOICE", con.HomePhone);
AddPhoneCond("CELL", con.MobilePhone);
AddPhoneCond("MSG", con.Pager);
This patch seems maybe to work but I'm not sure about it and if you have a better fix please get in touch.
7. Build
7.1 Build OpenSync
Code:
cd /home/erik/barry/libopensync-0.22
./configure --prefix=$IDIR
make install
7.2 Build the Evolution plugin for OpenSync
Code:
cd /home/erik/barry/libopensync-plugin-evolution2-0.22
./configure --prefix=$IDIR CPPFLAGS="-I$IDIR/include -DHANDLE_LIBICAL_MEMORY" LDFLAGS=-L$IDIR/lib
make install
7.3 Build msynctool
Code:
cd /home/erik/barry/msynctool-0.22
./configure --prefix=$IDIR CPPFLAGS=-I$IDIR/include LDFLAGS=-L$IDIR/lib
make install
7.4 Build Barry
Install Barry's prerequisites - as root:
Code:
yum install libusb-devel gtkmm24-devel libglademm24-devel libtar-devel
Now build Barry:
Code:
cd /home/erik/barry/barry-0.14
PKG_CONFIG_PATH=$IDIR/lib/pkgconfig ./configure --enable-gui --enable-opensync-plugin --prefix=$IDIR CPPFLAGS=-I$IDIR/include LDFLAGS=-L$IDIR/lib
make install
8. Set Your PATH
Now you need to make sure that you use the new binaries that you just built, not any official versions of the binaries which may have been installed on your system and which are probably broken. Prepend your new bin directory to your PATH variable:
Code:
export PATH=/home/erik/barry_install/bin:$PATH
9. Get The Device Number Of Your BlackBerry
The configuration of the sync (described later in this document) will require the device number of your BlackBerry. You can get this value from the Barry Backup GUI.
Connect your BlackBerry to the computer. (Intermittently my computer fails to recognize my BlackBerry - rebooting the BlackBerry fixes the problem.)
F10 requires a little hack before Barry can access the BlackBerry. Become root and run the command below and note the bus and device number of the BlackBerry:
Plug those values into the command below (still as root):
Code:
chmod a+rwx /dev/bus/usb/[bus]/[dev]
Now start Barry Backup:
Note the device number of your BlackBerry. Keep Barry open for the next step.
10. Take Backups Of Your BlackBerry and Evolution Data
Use Barry Backup to take a backup of all the data on your phone.
Backup Evolution - take a copy of directory ~/.evolution.
11. Configure
Create a group for your BlackBerry:
Code:
msynctool --addgroup BlackBerry
Add the Barry plugin and configure it:
Code:
msynctool --addmember BlackBerry barry-sync
msynctool --configure BlackBerry 1
In the configuration, specify the device number that you got earlier from the Barry Backup GUI:
Code:
Device xxxxxxxx 0 1
Add the Evolution plugin and configure it:
Code:
msynctool --addmember BlackBerry evo2-sync
msynctool --configure BlackBerry 2
Here is the configuration for Evolution:
HTML Code:
<config>
<address_path>file:///home/erik/.evolution/addressbook/local/system</address_path>
<calendar_path>file:///home/erik/.evolution/calendar/local/system</calendar_path>
<tasks_path>file:///home/erik/.evolution/tasks/local/system</tasks_path>
</config>
12. Sync Contacts between BlackBerry and Evolution
Close Evolution, then do:
Code:
evolution --force-shutdown
If your BlackBerry isn't already connected to your computer, then reconnect it as explained earlier in this HOWTO.
Run the sync:
Code:
msynctool --sync BlackBerry
Synchronizing group "BlackBerry"
Member 2 of type evo2-sync just connected
Member 1 of type barry-sync just connected
All clients connected or error
Member 1 of type barry-sync just sent all changes
Member 2 of type evo2-sync just sent all changes
All clients sent changes or error
Member 2 of type evo2-sync committed all changes.
Member 1 of type barry-sync committed all changes.
All clients have written
Member 2 of type evo2-sync just disconnected
Member 1 of type barry-sync just disconnected
All clients have disconnected
The sync was successful
13. Notes
- Don't use any special characters (accents, umlauts etc) in your address book. Whenever the sync encounters such a character it truncates the remainder of the given record.
14. Links
http://netdirect.ca/software/packages/barry/index.php
http://www.linux.com/feature/123251
http://www.opensync.org
http://sourceforge.net/project/showf...kage_id=170564
http://www.nabble.com/Certain-phone-...html#a19022176
http://www.nabble.com/Blackberry--%3...d19386311.html
http://sourceforge.net/mailarchive/m...novo.local.net
http://www.mail-archive.com/synce-de.../msg01534.html
http://opensync.org/ticket/605
15. Acknowledgements and Feedback
Most of the material in this document was gathered from posts to various newsgroups. Any original content is placed in the public domain. This document was written by Eric Ehlers,
Nazcatech sprl Brussels. Thanks to those who participated in the
original thread which spawned this exercise. Comments should be posted as a reply in this thread, for any questions please start a new thread in the support forums.