Connecting Nokia 6630 Phone with Linux

www.nokia.fi_img_products_6630_proddet.jpg

This is about accessing a Nokia 6630 mobile phone from Debian Linux.

The Firmware info (shown by dialing *#0000#) shows something like the following:

V 3.45.113
04-01-05
RM-1

For a list of software I consider useful see What's on my Nokia 6630.

Connecting with a USB Datacable

I have no Bluetooth support on my PC yet so this is the first thing I want. Accessing the phone, sync the contacts and get the images from the device. The cable that comes with the phone has a small label Type: DKU-2.

Connecting the phone autoloads the cdc_acm module and gives the following output in dmesg:

usb 3-2: new full speed USB device using address 3
drivers/usb/class/cdc-acm.c: Ignoring extra header
cdc_acm 3-2:1.8: ttyACM0: USB ACM device

To access the device (/dev/ttyACM0) be sure to be in the dialout group.

/proc/bus/usb/devices shows some more info:

T:  Bus=03 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  4 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0421 ProdID=0410 Rev= 0.00
S:  Manufacturer=Nokia
S:  Product=Nokia 6630
S:  SerialNumber=0123456789
C:* #Ifs=13 Cfg#= 1 Atr=80 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=08 Prot=01 Driver=(none)
I:  If#= 1 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=fe Prot=00 Driver=(none)
I:  If#= 2 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
I:  If#= 2 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=84(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:  If#= 3 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=08 Prot=00 Driver=(none)
I:  If#= 4 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=0b Prot=00 Driver=(none)
I:  If#= 5 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
I:  If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
E:  Ad=85(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:  If#= 6 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=0b Prot=00 Driver=(none)
I:  If#= 7 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
I:  If#= 7 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
E:  Ad=86(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:  If#= 8 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=cdc_acm
E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=128ms
I:  If#= 9 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm
E:  Ad=87(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:  If#=10 Alt= 0 #EPs= 0 Cls=02(comm.) Sub=af Prot=00 Driver=(none)
I:  If#=11 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
I:  If#=11 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
E:  Ad=82(I) Atr=03(Int.) MxPS=  64 Ivl=64ms
E:  Ad=05(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:  If#=12 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=06(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

Software

KMobileTools

KMobileTools is a nice KDE application that allows you to control your mobile phone from your GNU/Linux PC.

To install, add the following lines to your sources.list

deb http://themind.altervista.org/debian unstable main
deb-src http://themind.altervista.org/debian unstable main

Then run

#> apt-get update
#> apt-get install kmobiletools

In the config dialog use the following options:

  • Device
    • Mobile phone device: /dev/ttyACM0
    • Text encoding: 8859-1
    • Port speed: 115200
    • Init string: AT S7=45 S0=0 V1 X4 &c1 E0
  • Mobile Phone
    • Phone Type: Nokia (generic)
    • Dialing: ATD Dial System

The tool was able to dial a number and to show battery and signal level. However, it could import neither my Contacts nor the short messages stored on the phone.

gnokii

gnokii provides tools and a user space driver for use with mobile phones under Linux, various unices and Win32.

To install:

#> apt-get install gnokii

Using the following config in /etc/gnokiirc seems to work:

[global]
port = /dev/ttyACM0
model = AT-HW
initlength = default
connection = serial
use_locking = yes
serial_baudrate = 19200
smsc_timeout = 10

[gnokiid]
bindir = /usr/sbin/

[connect_script]
TELEPHONE = 12345678

[disconnect_script]

[logging]
debug = off
rlpdebug = off
xdebug = off

The identify command works:

$> gnokii --identify
GNOKII Version 0.6.5
IMEI         : 355677002280929
Manufacturer : Nokia
Model        : Nokia 6630
Revision     : V 3.0436v32

However this configuration doesn't do much more than getting a few basic infos that are available through the AT commandset of the Phone. It seems the recommended way to use gnokii with S60 phones is using the gnapplet. However it seems to be pretty critical to get a “good” copy of the applet. I found mine in the debian sarge package of gnokii (/usr/share/doc/gnokii/gnapplet.sis.gz). Gunzip it, upload it to the phone and run it before running gnokii with a configuration like this:

  [global]
  port = bl:ue:to:ot:hi:d
  model = series60
  connection = bluetooth
  rfcomm_channel = 14

This gives access to the calendar - though it ain't perfect yet. I wasn't able to get syncing to my homebrew web calendar working (phone never added alerts), but maybe it's just my fault.

GnuBox

The GnuBox software enables some symbian based phones to access the internet through a connected host PC. Unfortunately this is not the case with the Nokia 6630 – this phone has a crippled TCP stack and cannot be set to build an IP connection to a PC (it only works over an expensive GPRS connection).

Update: This does work now, though setting it up is a bit of a PITA. Have a look at the above link - it now contains a new SIS for the 6630 and some notes about how to set it up. Took me a few hours to figure it all out, though. I can now browse the web with opera through the BT interface using my PC as a gateway. However the internal apps do not show the new connection, thus SyncML and friends still don't work.

USB OBEX

Using OBEX to communicate over USB works fine. Just follow the USB OBEX HOWTO to set it up. This is probably the best way to transfer images taken with the builtin camera.

usbobex libs

First I installed the libusb devel package:

#> apt-get install libusb-dev

You may need autoconf, automake and libtool if you don't have them already:

#> apt-get install autoconf automake libtool

Then take a look at the excellent but rather outdated USB OBEX HOWTO. Here are just the commands I executed (the HOWTO still speaks about OBEX version 1.1 to come, while version 1.2 is already available).

First let´s create a private install directory for this software. if you prefer to install everything in the default directory (/usr/local/…), skip that and omit all further references to ~/usbobex.

$> mkdir ~/usbobex

Goto http://sourceforge.net/projects/openobex and download openobex (current version 1.2)

$> tar xvfz openobex-1.2.tar.gz
$> cd openobex-1.2
$> ./configure --enable-apps --prefix=$HOME/usbobex
$> make
$> su -c './src/obex_test -u'

Here I got the following output:

Using USB transport, querying available interfaces
Interface 0: Nokia Nokia 6630 SYNCML-SYNC
Interface 1: Nokia Nokia 6630 PC Suite Services

I then made the following call to install the test binaries to /usr/local/bin

$> make install

hotplug script

I also added the hotplug stuff mentioned in the howto. For the Nokia 3360 you need the following content in /etc/hotplug/usb/nokia.usermap

nokia 0x0003 0x0421 0x0410 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000

I also altered the example hotplug script to give write access to everybody

#!/bin/sh
 
# latest hotplug doesn't set DEVICE on 2.6.x kernels
if [ -z "$DEVICE" ] ; then
  IF=`echo $DEVPATH | sed 's/\(bus\/usb\/devices\/\)\(.*\)-\(.*\)/\2/'`
  DEV=$(cat /sys/${DEVPATH}|>/devnum)
  DEVICE=`printf '/proc/bus/usb/%.03d/%.03d' $IF $DEV`
fi
 
if [ "$ACTION" = "add" -a "$TYPE" = "usb" ]; then
  chmod 0666 "$DEVICE"
fi

OBEX FTP

On with the HOWTO to build OBEX FTP… we first need some tools to compile the docs:

#> apt-get install sablotron txt2html

Goto http://sourceforge.net/projects/openobex and download obexftp (current version 0.8)

Then apply the patch and compile:

$> tar xvfj obexftp-0.20.tar.bz2
$> cd obexftp-0.20
$> ./configure --prefix=$HOME/usbobex OPENOBEX_CONFIG=$HOME/usbobex/bin/openobex-config
$> make
$> make install

All the tests mentioned in the HOWTO should work now.

I found, that there seems to be a problem with my phone, if I try to access the default obexftp channel via bluetooth. However it works nicely when connecting to the “Nokia OBEX PC Suite Services”. The channel can be found using sdptool browse bl:ue:to:ot:hi:d. It is 12 for my 6630, so e.g.

~/usbobex/obexftp -b 00:15:a0:52:00:cf -B12 -c "E:/Sounds/Digital" -l

will work as expected.

If you want to connect via USB use the following command:

~/usbobex/obexftp -u 1 -c E:\\Sounds\\Digital -l

to get a list of all sound files on your phone´s media card.

ObexTool

Lets have some fancy graphics, too :-)

As always install some packages…

# apt-get install bwidget tcl8.4

… then follow the HOWTO

$> wget http://www.nemethi.privat.t-online.de/tablelist/tablelist3.8.tar.gz
$> wget http://www.tech-edv.co.at/downloads/ObexTool-0.31-alfa.tgz
$> tar -C ~/usbobex/ -xzvf tablelist3.8.tar.gz 
$> tar -C ~/usbobex/ -xzvf ObexTool-0.31-alfa.tgz
$> vi ~/usbobex/etc/obexwrap.sh
$> vi ~/usbobex/obextool.tk
$> wget http://members.dodo.com.au/~joaniemrc/nokia/obextool.patch
$> cd usbobex
$> patch -p1 < ../obextool.patch 
patching file lib/obexfile.tcl
patching file lib/obextree.tcl
$> vi ~/usbobex/etc/obextool.cfg

You now can start the tool with

$> ~/usbobex/obextool.tk

Update(Mark Kent - mark@NOSPAM.ellandroad.demon.co.uk): At 15/7/06, Hendrik Sattler maintains a debian repository which includes obextool, tablelist and some other useful goodies. They are pre-patched, so you do not need to go through the steps shown above. Add the following to your /etc/apt/sources.list:

# Nokia obextool - check http://www.stud.uni-karlsruhe.de/~ubq7/debian/ for more info

deb http://www.stud.uni-karlsruhe.de/~ubq7/debian extra main
deb-src http://www.stud.uni-karlsruhe.de/~ubq7/debian extra main

Then, simply:

# apt-get install obextool

In order to get obextool to use the proper options with obexftp, you can specify what you want on the command line, like this:

#  obextool --obexcmd "obexftp -u 1"

Although you'll want to edit the config file, as shown above.

Similarly, I did not need to patch the debian obex tools for USB, it's already done. The version of obextool at Hendrik's page worked with my Nokia 6630 over usb.

 
nokia_6630.txt · Last modified: 2007/10/14 12:11 by 83.236.4.57
 
Imprint Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsTranslate