Linux.com

Feature: Handheld Devices

Syncing your BlackBerry on Linux

By Joe Barr on December 21, 2007 (4:00:00 PM)

Share    Print    Comments   

If you use Linux on your desktop, and you also happen to have a BlackBerry handheld device, you're probably aware that Research in Motion, the company that develops the BlackBerry platform, offers nothing in the way of support for its devices on Linux -- but the intrepid geeks in the free software world do. Thanks to to the efforts of the Barry and OpenSync projects, I just finished syncing my BlackBerry 8800 with my Evolution contacts on my Ubuntu 7.10 desktop.

If all you want to do is share data between your Linux box and the BlackBerry, no sweat. The 2GB Micro SD storage I inserted in my 8800 is available to my Linux system just like any other USB storage device. When I connect the USB cable to the BlackBerry, I simply say yes when Ubuntu asks if I want to enter Mass Storage Mode, and I can copy music and photos to the phone. I have run into a problem getting the audio for videos that were created with Kino to work correctly, but other than that, moving data back and forth between the PDA and the desktop "just works."

The Barry and OpenSync projects aim to provide a little more functionality than just moving data. According to its home page, the Barry project "is a GPL C++ library for interfacing with the RIM BlackBerry Handheld. It comes with a command-line tool for exploring the device and a GUI for making quick backups. This project's goal is to create a fully functional syncing mechanism on Linux." Release 0.11, which I've been playing with the past week, goes a long way toward meeting those goals. With it, you can explore, backup and restore, and -- with a little help from OpenSync -- sync databases. There is, however, some assembly required.

Some assembly required

If you're not willing to get your hands dirty by downloading and building software executables in their early stages of development, and working from the CLI once you do, then the Barry/OpenSync combo is not ready for you just yet. If you are, heed this advice: back up your BlackBerry before you begin, because it's possible you could lose some data.

If you're willing and able to take the risks, you can get in on the fun and functionality ahead of the curve. The buzz on the Barry developers mailing list indicates that work is already underway to provide Barry as an Ubuntu package, as it already is on Mandriva, so it shouldn't be long before everyone can simply install the executables and leave the building and testing processes to developers.

I won't walk you through the installation of each of the components, but I will tell you which ones I used and where I found them. Implementation details will vary with your distro, of course. Here's what you need:

Install the OpenSync packages first, because you'll need them in order to compile Barry. Make sure that not only OpenSync is release 0.22 -- there are earlier and later releases, but you need 0.22 to work with Barry -- but that any plugins you install match the 0.22 release number of OpenSync.

Before you compile Barry, be sure to specify --enable-opensync-plug-in when you run the configure script, as per Barry's detailed installation help.

Exploring the BlackBerry with btool

The first time you connect your BlackBerry and Linux machine with a USB cable, you'll get a screen on the PDA whining about an insufficient amount of current to charge the device. You can safely ignore that; you won't be short of power for long. In fact, after entering the btool command, you'll have all the power you need to charge the phone via USB.

You can enter btool -h for a complete list of options. If you enter btool -t, for example, you'll get a list of all the databases Barry finds on your BlackBerry. There were about 75 on my 8800. Barry can't presently parse all of them, but the most important ones are there, as entering btool -S reveals:

Supported Database parsers: Address Book Messages Calendar Service Book Memos Tasks PIN Messages Saved Email Messages Folders Supported Database builders: Address Book

You can explore any of the databases on the BlackBerry, not just those with parsers, by dumping their records to the console. To see what's in Browser Folders, for example, simply enter btool -d 'Browser Folders' at the command line. btool will reply with something like this:

