I just needed a new phone and decided to go for cool solution: Nokia 7110 (v4.84).
I got one including serial data cable + dock and the only thing missing was: how do I get my contacts on the phone without typing?
The answer was quite simply: export your address book as vCard and send it to the phone via gnokii on an Ubuntu.
I got one including serial data cable + dock and the only thing missing was: how do I get my contacts on the phone without typing?
The answer was quite simply: export your address book as vCard and send it to the phone via gnokii on an Ubuntu.
- Get your address book
Export it somehow: I tried Evolution as well as GMail web-interface (both work). - Get a serial port
Setting up the serial port on my Lenovo X60 was not straight forward, but now it works...
Really depends on your hardware - Connect to phone
Use minicom and check if the phone replies to AT commands - Configure gnokii
[global]
port = /dev/ttyS0
model = 7110
connection = serial
use_locking = yes
serial_baudrate = 9600 - Use gnokii to read/write your address book
gnokii --deletephonebook ME 1 200
gnokii --writephonebook -o --vcard < addressbook.vcf
So, I needed to fix my addressbook: basically remove all not needed data (emails, addresses, birthdays etc.). I implemented a small python-script using vObject.
It reads from stdin and writes to stdout: cat addressbook.vcf | python script.py
It reads from stdin and writes to stdout: cat addressbook.vcf | python script.py
#!/usr/bin/python
#encoding=UTF-8
import vobject
import sys
import inspect
#Remove entries except in list for one vcard.
def vcard3_remove_all_entries_except(vcard):
allowedEntries = {'version', 'fn', 'tel', 'categories'}
entries_dict = vcard.contents
for key in entries_dict.keys():
if key not in allowedEntries:
del entries_dict[key]
importedVCards = vobject.readComponents("".join(sys.stdin.readlines()))
try:
while (True):
vcard = importedVCards.next()
vcard3_remove_all_entries_except(vcard)
vcard.add('n');
try:
# vcard.prettyPrint()
print(vcard.serialize()),
except Exception as e:
print(e)
except StopIteration:
None
Sync with style:
cat contacts.vcf | python import.py | gnokii --writephonebook -o --vcard
cat contacts.vcf | python import.py | gnokii --writephonebook -o --vcard
And a tutorial to clean the Nokia 7110 can be found here.