Importing vCard contacts into an LG 420G

Alix recently acquired an LG 420G from TracFone. She was interested in getting all of her contacts onto the phone, which at first seemed like a simple task – transfer a vCard (.vcf) file to the phone via Bluetooth, and the phone would import all the contacts. This turned out to be a great idea in theory, but in practice there was a fatal flaw – while the phone did indeed import the contacts, it only imported names and the occasional note or email address. There were no phone numbers.

Thus began the long investigation to find out exactly what the phone expected the contacts to look like.

EOL format

The LG 420G needs DOS end-of-line (CRLF), otherwise it won’t recognize more than a single contact in your file. There are a number of ways to convert EOL style in a text document; I used the unix2dos tool.

Phone number labels

In our source vCard files, telephone numbers were typically listed with one qualifier, like this:

TEL;WORK:555-555-5555
TEL;HOME:555-555-5555
TEL;CELL:555-555-5555

I created new contact entry on the phone and sent it back to my computer, and found that the telephone numbers were labelled with two qualifiers (and a character set identifier), like this:

So, the first thing we needed to do was to transform the phone number entries in our original list into the format expected by the 420G. I extracted a list of all the unique phone number labels, like this: