FedoraForum.org - Fedora Support Forums and Community
Results 1 to 6 of 6
  1. #1
    erik_ Guest

    HOWTO: Sync Contacts between BlackBerry and Evolution on Fedora 10

    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:

    Code:
    /home/erik/barry
    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:

    Code:
    lsusb
    Plug those values into the command below (still as root):

    Code:
    chmod a+rwx /dev/bus/usb/[bus]/[dev]
    Now start Barry Backup:

    Code:
    barrybackup
    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.
    Last edited by erik_; 22nd January 2009 at 11:58 AM.

  2. #2
    neo21 Guest
    There is an easy way to get Your contact AND calendar sync'd: Do it indirectly via Google.

    If You are using Google Mail & Calendar You can set up sync them with Your Blackberry using Google Sync for Blackberry. It is freely available by Google: http://m.google.com - browse with Your Blackberry.

    Then You can set up Evolution to two-way snyc with Google Mail's Contacts and Your Google Calendars.

  3. #3
    erik_ Guest
    Quote Originally Posted by neo21
    There is an easy way to get Your contact AND calendar sync'd: Do it indirectly via Google.
    That was already pointed out in the original thread (referenced above) which preceded this HOWTO. Personally I don't want to upload my life to google just to work around this problem.

    The Barry configuration includes a flag for syncing calendar in addition to contacts, I haven't tried it.

  4. #4
    Join Date
    Jun 2009
    Location
    East Hampton, NY
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Has anyone tried the above method in Fedora 11?

  5. #5
    Join Date
    Mar 2007
    Age
    55
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have tried it in F11 I can't get my blackberry configuration to save for some reason so when I sync....

    Code:
    [charles@localhost ~]$ msynctool --sync BlackBerry
    Synchronizing group "BlackBerry" 
    Error while synchronizing: Unable to get config data: Member has not been configured

  6. #6
    Join Date
    Jun 2009
    Location
    9ja://coalcity
    Posts
    262
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: HOWTO: Sync Contacts between BlackBerry and Evolution on Fedora 10

    Quote Originally Posted by Mtnman1971
    I have tried it in F11 I can't get my blackberry configuration to save for some reason so when I sync....

    Code:
    [charles@localhost ~]$ msynctool --sync BlackBerry
    Synchronizing group "BlackBerry" 
    Error while synchronizing: Unable to get config data: Member has not been configured
    Well, you need to configure something, most likely barry-sync. After much google searches I find that the configuration for barry-sync changed from xml to plain text (.conf). Do the following on the terminal:

    Code:
    msynctool --configure blackberry 1
    The above assumes the first plugin in the group is barry-sync. I wonder whether the order of plugin registration matters. The above command will open the configuration for plugin #1 in Vi ... change the default PIN (device) to yours and set the adjourning values to 0, 1 .... if you want only contacts to sync (or 1,1 if you want calendar syncing as well)

    oh! ... Vi editing is another challenge . Use the arrow keys to position the cursor. Press 'i' to insert text and press Esc when you're done. type ':w' and hit <enter> to save the changes and type ':q' followed by <enter> to exit Vi. Phew!

    run 'msynctool --sync blackberry' again.

    My Observation as of today:
    Everything syncs except Tasks. I don't understand why. Has anybody successfully synced Blackberry tasks to Evolution tasks recently? The situation makes Thunderbird/lightning more attractive. I'm using Fedora 14 ... running Gnome-shell from jhbuild.

Similar Threads

  1. Blackberry Sync on Fedora 11
    By Mtnman1971 in forum Using Fedora
    Replies: 8
    Last Post: 17th October 2009, 11:11 AM
  2. Replies: 14
    Last Post: 28th June 2009, 06:39 AM
  3. Howto export Evolution mail contacts to a CSV File
    By rclark in forum Guides & Solutions (Not For Questions)
    Replies: 1
    Last Post: 30th December 2006, 04:41 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •