Synchronising a Nokia 5800 Mobile Phone with Linux
After playing around with the Nokia 5800 phone I managed to get most
stuff working except for being able to back up my contacts from the
phone to my desktop. After some research, I discovered a few tools
that made it possible to setup and test this feature.
Author and Copyright
Copyright 2009 by
Raj Mathur.
The contents of this document may be reproduced under the terms of the
Creative Commons Attribution-Share-Alike (CC-BY-SA) licence.
About the Phone
When my Motorola A1200 (MotoMing) started dying in stages I started
looking around for a replacement. The last few Motorola phones had
got me used to a touch screen, so the choices were a bit limited.
Finally settled on the 5800 because:
- It runs Symbian, which Nokia is going to open-source Real Soon Now.
- It has just about every connectivity option you can think of, apart from infra-red.
- It has a decent outdoor camera (sucks indoors and in bad light)
- It's cheap
Bought mine for Rs 13,500 (~200 euros) and it should be even cheaper now.
Downside:
- The phone has no built-in PDF reader. WTF?
- No ODF (OpenOffice.org) or OOXML (MS-Office) document reader.
What Works Out of the Box
File Transfers work fine, either with Bluetooth (use the Gnome
bluetooth-applet since KDE 4's bluetooth support is horribly broken)
or using the supplied micro-USB cable.
GPS Traces and
GPS Places import into jOSM without problems.
Mapped a couple of tracks outside Manali and B Block Munirka so far.
What Doesn't Work
None of the various Linux Mobile Tools I've tried so far are able to
connect to the phone with any level of success. So far the failure
list includes:
- Wammu/Gammu
- KMobileTools
- Gnokii
Would be nice to have something that let's me compose an SMS on the
computer and send it through the phone, but that doesn't look like
it's going to happen any time soon.
Environment
OK, on to backing up the contacts. Whatever follows was on a Debian
GNU/Linux x86 machine with the following:
- Debian GNU/Linux Testing
- Linux kernel 2.6.30-1-686
- multisync0.90 0.92.0~svn355-1
- multisync-tools 0.92.0~svn355-1
- USB Integrated System Solution Corp. KY-BT100 Bluetooth Adapter
Initial Setup
You first need to ensure that your computer is paired with the phone
and you can browse files over bluetooth, etc. without needing
authorisation. Once that is done, first test that you can connect to
the phone from the command line. Run the command:
sdptool browse xx:xx:xx:xx:xx:xx | grep "\(Service Name\|Channel\)"
where the
xx:xx:xx:xx:xx:xx is the bluetooth address of your phone.
If you don't know that, put the phone into bluetooth discoverable mode
and run:
hcitool scan
The
sdptool command should produce some output like the following:
Service Name: AVRCP Target
Service Name: PnP Information
Service Name: Phonebook access PSE
Channel: 1
Service Name: Hands-Free Audio Gateway
Channel: 2
Service Name: Headset Audio Gateway
Channel: 3
Service Name: Audio Source
Service Name: AVRCP Controller
Channel: 4
Service Name: Dial-Up Networking
Channel: 22
Service Name: OBEX Object Push
Channel: 5
Service Name: Imaging
Channel: 6
Service Name: SyncMLClient
Channel: 7
Service Name: OBEX File Transfer
Channel: 8
Service Name: Nokia OBEX PC Suite Services
Channel: 9
Service Name: Nokia SyncML Server
Channel: 10
We're interested in Channel 7, the SyncMLClient.
Backing Up
We'll back up the contacts on the phone as individual VCard files
into a directory on our computer.
Create a MultiSync Group
You need
multisync0.90 (note, this is not the same as the
multisync package) to do the backup. Start up
multisync0.90 and
select
Add. Enter the name of the Group ("Nokia 5800 Backup" in our
example) and click
Apply.
Add Members to the Group
The group you just created must contain two members, one for the
directory where the VCards will be stored and one for the phone
itself. Click on
Edit in your new group:
and then click on
Add Member and select "File Synchronization":
Select the
file-sync member and enter the name of the directory
where into which your contacts must be stored (
/home/raju/Contacts
in our example):
The complete XML would look like this when you're done:
<?xml version="1.0"?>
<config>
<!-- directory path for file-sync -->
<path>/home/raju/Contacts</path>
<!-- should care of subdirectories (TRUE or FALSE) -->
<recursive>FALSE</recursive>
</config>
Now create the group member that will communicate with the phone.
Click
Add Member again and select "SyncML over OBEX Client".
To configure this, select the
syncml-obex-client member on the left and
enter the following configuration:
When you're done the XML would look something like this
(xx:xx:xx:xx:xx:xx is the bluetooth address of your phone):
<?xml version="1.0"?>
<config>
<!-- (Only for bluetooth) The bluetooth address if the bluetooth mode is selected -->
<bluetooth_address>xx:xx:xx:xx:xx:xx</bluetooth_address>
<!-- (Only for bluetooth) The bluetooth channel to use. `sdptool browse $MAC` to search for the correct channel -->
<bluetooth_channel>7</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>
<!-- sets the connection type to use. 5 means obex over usb, 2 means obex over bluetooth -->
<type>2</type>
<!-- 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>
<!-- The name of the contacts db. Must be the same as the phones sends -->
<contact_db>Contacts</contact_db>
<!-- The name of the calendar db. Must be the same as the phones sends -->
<calendar_db>Calendar</calendar_db>
<!-- The name of the note db. Must be the same as the phones sends -->
<note_db>Notes</note_db>
</config>
Note that the only things we have changed above are the
phone bluetooth address, the
channel and the
identifier.
Everything else is the default.
Do the Backup
That's it, you're ready to backup your contacts from the phone to the
directory you specified. Click on
Refresh and your synchronisation
should start. It may take some time to it to complete, be patient.
Troubleshooting
There are a number of tools out there that can help you isolate and
diagnose problems you may face in getting the connectivity and
synchronisation working. The ones that I used are:
sdptool
Use it to browse the services on your phone and confirm the channel
used by the phone's _SyncMLClient_. The command (repeated here for
completeness) is:
sdptool browse xx:xx:xx:xx:xx:xx | grep "\(Service Name\|Channel\)"
syncml-obex-client
This tool (part of the
opensync-plugin-syncml package on Debian)
let's you do a raw connect to the SyncML client on the phone and just
dump the information it receives on the screen. To run it, give the
command:
syncml-obex-client --slow-sync text/x-vcard Contacts -b xx:xx:xx:xx:xx:xx 7 --identifier 'PC Suite' --wbxml --dumpinfo
You should get your phone's contact list flowing past in your terminal
window. If it doesn't work, the diagnostics will help you isolate
the problem.
msynctool
Actually this is just a command-line version of the multisync0.90 GUI,
but using it may help you locate the source of any problems you're
having. To run it, give the command:
msynctool --sync 'Nokia 5800' --slow-sync contact
Conclusion
The Nokia 5800 mostly plays well with Linux, though Gnokii & co. do
need to get up to speed with supporting connectivity to this model.
Having got my contacts backed up I can rest easy and actually use the
phone for some useful purpose, like making calls and stuff. I'd be
glad to try to help sort out any issues you may face syncing your
contacts, though be warned that I'm not a bluetooth or OBEX expert by
any means.
Change History