Blackberry devices found: Device ID: 0x8063860. PIN: 666d6a66, Description: RIM 8800 Series Colour GPRS Handheld Using device (PIN): 666d6a66 Raw record dump for record: 805f8a8 00000000: 06 00 26 00 40 02 44 01 01 00 02 e6 17 8a 00 14 ..&.@.D......... 00000010: 00 00 81 d6 e2 b7 60 00 0d 57 41 50 20 42 6f 6f ......`..WAP Boo 00000020: 6b 6d 61 72 6b 73 kmarks Raw record dump for record: 805f8a8 00000000: 06 00 2d 00 40 02 44 01 02 00 88 2a 69 2c 00 1b ..-.@.D....*i,.. 00000010: 00 00 81 d6 e2 b7 60 00 14 42 6c 61 63 6b 42 65 ......`..BlackBe 00000020: 72 72 79 20 42 6f 6f 6b 6d 61 72 6b 73 rry Bookmarks

Of course, raw data like this is more important to developers than to ordinary users, so let's move on to more user-friendly things, such as the backup and restore utility.

The GUI backup application included with Barry is simple and effective. Note: Barry has a configure option to build the GUI, but it was built by default on my install. If it's not on yours, rerun the configure script and add the --enable-gui option, then rebuild.

Start by entering barrybackup at the command line, wait a second until it finds your device and displays its PIN number, and when it does, click on Save. You can edit the list of databases that the app will either save or restore by selecting Edit -> Config from the option menu to display the pop-up window in Figure 1, from which you can edit either list.

After selecting Save, I watched the Progress bar slide across the screen and the database names scroll past in the Database text box until the process was complete. I then immediately tested the Restore function.

When you click Restore, you're presented with a list of all the saved backups Barry finds in the .barry/backup/PINNUMBER directory, where PINNUMBER is the PIN of the device you're working with. After clicking Restore, I watched as database names appeared, were deleted on the BlackBerry, then restored from my desktop. All went well until I came to the Time Zones table, when I started to see "usb_bulk_restore" errors. The cure was simply to install release 4.4.5 of libusb. Since doing so, I've seen no more of these errors.

Barry aims to provide the infrastructure for more advanced, user-friendly applications that can be developed by others. It includes a couple of sample applications to demonstrate. One allows you to enter new contact information, and the other new calendar entries. They work well, but a full-blown app that would allow you to not only add, but edit or delete existing entries, would really be useful.

Synchronicity

Probably the most sought-after feature Barry provides is synchronization. I wasn't familiar with the synchronization process before I began exploring BlackBerries and Linux, so the concepts of groups, members, and device plugins were new to me in this context.

The synchronization process acts on a group of devices. Before I could actually sync something, I needed to define a group, its members, and the plugin required for each member. When I installed the OpenSync packages, I also installed a tool to do all those things called msynctool, as well as plugins for Evolution and Google Calendar. Both msynctool and the plugins come from the OpenSync project, but are separate downloads. Msynctool runs from the CLI, and it includes a helpful man page; I recommend entering man msynctool if synchronization is new to you.

Create a group and its members is easy:

msynctool --addgroup Blackberry msynctool --addmember Blackberry barry-sync msynctool --addmember Blackberry evo2-sync msynctool --showgroup Blackberry

The last command reported that the Blackberry group contained two members, but that the first one was not yet configured, which I had to do before I could sync. Still using the msynctool tool, I entered msynctool --configure Blackberry 1, where the 1 represented the barry-sync plugin. That opened the default text editor -- nano if you're using Ubuntu 7.10 and haven't changed the symbolic link at /etc/alternatives/editor to point to another editor -- which allowed me to edit the default configuration for the BlackBerry and insert its actual PIN number in place of the default.

If you prefer to use an editor other than the default on your distro, you can accomplish the same thing outside of msynctool simply by editing ~/.opensync/group1/1/barry-sync.conf.

Finally, it was time to sync the BlackBerry and my Evolution contact files. All I had to do was enter the command msynctool --sync Blackberry, then answer a single question about which plugin should rule when duplicate contacts were found. That was it; I was in sync at last.

If all of this sounds too geeky for you, don't despair. Help is coming for both installation and use. With a working framework in place, thanks to OpenSync and Barry, GUIs are on their way, in the form of the kitchensync project at KDE.org, for example, or, if you're a GNOME user, the multisync-GUI tool from the OpenSync project.

Share    Print    Comments   

Comments

on Syncing your BlackBerry on Linux

Note: Comments are owned by the poster. We are not responsible for their content.

Syncing your BlackBerry on Linux

Posted by: Anonymous [ip: 216.232.230.164] on December 21, 2007 06:09 PM
A little too little and a little too late. RIM can stuff it.

#

Syncing your BlackBerry on Linux

Posted by: Anonymous [ip: 74.137.232.169] on December 21, 2007 06:18 PM
FYI, I noticed you mentioned getting videos to work on your BlackBerry was still an issue for you... I too have a blackberry, though its a 8300 (curve from att) and Ive found they need to be encoded just right for the player to play them.

Ive had success using the blackberry video converter from http://www.seabyrdtech.com/bbvideo which is really just a gui wrapper for mencoder which you can get for windows or linux.

ive used mencoder successfully like so....

mikbrent@msb:~$cat bbvid.sh
#!/bin/bash
mencoder -vf scale=320:-2 $1 -o $2 -of avi -ovc lavc -oac lavc -oac lavc -lavcopts vcodec=mpeg4:vbitrate=230:acodec=mp3:abitrate=64

obviously.. use it like so...
mikbrent@msb:~$bbvid.sh input.avi output.avi

then copy output.avi to your blackberry and you should be good

hope that helps someone

#

Re: Syncing your BlackBerry on Linux

Posted by: Joe Barr on December 21, 2007 06:24 PM
Thanks a million for the tip, I'll give it a try today.

#

Re: Syncing your BlackBerry on Linux

Posted by: Joe Barr on December 24, 2007 01:30 PM
Still no joy with this script, which is similar to another I had tried. The video converts nicely, my problem is the audio. All of the videos I have tried to convert with mencoder were created with Kino. If I use a Windows freeware program under Wine, they both look and sound fine. But I haven't found the right mencoder mojo to get the audio right for a native Linux solution. Maybe it is something in the way Kino handles audio.

#

Re(1): Syncing your BlackBerry on Linux

Posted by: Anonymous [ip: 70.243.39.115] on January 05, 2008 07:54 PM
stfu

#

Syncing your BlackBerry on Linux

Posted by: Anonymous [ip: 74.137.232.169] on December 21, 2007 06:23 PM
hum whats up with formatting? all my carrage returns got eaten in the previous post? sorry i cant seem to fix it even with another post and lots of extra CR's

#

Syncing your BlackBerry on Linux (new improved, SIMPLE)

Posted by: Anonymous [ip: 65.200.191.253] on December 21, 2007 06:24 PM
you know whats easier? Use SyncML clients to sync over the air. I use:

Schedule world + schedule world plugin for thunderbird
on the BB use the funambol client, or SyncJE client(not free)

Thats it! and you can sync ALL your email clients and blackberry together.. not just one device

#

Syncing your BlackBerry on Linux

Posted by: Anonymous [ip: 128.231.88.5] on December 21, 2007 07:15 PM
My BB has a password; where does that get configured?

#

Re: Syncing your BlackBerry on Linux

Posted by: Joe Barr on December 21, 2007 07:45 PM
Run the btool command with -P password. From the btool --help output:

-P pass Simplistic method to specify device password

#

Syncing your BlackBerry on Linux

Posted by: Anonymous [ip: 222.172.221.99] on December 22, 2007 10:03 AM
A related idea for whichever Linux.com columnist wants to take it up: Syncing Windows Mobile devices with Linux.

After spending gobs of money on an unlocked Treo 750, I was shocked to find out that Microsoft wanted *more* money from me just so that I could sync my device with software that I don't want to use.

As it stands, Microsoft *requires* people who buy Windows Mobile devices to sync with Microsoft Outlook. Which is not free and is far more than I need for simple personal use. My previous (much beloved) Treo, which ran Palm OS, could sync with my preferred app, be it Palm Desktop or Evolution or whatever, just fine and for free. It's like charging someone for a device driver. Scandalous. Rapacious!

I've always been tolerant of Microsoft, but vowed that the minute Linux is ready for prime time on the Treo 750, I'm performing a ritual exorcism. Rest assured I'm never buying a Microsoft product for a mobile device again.

#

Re: Syncing your BlackBerry on Linux

Posted by: Joe Barr on December 22, 2007 02:42 PM
The nature of freedom is the shredding of those chains of empire and monopoly. Welcome to the free world. Does Opie (see http://opie.handhelds.org/cgi-bin/moin.cgi/) do what you need? I see 750 listed among the models it supports.

#

Syncing your BlackBerry on Linux

Posted by: Anonymous [ip: 41.243.122.70] on December 22, 2007 10:51 PM
I have almost got this working - it seems that my 8100 pearl keeps rebooting whilst I am trying to sync - i have also tried the slow sync option but this still seems to break ..it works upto about approx 2600 contacts and then the phone reboots :-(

I tried only syncing the calendar events (cause there are less of those) - this time it finished but there was no updates in evolution which makes me think it is not working. (there is a backup with barrybackup though - so that part works :-)

I really would love to get this working ...

#

sea...de...eb...de...

Posted by: Anonymous [ip: 66.122.165.196] on December 22, 2007 11:01 PM
purple snake car-See Eb BBb:With auto mfgs placing personel electronics in vehicles, I would like to validate the idea or suggest a compartment in the glove box for a lap top and printer scanner fax and paper for use by the pasenger for bussiness applications. This may suggest a compartment that can hold a 1u blade and also to make a printer fax copier scanner within a rack mount form if IT needs to file documents on a given system performance. Oh! the computer should be able to transmite to a blue tooth ear piece and linux bassed cell phone or other com. device via a usb broadcasting low power local area device.

#

Re: sea...de...eb...de...

Posted by: Anonymous [ip: 66.122.165.196] on December 23, 2007 12:19 AM
why not put a base station on a usb drive or cd/dvd that can turn a device into a communications base station with assorted features. Orgins: I saw someone with an ear piece for there cell phone and thought how they should be able to listen to music. Ya, thats been and is being done however, in the context of open soft ware why not create a program with the following features.(stream of conciousness not ment to be gramatical) So I thought lets send music to the ear piece, then provide a program that can be interupted by calls but allows a person to sellect or run from a gui app. an album, music list, streaming talk show or radio program from the web or if your cell phone or personel electronic device recieves RF and so on. So now I have an application that I can customize using a GUI, so how about placing an other box like the capchas below these comment boxes that a lable (or left empty) can be placed and highlighted, once highlighted a tool bar menue item OPS is click that allows a person to use funtional components to program features (I wrote a whole list of these type of linkable features in '92-'93 yet they are still only being marginaly applied other than in previous and subsequent development platforms-the idea is personalized costomization) once the item is highlighted it can be linked to and from processes that apply programing, filters, pipes, flags, semiphores, (node and socket apps.) So a music file is highlighted the ops tools applies it to an output file that can be simmilarly linked to your broadcast destination lable that may have a frount end code translation to stream content to the device linked to the identification lable to broad cast from the program app. the music file that was designated to an ear piece, walkie talky, usb local low power media / router, device. Once configured OPS tools that allow many to one and one to many and the other perms. would allow a person to simply create deferent files or libraries and place them among a list of out put destinations rather that building all the nessesary interconnections each time. Now you have a method to select source feeds and costomize end point targets. With these features a yatch crew, local race pit crew, catering service, an assortment of applications to base station communications. A football team and coaching can have ear pieces for intercom services. The OPS tools could have apps. for recieving data for two way configurable comunications. These features are seen as pit crews and team news broadcasting intercomunicate, the idea is that with open software a highly costomizable and less nich market driven apps. allowing a greater variaty of applications. Once a person can plug a usb or install a live cd/dvd into a laptop, cell phone or PC- list a device and identifie a source wether skyp or radio or TV or internet or whatever. You can use this for a band. If broadcasting were allowed up to a half mile motorcycle clubs could have group communications while on the road. This intercom and local area broadcasting could be used by teachers on yard duty, by catering companies or events managers. It also becomes the glue for a variety of progam inhancing qualities to augment other applications. Allowing intuitive programing and system design of mfg. processes using phyical machine operation and sensor feed back and the two way comunication and connecting these inputs to programs to creat mfg. systems. This suggests a facilitates research in robotics and managment systems. With these features a city could view trafic in real time and have other systems modeling alternate peramiters to see if improvement in effeciency could be made on the system. Using voice recongnition and text reading as interfacable packages linked with the OPS tool pipes or sockets, measaging services could be provided and command instructions to programs could be posible. The voice recognition would allow a group of people in an intercom mode identify a person and send a one to one personel mesage over the sistem or configure different sets of people given a lable to create on the fly real time dirctory and communication routable features. Using the other box type input an expandable list could be created as the other box is used another one appears below it for a second linkable feature and as many as practical. A new feature should allow an other of an intierly different group to be made such as mite identify different types of music. Rock, country, mariachi, or latin jazz!? By allowing a GUI that lists multiple sources and targets an office worker could sellect from a variety of stations as demonstrated on airline flights that have radio or movie interfaces on the arm rest.

#

Syncing your BlackBerry on Linux

Posted by: Anonymous [ip: 66.90.252.31] on January 06, 2008 10:29 AM
I am getting the following error?

sam@sam-laptop:~$ msynctool --addmember Blackberry evo2-sync
Unable to instance plugin with name evo2-sync: Unable to find the plugin "evo2-sync"

Where the heck do I get this plugin evo2-sync for a debian based linux? I have tried looking everywhere?

As far as I can tell it does not exist to be downloaded and installed? Please help.

Thanks,

Sam

#

Re: Syncing your BlackBerry on Linux

Posted by: Anonymous [ip: 216.12.31.112] on January 29, 2008 02:21 AM

Syncing your BlackBerry on Linux

Posted by: Anonymous [ip: 190.57.112.155] on January 16, 2008 10:07 PM
Hello, thanks for the post this is the only page on the web regarding barry, that explains throughly the process.

I am using Ubuntu 7.10 Gutsy Gibbon. I have a Blackberry Pearl. Im able to see the device using btool, but when i try to sync i get this:

msynctool --sync Blackberry
Unable to load plugin /usr/lib/opensync/plugins/barry_sync.so: Unable to open module /usr/lib/opensync/plugins/barry_sync.so: /usr/lib/opensync/plugins/barry_sync.so: undefined symbol: _ZN5Barry5ProbeC1EPKcS2_

I have /usr/local/lib in ld.so.conf, and i libbarry is installed in that path?

I've seen a couple of messages scattered around with people having this problem, but no solutions.

Someone here knows how to solve this issue?

Greetings,

alejandro




#

Syncing your BlackBerry on - all installed and connected, and Evolution phonebook added, but get th

Posted by: Anonymous [ip: 216.12.31.112] on January 29, 2008 03:44 AM
msynctool --sync Blackberry
Synchronizing group "Blackberry"
Member 2 of type evo2-sync had an error while connecting: Unable to open anything
Member 1 of type barry-sync just connected
Member 1 of type barry-sync just disconnected
All clients have disconnected
The sync failed: Unable to connect one of the members
Error while synchronizing: Unable to connect one of the members

#

Syncing your BlackBerry on Linux

Posted by: Anonymous [ip: 150.131.97.185] on February 12, 2008 09:44 PM
Any Possibility this can work with Kontact instead of Evolution?

#

This story has been archived. Comments can no longer be posted.



 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya