From GnokiiWiki
Jump to: navigation, search


DKU-2 Cable

Some Nokia phones make use of DKU-2 cable to connect to a computer (see the compatibility list on Nokia site). This cable is incompatible with the earlier cables and doesn't contain USB/serial converter as the earlier DKU-5 did.

The support given by gnokii for this cable depends on the phone you use. Series 40 phones (with Nokia OS) support FBUS mode, Symbian ones -- it depends (N73 does).

So for the Series 40 phones gnokii offers wide range of the functionality. Although there is Linux kernel driver available it is recommended to use userspace driver based on libusb support. The config file should contain at least the following settings:

  • config:
model = series40
port = 1
connection = dku2libusb

The following cables are compatible with dku2libusb driver:

  • DKU-2
  • CA-53
  • CA-70
  • DKE-2
  • CA-101
  • CA-126

For the Symbian phones it gets much more complicated and less user-friendly (at least at the moment). Gnapplet driver currently doesn't support cable connection over DKU2 (unless you are able to estabilish tcp/ip connection over it). FBUS functionality provided by the phone is quite limited -- comparable to what you can achieve with AT driver. There is a way though to access some functionalities.

  • Call and SMS management

For these tasks you may use gnokii and its AT driver. You need cdc_acm driver (in Linux 2.4 it is called acm). Note that it is reported that with few models reading SMS doesn't work. It surely works with 6600 and doesn't with 6260, 6670. Gnokii setup you should use looks as follows:

  • config:
model = AT
port = /dev/ttyACM0
connection = serial

You can try to combine it with nk6510 driver. There are some functionalities available with this driver and not with AT driver (eg. alarm handling) and vice versa (dialling). Use the following configuration to use nk6510 driver:

  • config:
model = series60
port = 1
connection = dku2libusb
  • Phonebook, calendar, todo management

For these tasks I recommend using OpenSync and its libSyncML. Their website contains tutorials on how to set up working configuration.

  • Filesystem tasks: photos, ringtones, wallpapers, etc

For these tasks you should try OpenOBEX tools. However retrieving files using --getfile family gnokii options should work as well.

If you are able to estabilish IrDA or Bluetooth or TCP/IP connection it is worth trying with gnapplet driver.

Setting permissions for libusb

To use the dku2libusb connection as a normal user you need to add an udev rule which sets permissions for the device file used by libusb, /dev/bus/usb/... (some distributions do this for you); note that the dku2libusb driver doesn't use device files like /dev/ttyACM0 so their permissions are irrelevant.

There is a udev rules file provided with gnokii sources in Docs/sample/45-nokiadku2.rules (see the latest copy here) which gives ownership to plugdev group; if all goes well you just need to copy this file (as root) into /etc/udev/rules.d/ directory and plug the cable (enabling USB connection from phone menu if needed and choosing "Nokia Mode" or "PC Suite" if asked).

On many systems desktop users are in the plugdev group which usually can use thumb drives, so with this rule the same users that can access the phone as a removable disk can also use it with gnokii. You may prefer to give permissions to dialout group instead.

Troubleshooting libusb

Check if you are using linux kernel 2.6.30 or later with libgnokii 0.6.31 or earlier

Blacklisting isn't needed since libgnokii 0.6.32

$ uname -r

in this case a temporary workaround is to blacklist cdc_phonet and phonet kernel modules to let libusb connect to your phone. As root create a /etc/modprobe.d/phonet.conf file with the following contents:

blacklist cdc_phonet
blacklist phonet

Unplug the USB cable, then plug it again, reconnect your phone and try again to run gnokii. Please mind that not doing it will result with the following error when running gnokii:

Couldn't open PHONET device: device or resource is busy

Alternatively, you can try using new (as of 0.6.30 gnokii version) phonet driver. In such case use

connection = phonet

setting in your config file. Hoever this is sometimes inconvenient because it works currently only for the USB connection and you need to give to gnokii the cap_sys_admin,cap_net_raw capabilities or run it as root (see Docs/README-6510 for more details).

Check permissions of special file under /dev/bus/usb/

Get node name

$ lsusb -d 0421:
Bus 003 Device 005: ID 0421:04b8 Nokia Mobile Phones

Append "Bus" and "Device" fields from lsusb output to /dev/bus/usb/ to build node name:


Use node name to show permissions

$ ls -l /dev/bus/usb/003/005
crw-rw-r-- 1 root plugdev 189, 260 2008-06-08 17:42 /dev/bus/usb/003/005

If group is not set to plugdev then udev rules aren't applied, see below.

Debug udev rules

Get node name

$ lsusb -d 0421:
Bus 003 Device 005: ID 0421:04b8 Nokia Mobile Phones

Append "Bus" and "Device" fields from lsusb output to /dev/bus/usb/ to build node name:


Use node name to get "devpath"

$ udevadm info --query path --name /dev/bus/usb/003/005

For older distributions use udevinfo instead of udevadm info

Use "devpath" as an argument to udevtest to debug udev rules

$ udevadm test /devices/pci0000:00/0000:00:0c.1/usb3/3-2/
udev_node_add: creating device node '/dev/bus/usb/003/005', major=189, minor=260, mode=0664, uid=0, gid=46

In the output above ownership of the device is given to group id 46. For older distributions use udevtest instead of udevadm test

$ grep 46 /etc/group

In the output above gid=46 corresponds to plugdev group which has two members, user1 and user2, which are the only ones that can use this device through libusb (in addition to root).

If udevtest gives error or doesn't show the expected output check that:

  • 45-nokiadku2.rules is installed where udev rules are kept, usually /etc/udev/rules.d/
  • ruels syntax for your version of udev (eg. older versions used "=" instead of "==")
  • there aren't conflicting rules (eg. rules that reference SYSFS{idVendor}=="0421")

Check libusb version

If you get the error:

No idle setting

and you use Ubuntu check your libusb version:

$ dpkg -l libusb\*
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name            Version                   Description
ii  libusb-0.1-4    2:0.1.12-14ubuntu0.1      userspace USB programming library
ii  libusb-1.0-0    2:1.0.6-1ubuntu0~ppa1     userspace USB programming library
ii  libusb-dev      2:0.1.12-14ubuntu0.1      userspace USB programming library development files
un  libusb0         <none>                    (no description available)
ii  libusbmuxd1     1.0.2-1ubuntu2            USB multiplexor daemon for iPhone and iPod Touch devices - library

The version 2:0.1.12-14ubuntu0.1 from Ubuntu Lucid and Maverick (at least) has a bug and does not work with gnokii. Currently the solution is to downgrade to version 2:0.1.12-14:

$ sudo apt-get install libusb-0.1-4=2:0.1.12-14 libusb-dev=2:0.1.12-14