An easier way to manipulate address book on cellular phones

Inserito in: mchisari@Lun, 30/10/2006 - 18:44 — modificato Ven, 24/08/2007 - 11:45

Maybe you (like me) have a cellular phone, an handheld computer, and also carry a "backup" cellular phone, of a different brand; maybe your wife syncs her handheld and cellular phone (another brand!) with the same computer... Like me.

Keeping in sync two or more cellular phones with an handheld and a desktop computer is close to a nightmare, if you don’t adopt some rules. Here is how I’ve done it.

First: establish a “master” copy

It could sound too compelling, but it worths doing so, and in facts it will gratly ease your life: begin to manage your address book only on the desktop or the handheld (you can do it on both, as they update each other). This will be the “master” address/phone book to (regularly) overwrite that on your phone (s). So, just remember never to save a new number on the phone (it’s not a big limitation, as usually it is less practical to write something with phone's "keyboard"). This is the first step to the peace of mind; now you just need to export your address book (from your desktop PIM program), and import it on your phone; which it not guaranteed to be easy or flawless...

Second: export to your cellular(s) phonebook

Having a master, up-to-date copy of your phonebook, you need to transfer it to your “slave” devices; but if you try to install on your PC the programs shipped with your cellular phone, chances are you’ll turn your PC in a sort of an expensive accessory for your phone: your system will be filled everywhere with new options, new popups and new devices with fancy icons. Even worse, if you try to install a second phone manager (because your phones are from different makes, or even different generations of the same producer), you’ll have big fun watching conflicts in accessing communication ports and resources, not to mention having two more programs sitting idle while eating your always-not-enough RAM, waiting for a connection to come (eventually).

A more clever option would be trying to use a single "general pourpose" open source cellular managing software, for all of them; there are a few, like gnokii, gammu, or gsmlib. They are discreet, as they can be launched only when needed; they can be used under Linux, and they are able to talk (with various success levels) with many brands of cellular phones. However, if you aren’t lucky, you will waste days in trying to make them work with your specific phone/cable/adapter/port configuration, before giving up. Believe me: I’m skilled in computers, but nontheless I had to study and study to just begin to understand how to sort the things out. There is some sort of “hackish” feeling about managing cellular phone functions; you should be proud of being one of those few clever geeks who won the game. Often just to discover that, on your model, only basic functions are supported. Many times, you won’t be able to manage your phonebook “esotic” features like a “mobile” and an “home” phone number for the same person, simply because the (“at”) protocol supported by every phone cannot handle them; you should use some kind of proprietary protocol that requires lots of effort to be implemented, so that it isn’t available, and you’ll need to learn C++, debug, and write it on your own (!).

Second, reloaded: export to your cellular(s) phonebook, by Virtual Card Format

You've begun to despair? don't do that; if your phone supports IrDA (infrared) or Bluetooth communications, and you're interested in migrating only your address book, then maybe you have a lighter and easier solution: using VCF files.

VCF (Virtual Card, or vCard) is a standard file format that is both widely supported and easily managed and edited (at the end, it is made only of plain text). An handheld, a cellular phone and an email program all know how to deal with it. You may think: yes, but they need to exchange it with some special program, or device, right? No. Whenever you send your vCard by infrared or bluetooth, you are sending a .vcf file (you’ve never sent your vCard? Bad. Go try it). If you manage to get an IrDA-equipped PC (almost any recent notebook will have it) with Windows, try to send it a vCard from your phone to it; you’ll obtain a .vcf file. Now try to send this file, using standard Windows “send file” feature, by IrDA to yours or another phone (or to your handheld); you will receive a new contact that you can save in your phonebook with all informations it contains. You can easily exchange these files with Linux also, by way of the irxfer utility (it’s included in the OpenObex package): use “irxfer filename.vcf” to send it, and “irxfer” alone to receive it. It’s that simple.

The vCard file format supports several details: phone number with type, name, surname, complete name address, company, postal code, notes, and so on; even a picture can be put in it. It’s up to the receiving device what to accept and what to discard, but any unknown or unsupported feature won't do any harm, will simply be ignored; however, modern phonebook-equipped phones will at least support several phone number types. Another nice discovering: try to open a .vcf file with a simple text editor like notepad; you’ll notice that it is a simple text file, with a standard structure like:




FN:Name Surname


TEL;HOME:+012 34567



As long as you keep this structure, you can edit its contents, add or remove informations or rearrange them at will.

.vcf is a Good Thing. But there’s more: normally, a .vcf file contains a single card, but you can pack several address book entries in a single .vcf format; this can be simply made by appending several vCards in a file, separated by an empty (blank) line. Many (not every) cellular phones will import a complete address book from a single .vcf file, and will also export all their address book in this format via infrared or bluetooth connection if told to do so.

So, let’s go back to our problem. We have an handheld with its address book, and a PIM program to manage it (by the way, never use an handheld without ever saving its data on some desktop; there is a number of accidents that can result in losing all the data – flat batteries, forgetting it somewhere, thieves…). This is your “master” phonebook; well, all you have to do is export it in .vcf format as a file, then send it via IrDA or bluetooth to your phone; avoid duplicating all entries by first deleting them all on the phone. That’s it.

Note: you don’t have to install anything (more than the PIM) on your PC, even if you own several phones by several brands. There are some drawbacks, anyway:

  • Before importing an updated phone book, to avoid duplicating all your contacts you will probably delete them all. This will probably lose any “special” setting like distinctive rings, voice-operated calls, and so on.
  • You won’t be able to manage items like ringtones, operators logo, SMS messages. Not a big issue.
  • There is a similar format for calendar: VCal. However, I don't see any point in having a duplicated agenda on your phone.

Just some useful tips more, for an happy ending:

  • Palm Desktop will have no problem in exporting it’s whole phonebook in VCF format.
  • However, someone told me that Outlook is unable to export in VCF format more than a contact at a time (?) Your fault: you chose Microsoft. However, you can use Dawn, a free utility, to export Outlook phonebook (and many many others) in a variety of formats, VCF included.
  • Some cellular phones will import an entire phonebook in VCF format at a glance; some others won’t. I’ve had success with an Ericsson T68i and a Siemens ME45, but not with Nokia phones (from older to recent Symbian ones) that will only import the first contact in the file. It is a known and long-standing bug Nokia has forgot to fix, despite its widespread reputation of "best" phone software company... If you have more stories, others will be interested in knowing, so tell us.
  • There will be, as in every part of the world besides USA and UK, issues with special/accented characters. You already figured it out, I suppose.
  • You can use the same technique to import your email address book in your favourite email program. For Mozilla Thunderbird, which doesn’t support VCF format natively (a really missing feature), you can install the “MoreColsForAddressBook” extension; the bad thing is that it is slooooooow like hell…

As to the bug preventing Nokia phone importing a VCF file as a whole: probably there are a few utilities around to fix it, but if you (like me) look for complicated powerful solutions, at the end of the page you find attached a simple AWK script to split a multi-contacts VCF file in several single ones. The script itself is trivial, but you'll need an AWK interpreter in order to use it, like Gnu's AWK (GAWK) - for Windows, Linux, MacOs, ... Once you've split them, you can send them to the phone via Infrared - one at a time, or all at once. On a Symbian phone, you can also put all .vcf files in \Others\Contacts directory of the memory card, then use the "import" function of phonebook.

Hope this will solve your problem. Good luck!