So, it turns out I did a lot of travelling in 2009. I compiled some statistics for your interest

Thanks to a massive effort from a bunch of my friends, led by Ting, I am the proud new owner of a Nokia E51.
I'm hoping to throw some code together and get it to synchronise my contacts under linux from my existing addressbook and post up a few things here.
Random fact:
Device Drivers --->
USB support --->
USB Serial Converter support --->
<M> USB Serial Converter support
[*] USB Generic Serial Driver
After a quick recompile & reboot, look up your phone using lsusb:
Bus 007 Device 007: ID 0421:0042 Nokia Mobile Phones
Which means you are looking at:
modprobe usbserial vendor=0x0421 product=0x0042
usbserial vendor=0x0421 product=0x0042When the phone is connected, you can find it at /dev/ttyUSB0 and /dev/ttyUSB1.
gummay # emerge openobex obexftp obexfs
The latter of the three packages provides a FUSE module to access the phone's filesystem directly.
Test that obex can see your phone's interfaces
gummay # obex_test -u
Using USB transport, querying available interfacesNext, see if you can access the PC Suite Services interface - you should get something like this:
Interface 0: Nokia Nokia E51 SYNCML-SYNC
Interface 1: Nokia Nokia E51 PC Suite Services
Interface 2: Nokia Nokia E51 SYNCML-DM
gummay # emerge tk bwidgetbefore I could run obextool.tk:
gummay # wget http://www.nemethi.de/tablelist/tablelist4.10.tar.gz
gummay # tar -xvzpf tablelist4.10.tar.gz
gummay # cp -r tablelist4.10 /usr/lib/tcl8.4/
#dependencies setup, now install the tool
gummay # wget http://www.tech-edv.co.at/downloads/obextool-0.33.tar.gz
gummay # tar -xvzpf obextool-0.33.tar.gz
gummay # cd obextool-0.33
gummay # vim ./etc/obexwrap.sh
#change the line to readobexftp -u 1 "$@"
gummay # ./obextool.tk
OK, so now we have complete access to the files on both the phone memory and the memory card, it's time to look at syncing things like contacts and calendars.
We'll try and use syncML
echo "app-pda/msynctool ~x86" >> /etc/portage/package.keywords
echo "app-pda/libopensync ~x86" >> /etc/portage/package.keywords
echo "app-pda/libopensync-plugin-file ~x86" >> /etc/portage/package.keywords
echo "app-pda/libopensync-plugin-syncml ~x86" >> /etc/portage/package.keywords
echo "app-pda/libopensync-plugin-vformat ~x86" >> /etc/portage/package.keywords
echo "app-pda/libopensync-plugin-syncml obex http" >> /etc/portage/package.use
echo "app-pda/libsyncml ~x86" >> /etc/portage/package.keywords
echo "app-pda/libsyncml obex http" >> /etc/portage/package.use
emerge -pv msynctool libopensync-plugin-file libopensync-plugin-syncml libopensync-plugin-vformat
msynctool --addgroup e51
msynctool --addmember e51 file-sync
msynctool --addmember e51 syncml-obex-client
mkdir /home/gummay/syncdir
msynctool --configure e51 1
#change directory to /home/gummay/syncdir
msynctool --configure e51 2
Now, this should work:
gummay # msynctool --showgroup e51
Group: E51
Member 1: file-sync
Configuration : <?xml version="1.0"?>
<config>
<!--
<directory>
<path>/home/gummay/syncdir</path>
<objtype>contact</objtype>
</directory>
-->
<!--
Field objformat set the object format which should be used to store.
objformat is optional - by default objformat is "file".
-->
<directory>
<path>/home/gummay/syncdir/contact</path>
<objtype>contact</objtype>
<objformat>vcard30</objformat>
</directory>
<directory>
<path>/home/gummay/syncdir/event</path>
<objtype>event</objtype>
<objformat>vevent20</objformat>
</directory>
<!--
<directory>
<path></path>
<objtype>event</objtype>
<objformat>vevent20</objformat>
</directory>
-->
</config>
Member 2: syncml-obex-client
Configuration : <?xml version="1.0"?>
<config>
<!-- sets the connection type to use. -->
<!-- please note that actually OBEX over network is not supported -->
<!-- 1 means obex over serial cable -->
<!-- 2 means obex over bluetooth -->
<!-- 3 means obex over IRDA -->
<!-- 4 means obex over network -->
<!-- 5 means obex over usb -->
<type>5</type>
<!-- (Only for bluetooth) The bluetooth address if the bluetooth mode is selected.
`hciconfig scan` to search bluetooth devices. -->
<bluetooth_address></bluetooth_address>
<!-- (Only for bluetooth) The bluetooth channel to use.
`sdptool browse $MAC` to search for the correct channel -->
<bluetooth_channel></bluetooth_channel>
<!-- (Only for USB) The usb interface number of the SYNCML-SYNC target. use syncml-obex-client -u (you will need access to the USB raw device) to find it. -->
<interface>0</interface>
<!-- The string that the plugin will use to identify itself. Some devices need a special string here. -->
<identifier>PC Suite</identifier>
<!-- The syncml version to use: 0 for 1.0, 1 for 1.1 and 2 for 1.2 -->
<version>1</version>
<!-- if the plugin should use wbxml -->
<wbxml>1</wbxml>
<!-- The username to use. Leave empty to not require a username -->
<username></username>
<!-- the password for the username -->
<password></password>
<!-- If wbxml is enabled, defines wether the wbxml should use string tables -->
<usestringtable>0</usestringtable>
<!-- Never send ADD command, but send REPLACE (not needed normally) -->
<onlyreplace>0</onlyreplace>
<!-- Workaround around for mobile phones which only use local timestamps and _no_ UTC timestamps! -->
<onlyLocaltime>0</onlyLocaltime>
<!-- Sets the maximum allowed size in bytes of incoming messages (some device need this option set). Example: 10000 -->
<recvLimit>0</recvLimit>
<maxObjSize>0</maxObjSize>
<!-- XXX: Currently you need to write this by your own.
Later it's planned to create such entries on the fly during
the discovery() call. Example database field:
21/30
-->
<database>
<name>Contacts</name>
<objtype>contact</objtype>
<objformat>vcard30</objformat>
</database>
<database>
<name>Calendar</name>
<objtype>event</objtype>
<objformat>vevent20</objformat>
</database>
<!--
<contact_db>Contacts</contact_db>
<calendar_db>Calendar</calendar_db>
<note_db>Notes</note_db>
-->
</config>
... but unfortunately it does not, due to a bug in libwbxml 0.9.2, instead getting:
gummay # msynctool --sync e51
Synchronizing group "E51"
The previous synchronization was unclean. Slow-syncing
event sink of member 1 of type file-sync just connected
contact sink of member 1 of type file-sync just connected
Main sink of member 1 of type file-sync just connected
event sink of member 2 of type syncml-obex-client just connected
contact sink of member 2 of type syncml-obex-client just connected
Main sink of member 2 of type syncml-obex-client just connected
All clients connected or error
Main sink of member 2 of type syncml-obex-client just sent all changes
event sink of member 1 of type file-sync just sent all changes
contact sink of member 1 of type file-sync just sent all changes
Main sink of member 1 of type file-sync just sent all changes
contact sink of member 2 of type syncml-obex-client had an error: Forbidden (0x43)
event sink of member 2 of type syncml-obex-client had an error: Forbidden (0x43)
The sync failed: At least one object engine failed while getting changes. Aborting
event sink of member 1 of type file-sync just disconnected
contact sink of member 1 of type file-sync just disconnected
Main sink of member 1 of type file-sync just disconnected
event sink of member 2 of type syncml-obex-client just disconnected
contact sink of member 2 of type syncml-obex-client just disconnected
Apparently the workaround for this is to sync once using Nokia PC Suite. Conveniently I have a windows machine and can do this - others are not so lucky!
After the sync, things were finally working:
gummay # syncml-obex-client -u 0 --sync text/v-card Contacts --wbxml --identifier "PC Suite"
connection with device succeeded
Received an Alert for the DS Server at Contacts: Type: 200, Last 20081018T060423Z, Next 20081018T060638Z
Just received a new session with ID 1
Going to request the devinf
Session 1 reported final. flushing
Received an reply to our Alert
Going to receive 3 changes
Received the DevInf
Session 1 reported final. flushing
Received a added entry 2 of size 120 and type text/x-vcard
Data: BEGIN:VCARD
VERSION:2.1
REV:20081018T060601Z
N:XXXXXXXXXX;;;;
TEL;CELL:+61421XXXXXXX
X-CLASS:private
END:VCARD
Received a added entry 3 of size 120 and type text/x-vcard
Data: BEGIN:VCARD
VERSION:2.1
REV:20081018T060631Z
N:XXXXXXXXXX;;;;
TEL;CELL:+6143XXXXXXX
X-CLASS:private
END:VCARD
Received a deleted entry 1 of size 0 and type (null)
Data: (null)
Received an reply to our Sync: 200
Session 1 reported final. flushing
Session 1 has ended
It seems that the sync will not update anything that hasn't changed since the last sync - regardless of which application is doing the request. Maybe a different identifier in place of 'PC Suite' could change this?
While the low-level 'syncml-obex-client' works, msynctool still does not work. In any case, I have enough to go on now to work on my end goal: synchronising my existing address book to the phone!
Call me crazy - I am addicted to this Jonathan Coulton song - Octopus:
I still remember the words you said
They were hard enough to leave a mark
And now they echo inside my head
As I spiral down into the dark
I windmill upside down
Knowing you’ll come at me again
And I feel your shadow pass above me
Octopus
Some kind of octopus
Tearing my shell apart
Letting the sea get in
You make my insides outside
*snip*
For the geeks out there, you might know Jonathan Coulton better from his work on the Portal soundtrack - Still Alive.
Copyright Tom Fifield 2002-2010
Lovingly Handcoded in PHP, SQL and CSS