Experiences in the community

Just another WordPress.com weblog

GNU/Linux Debian and Nokia C2-03

Hi all,
This would be a shortish post about my attempts to use the Nokia C2-03 under GNU/Linux Debian.

Apologies first of all, I was supposed to write about my experience about minidebconf today but other things took precedence or was pending for a long time. About 4-5 months back I got myself a Nokia C2-03, it’s a dual sim phone with a reasonable 2.8 resistive touch screen and the stock Nokia S40 OS which was bundled with the mobile.

For a long time I was feeling guilty as I didn’t know of any GNU/Linux app. command-line or otherwise which would let me transfer contacts,transfer pictures and music and the works.Now there wasn’t any urgent stuff I had to do so I was also a bit casual about it.

Yesterday night though while playing a game called hale I had to resort to using the mobile camera to take some info. What was happening is the game was taking all over my memory. While I was able to take some snaps of the same, the problem was how to transfer to my desktop. While the phone has bluetooth my motherboard doesn’t. The phone has Micro-USB so thought it would be easy.

The first thing I did was look at the output generated at /var/log/messages,dmesg and lsusb. These are the outputs it gave :-

a. In /var/log/messages something like this :-


Nov 20 16:09:57 deb-home kernel: [76900.332046] usb 5-1: new full speed USB device number 3 using uhci_hcd
Nov 20 16:09:57 deb-home kernel: [76900.478061] usb 5-1: not running at top speed; connect to a high speed hub
Nov 20 16:09:57 deb-home kernel: [76900.511062] usb 5-1: New USB device found, idVendor=0421, idProduct=08bb
Nov 20 16:09:57 deb-home kernel: [76900.511066] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Nov 20 16:09:57 deb-home kernel: [76900.511068] usb 5-1: Product: C2-03
Nov 20 16:09:57 deb-home kernel: [76900.511070] usb 5-1: Manufacturer: Nokia
Nov 20 16:09:57 deb-home kernel: [76900.534752] cdc_acm 5-1:1.3: ttyACM0: USB ACM device
Nov 20 16:09:57 deb-home kernel: [76900.537330] usb 5-1: bad CDC descriptors
Nov 20 16:09:57 deb-home kernel: [76900.540177] usb 5-1: bad CDC descriptors
Nov 20 16:09:57 deb-home mtp-probe: checking bus 5, device 3: "/sys/devices/pci0000:00/0000:00:1d.3/usb5/5-1"
Nov 20 16:09:57 deb-home mtp-probe: bus: 5, device: 3 was not an MTP device

which means it is able to find some stuff.

Then in dmesg had the same/similar thing :-

[76900.332046] usb 5-1: new full speed USB device number 3 using uhci_hcd
[76900.478061] usb 5-1: not running at top speed; connect to a high speed hub
[76900.511062] usb 5-1: New USB device found, idVendor=0421, idProduct=08bb
[76900.511066] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[76900.511068] usb 5-1: Product: C2-03
[76900.511070] usb 5-1: Manufacturer: Nokia
[76900.534752] cdc_acm 5-1:1.3: ttyACM0: USB ACM device
[76900.537330] usb 5-1: bad CDC descriptors
[76900.540177] usb 5-1: bad CDC descriptors

and last but not the least lsusb :-


$lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 051d:0002 American Power Conversion Uninterruptible Power Supply
Bus 005 Device 002: ID 0421:08bb Nokia Mobile Phones

So it was able to probe but that was not enough. A little bit of Internet searching and I came to know of a family of apps called Openobex but sadly it seems the documentation lags behind or something.

The application which I was looking for was obexfs. I made a single change to the documentation otherwise the document was four years old.

Before getting to obexfs I would have to share about libsyncml. It’s supposed to be dead, I’m not sure whether it is or not. I also made a change or two on its wiki as well otherwise even that wiki had not been touched in over 3+ years.

Anyways, the point is that libsyncml works till some extent and the rest I’m still wondering about.

First install libsyncml-utils and see its installed properly.


$ dpkg -l libsyncml-utils
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-================================-==========================================
ii libsyncml-utils 0.5.4-2 SyncML protocol library utilities

Now I did try to use the kernel bit as they have said but guess that is not relevant to 3.1.x series kernel so didn’t work😦

