How to use the gammu engine with KMobileTools

Prerequisites

This document requires that you have removed any previously installed version of KMobileTools.
It also requires that you have checked out the current svn version as described in the Subversion checkout how-to.
Hint: Please follow the checkout procedure only and do not try to follow any of the compilation steps described in the subversion how-to!

To follow this how-to please make sure that you have set-up a typical build environment (gcc, make, cmake).
For more information please refer to your distribution's manuals.


Abstract

This document will show you how to properly configure KMobileTools' gammu engine.

Gammu is an open-source project which provides an interface to many mobile phones.
Throughout this document we refer to Gammu as the library which provides the functions
to access the mobile phone and we refer to Gammu engine as the part of KMobileTools which
communicates with gammu and which we want to configure.

Overview

First step: Install Gammu

Before building KMobileTools, we need to get a copy of Gammu in version 1.10.6.
You can download this version either from our local server or from the gammu project server.

Download Gammu 1.10.6 from the Gammu project server
Download Gammu 1.10.6 from KMobileTools' project server

Please open a console, change to the directory where you saved the file and extract the Gammu archive by typing
tar xjf gammu-1.10.6.tar.bz2

We will now compile and install gammu:
cd gammu-1.10.6/
mkdir build
cd build
cmake ..

sudo make install

Second step: Install KMobileTools

Now that we have installed gammu, we need to compile and install KMobileTools with the gammu engine enabled.
Again in the console window, change to the directory where you checked out KMobileTools according to the subversion how-to.
cd kmobiletools-0.5
Enter the follow lines one after each other to configure KMobileTools to be used with gammu:
make -f admin/Makefile.common
CFLAGS="-O0 -ggdb" CXXFLAGS="-O0 -ggdb" ./configure --enable-debug=full --disable-final --prefix=$(kde-config --prefix) --with-gammu
Please check now that KMobileTools will be built with gammu engine enabled:
*********** KMobileTools Features ***********

KDEBluetooth Integration                enabled
Gammu Engine                            enabled
Kontact Integration                     disabled
FileSystem Integration                  disabled
If you have followed this how-to step by step and gammu engine is still disabled, then plese refer to our support page.

We are now ready to compile and install KMobileTools:
sudo make install

Third step: Determine gammu phone parameters

KMobileTools does currently not support phone auto-detection in conjunction with gammu engine.
So you have to manually configure the engine at the moment.

Gammu requires you to set at least two configuration parameters:
the port and the connection.

Port: the port is the either the linux device file (/dev/xxxxx) you use to access the phone
or your phone's bluetooth address (xx:xx:xx:xx:xx:xx), depending on the connection parameter.

Connection: Since not every vendor sticks to a unified standard on how to access a mobile phone,
gammu provides several phone drivers to communicate with your phone. At the moment it's unfortunatelly up to you
to decide which one to use. You can refer to Gammu's phone database to decide
which connection type to use. But be warned: the recommended connection parameter is not always the best.

Here is an overview of the available connection types: (taken from the gammu configuration file)
  ================================================================ cables =====
 New Nokia protocol for FBUS/DAU9P
    Connection "fbus", port type serial

 New Nokia protocol for DLR3/DLR3P
    Connection "fbusdlr3"/"dlr3", port type serial 

 New Nokia protocol for DKU2 (and phone with USB converter on phone mainboard
                              like 6230)
    Connection "dku2phonet"/"dku2", port type dku2

 New Nokia protocol for DKU5 (and phone without USB converter on phone
                              mainboard like 5100)
    Connection "dku5fbus"/"dku5", port type dku5

 New Nokia protocol for PL2303 USB cable (and phone without USB converter
                                          on phone mainboard like 5100)
    Connection "fbuspl2303", port type usb

 Old Nokia protocol for MBUS/DAU9P
    Connection "mbus", port type serial
 -----------------------------------------------------------------------------
 AT commands for DLR3, DKU5 or other AT compatible cable (8 bits, None
 parity, no flow control, 1 stop bit). Used with Nokia, Alcatel, Siemens, etc.
    Connection "at19200"/"at115200"/.., port type serial

 AT commands for DKU2 cable
    Connection "dku2at", port type dku2

 ============================================================== infrared =====
 Nokia protocol for infrared with Nokia 6110/6130/6150
    Connection "fbusirda"/"infrared", port type serial

 Nokia protocol for infrared with other Nokia models
    Connection "irdaphonet"/"irda", port type irda
 -----------------------------------------------------------------------------
 AT commands for infrared. Used with Nokia, Alcatel, Siemens, etc.
    Connection "irdaat", port type irda
 -----------------------------------------------------------------------------
 OBEX for infrared
    Connection "irdaobex", port type irda. Must be used with model "obex"

 ============================================================= Bluetooth =====
 Nokia protocol with serial port set in BT stack (WidComm, other) from
 adequate service and Nokia 6210
    Connection "fbusblue", port type serial

 Nokia protocol with serial port set in BT stack (WidComm, other) from
 adequate service and other Nokia models
    Connection "phonetblue", port type serial
 -----------------------------------------------------------------------------
 Nokia protocol for Bluetooth stack with Nokia 6210
    Connection "bluerffbus", port type BT

 Nokia protocol for Bluetooth stack with DCT4 Nokia models, which don't inform
 about services correctly (6310, 6310i with firmware lower than 5.50, 8910,..)
    Connection "bluerfphonet", port type BT

 Nokia protocol for Bluetooth stack with other DCT4 Nokia models
    Connection "bluephonet", port type BT
 -----------------------------------------------------------------------------
 AT commands for Bluetooth stack and 6210 / DCT4 Nokia models, which don't
 inform about BT services correctly (6310, 6310i with firmware lower 
 than 5.50, 8910,..)
    Connection "bluerfat", port type BT

 AT commands for Bluetooth stack with other phones (Siemens, other Nokia,etc.)
    Connection "blueat", port type BT
 -----------------------------------------------------------------------------
 OBEX for Bluetooth stack with DCT4 Nokia models, which don't inform about
 BT services correctly (6310, 6310i with firmware lower than 5.50, 8910,...)
    Connection "bluerfobex", port type BT

 OBEX for Bluetooth stack with other phones (Siemens, other Nokia, etc.)
    Connection "blueobex", port type BT. Must be used with model "obex"
If you own a Nokia Series 60 (S60) mobile phone (such as Nokia's 3650, 3660 and many many more),
you will have to select one of the connection types below and additionally install
a program on the phone to allow communication between your computer and the phone. The required steps
will be outlined later.
 ============================================================= Bluetooth =====
 Connection "bluerfgnapbus", port type BT
 ============================================================= Infrared ======
 Connection "irdagnapbus", port type irda
Now you must determine the right port parameter.

Example:
If you found out to take "irdaphonet" as connection parameter, you see that the appropriate port type is "irda".
So look up "irda" in the table below and you know the right port parameter is "/dev/ircomm*" where * must be
the appropriate device number.
 --------------------------------------------
 Port type | "Port" parameter
 ----------|---------------------------------
 serial    | "/dev/ttyS*"
           | (example "/dev/ttyS1")
           | or "/dev/tts/**" (with DevFS)
 ----------|---------------------------------
 irda      | "/dev/ircomm*"
 ----------|---------------------------------
 BT        | Bluetooth device address
           | (for example 01:02:03:04:05:06)
 ----------|---------------------------------
 dku2      | /dev/ttyUSB* or /dev/ttyACM*
 ----------|---------------------------------
 dku5      | not possible with linux
 ----------|---------------------------------
 usb       | "/dev/ttyUSB*"
To find out the bluetooth address of your mobile phone, type
hcitool scan

Fourth step: Configure KMobileTools' gammu engine

Now that you have the required connection and port parameter, run KMobileTools now and click
on "Add a new mobile phone device"!
Add new mobile phone device

A wizard dialog will now appear where you must select "Gammu engine" in the drop-down.
To proceed, click "Next"!
Select Gammu engine and click on Next

Please enter the port and connection parameters you have found above. You can leave the device
information blank.
Enter port and connection information

Optional: Install additional program for Nokia's series 60 mobile phones

Since Nokia's series 60 phones do not comply with any standard, we need to install a program on the
phone which enables communication between Gammu and the phone.

You can use your preferred way to transfer the program to your phone (e.g. use the bluetooth:/ kio-slave).

The install file gnapplet.sis can be found in the gammu-1.10.6/other/symbian directory.
Just copy the gnapplet.sis file to your phone and run it from there.
If you experience an error on execution, try downloading and installing FExplorer.
In FExplorer go to "C:\system\Apps" and run "gnapplet.exe".

While gnapplet is running on the phone, let KMobileTools connect to your phone.

Congratulations!

You should now be able to connect to your phone and use KMobileTools.
If you encountered any problem, please don't hesitate to contact us as described on the support page.

Matthias Lechner