Anyways, even with sudo (which admittedly is not good) I did get some good outputs :-


$ sudo syncml-ds-tool -u 0 --slow-sync text/plain notes --wbxml --identifier "PC Suite"
** Message: Remote device was successfully connected.
** Message: All alerts of the remote device were received. ** Message: All changes of the remote device were received.
** Message: Remote device was successfully disconnected. ** Message: SyncML session finished successfully.

This told me that something was happening but what I was not able to guess, just that some connection was made.

Then the next command I tried was a revelation :-


$ sudo syncml-ds-tool -u 0 --identifier "PC Suite" --sync text/x-vcard Contacts --sync text/x-vcalendar Calendar --wbxml
** Message: Remote device was successfully connected.
** Message: All alerts of the remote device were received.
-----BEGIN CHANGE-----
BEGIN:VCARD
VERSION:2.1
N;CHARSET=UTF-8;ENCODING=8BIT:Gupta;Chandan TEL;PREF;VOICE;ENCODING=8BIT:+xxxxxxxxx
EMAIL;CHARSET=UTF-8;ENCODING=8BIT:xxxxxxxxx@gmail.com
EMAIL;CHARSET=UTF-8;ENCODING=8BITxxxxxxx@linuxcandy.com
END:VCARD
-----END CHANGE-----
....................
....................
....................
** Message: All changes of the remote device were received.
** Message: Remote device was successfully disconnected.
** Message: SyncML session finished successfully.

It got a whole bunch of contacts with their contacts, e-mail ids, the works I had saved on my mobile.The only glitch is, it just shows😦 wish I could save it to some delimited .csv file or something like that.

Now the next possibility I saw was when I read this page. I also made a small change on the wiki, not sure whether its right or not, four years is a long time.

Anyways, the next thing which worked is the obexautofs. As told in the wiki you have to first make some mount point, mount point is nothing but an empty directory which can be anywhere on your system. For testing purposes I used the one they asked for. So made a mnt directory in /mnt/tmp.


$cd /tmp
/tmp$sudo mkdir mnt
/tmp$cd mnt
/tmp/mnt$ls
/tmp/mnt$

tada, mount point made. As can be seen the directory is empty. Now use the mount command


$sudo obexfs -u 0 /tmp/mnt
$

Getting the next prompt means it was a success, no issues. If we hadn’t made a mount point it would say :-


$ sudo obexfs -u 0 /tmp/mnt
fuse: bad mount point `/tmp/mnt': No such file or directory

Before going to /tmp/mnt let’s see what /var/log/messages has to say, if anything.

$ sudo tail -n 20 /var/log/messages
Nov 21 10:24:19 deb-home kernel: [15827.881053] usb 5-1: not running at top speed; connect to a high speed hub
Nov 21 10:24:19 deb-home kernel: [15827.914056] usb 5-1: New USB device found, idVendor=0421, idProduct=08bb
Nov 21 10:24:19 deb-home kernel: [15827.914059] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Nov 21 10:24:19 deb-home kernel: [15827.914062] usb 5-1: Product: C2-03
Nov 21 10:24:19 deb-home kernel: [15827.914063] usb 5-1: Manufacturer: Nokia
Nov 21 10:24:19 deb-home mtp-probe: checking bus 5, device 2: "/sys/devices/pci0000:00/0000:00:1d.3/usb5/5-1"
Nov 21 10:24:20 deb-home mtp-probe: bus: 5, device: 2 was not an MTP device
Nov 21 10:24:20 deb-home kernel: [15828.389749] NET: Registered protocol family 35
Nov 21 10:24:20 deb-home kernel: [15828.415549] usbcore: registered new interface driver cdc_ether
Nov 21 10:24:20 deb-home kernel: [15828.419985] usb 5-1: bad CDC descriptors
Nov 21 10:24:20 deb-home kernel: [15828.420054] usbcore: registered new interface driver rndis_host
Nov 21 10:24:20 deb-home kernel: [15828.439655] cfg80211: Calling CRDA to update world regulatory domain
Nov 21 10:24:20 deb-home kernel: [15828.455302] usb 5-1: bad CDC descriptors
Nov 21 10:24:20 deb-home kernel: [15828.455344] usbcore: registered new interface driver rndis_wlan
Nov 21 10:24:20 deb-home kernel: [15828.463435] cdc_acm 5-1:1.3: ttyACM0: USB ACM device
Nov 21 10:24:20 deb-home kernel: [15828.466233] usbcore: registered new interface driver cdc_acm
Nov 21 10:24:20 deb-home kernel: [15828.466236] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
Nov 21 10:24:20 deb-home kernel: [15828.500636] usbcore: registered new interface driver cdc_phonet
Nov 21 11:16:37 deb-home kernel: [18965.855292] usb 5-1: usbfs: interface 1 claimed by cdc_phonet while 'obexfs' sets config #1
Nov 21 11:17:29 deb-home kernel: [19017.873300] usb 5-1: usbfs: interface 1 claimed by cdc_phonet while 'obexfs' sets config #1

The first seven lines we know, that output comes whenever you connect your Nokia C2-03 via Micro-USB. the next 8 lines are very interesting, all of it. The last four lines are the real clincher though and specifically the last two lines :-


Nov 21 10:24:20 deb-home kernel: [15828.466236] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
Nov 21 10:24:20 deb-home kernel: [15828.500636] usbcore: registered new interface driver cdc_phonet
Nov 21 11:16:37 deb-home kernel: [18965.855292] usb 5-1: usbfs: interface 1 claimed by cdc_phonet while 'obexfs' sets config #1
Nov 21 11:17:29 deb-home kernel: [19017.873300] usb 5-1: usbfs: interface 1 claimed by cdc_phonet while 'obexfs' sets config #1

The last two lines telling/sharing that a driver ‘cdc_phonet’ has claimed usb 5-1 interface and something called ‘obexfs’ (a filesystem perhaps) is there.

If you want you can also look at dmesg as well, it says the same thing :-

$ dmesg | tail -n 15
[15827.914063] usb 5-1: Manufacturer: Nokia
[15828.389749] NET: Registered protocol family 35
[15828.415549] usbcore: registered new interface driver cdc_ether
[15828.419985] usb 5-1: bad CDC descriptors
[15828.420054] usbcore: registered new interface driver rndis_host
[15828.439655] cfg80211: Calling CRDA to update world regulatory domain
[15828.455302] usb 5-1: bad CDC descriptors
[15828.455344] usbcore: registered new interface driver rndis_wlan
[15828.463435] cdc_acm 5-1:1.3: ttyACM0: USB ACM device
[15828.466233] usbcore: registered new interface driver cdc_acm
[15828.466236] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[15828.500636] usbcore: registered new interface driver cdc_phonet
[18965.855292] usb 5-1: usbfs: interface 1 claimed by cdc_phonet while 'obexfs' sets config #1
[19017.873300] usb 5-1: usbfs: interface 1 claimed by cdc_phonet while 'obexfs' sets config #1
[21408.010159] usb 5-1: usbfs: interface 1 claimed by cdc_phonet while 'obexfs' sets config #1

Now Let’s see if we can see the contents of /tmp/mnt


$ cat /tmp/mnt/
cat: /tmp/mnt/: Permission denied
$ ls /tmp/mnt
ls: cannot access /tmp/mnt: Permission denied

Something’s the matter, oh yes, forgot sudo. One has to become root/superuser if one wants to see something outside his home directory.


$ sudo ls /tmp/mnt
Gpsmid Graphics Images Media Player Sync files Memory card Music files Received files Recordings Themes Tones Videos

Tada, now you have access to your phone’s memory card and details. Obviously everything works,sort of. Its rudimentary and needs a nice GTK/QT interface and we will be home. I would be more interested if there is/was a way to get my contacts in an easy to use way. The things are there, but kinda disparate.

While playing around with libsyncml,also came to know of a project called Opensync and a nice polished FOSDEM presentation given in 2k7. This I guess would be the next thing to investigate.

Till later.

Single Post Navigation

2 thoughts on “GNU/Linux Debian and Nokia C2-03

  1. Pingback: GNU/Linux Debian and Nokia C2-03 « Experiences in the community | What is Linux

  2. Pingback: GNU/Linux Debian and Nokia C2-03 « Experiences in the community | Linux Supersaniya

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: