-->
Home » » Gammu All Mobiles Management Utilities.

Gammu All Mobiles Management Utilities.


Gammu is a project which encompasses applications, scripts and drivers for managing various functions on cellular phones and similiar devices.
It is a stable and mature codebase with support for many models available on the market and provides functions unavailable in other similiar projects. 

Long term development is oriented towards making a shared API for classes of device rather than supporting single phone models (which are eventually made obsolete with the arrival of new models).
This software was earlier (up to version 0.58) named MyGnokii2, current name Gammu is not connected with Gammu from "Heretics of Dune" written by Frank Herbert. We name this "main" project core too, because there are various other projects based on it available now.
Download
Using source tarballs in Linux



Compiling and installing from source tarballs
First you will need some tools available with developer libraries, if you want some functionality:
  1. MySQL - database functions
  2. PostgreSQL - database functions
  3. BlueZ - BlueTooth
If you have everything, simply do such steps:
1. Download gammu from one of the download sites. 2. Uncompress the downloaded file :
$ tar xjvf gammu.tar.bz2
3. Enter the gammu directory:
$ cd gammu-*
4. Run the configure script (you will need CMake for this):
$ ./configure
5. Compile the program:
$ make
6. Install it as root:
$ su
# make install

Creating Debian packages

1. Download and unpack gammu tarball.
2. Get required build dependencies:
aptitude install debhelper libc6-dev libbluetooth1 libbluetooth1-dev autoconf fakeroot
3. Build it:
fakeroot debian/rules binary

Using ready packages in Linux


RPM based distributions

Some vendors already included Gammu, so you can use version they ship. At least SUSE and Mandriva have Gammu inside their distribution. If this does not apply, you can try luck with third party sources:
1. Download the RPM file (see mirrors)
2. Switch to root user:
$ su
3. Install the file
$ rpm -ivh gammu-*.rpm


adserver 750x100


Debian

Gammu and related are now officialy inside Debian:,there also testing versions
If it all fails, try building from sources.

Ubuntu

Debian packages don't work on older Ubuntu releases without python-central, so you might try Wammu Installation Script for Ubuntu.

Gentoo

Gentoo contains ebuild for gammu, so you can just
$ emerge gammu

Arch Linux.

Arch Linux contains pkgbuild in unsupported section, install as usual.

When you have program installed, you need to configure it, see documentation. 

Connecting to Symbian (Nokia and probably other).
Before you will try connect to Gammu, you have to install gnapplet application in phone first. You can find gnapplet in Gammu sources (other/symbian/gnapplet.sis) or should be included in Gammu package for your distribution. Alternatively you can get latest copy from SVN: http://viewsvn.cihar.com/viewvc.cgi/gammu/trunk/other/symbian/gnapplet.sis. For instructions how to install it into your phone please follow your phone manual.
Later steps depends on connection type. For example for Bluetooth use "bluerfgnapbus" connection and model "gnap" and device addresss as "port". You can read notes described below for infrared and Bluetooth too. Cables connections (DKE-2, DKU-2, etc.) are not supported by gnapplet now.
When you want to communicate with phone, enable medium (bluetooth, irda, etc.), run gnapplet in phone and use Gammu then.


Currently gnapplet is not compatible with 3rd generation of Symbian, for more details see http://blog.cihar.com/archives/2007/06/27/gammu_and_symbian_3rd_generation/.

Connecting to Nokia without Symbian.

Cable
There are three main protocols used in cable connections:
  • MBUS (sometimes called M2BUS) - old, not recommended
  • FBUS - recommended
  • AT commands - limited, recommended for data calls
All phones have a connector under the battery (the exception is the Nokia 3210 - it's on right side of battery) - it's for FBUS and MBUS. This connector is only way for connecting to phone functions on Nokia 5510 (DKE-2 gives access to MP3 side only)
To use Gammu with it you will only need a simple converter and the pins description from Internet.
The alternative to cable working with one phone is kit - plug for phone from flasher (RJ45 or PS2) + compatible with it converter for serial port. There are many offers - it's enough to write for example "ps2 and cable and phone_model" in Google
Many phones have connector on bottom of phone. It's for FBUS (always), sometimes for AT commands and sometimes for MBUS:
  • Older phones had connector like in Nokia 6110. You can use FBUS and MBUS cable there. Original Nokia cables for these phones were called DAU9P. With Nokia 7110/6210/6310/6310i you can additionaly use DLR3/DLR3P cables too (they will not work with older models like Nokia 5110 or 6110) - you will have FBUS and AT commands. All of them don't need special drivers, because are designed to use with serial ports.
  • Nokia 9210 have connector working in FBUS and MBUS...but if you want to use FBUS with original and non-modified DLR-2L, you have to enable FBUS mode from netmonitor menu 31...but for enabling netmonitor you have to use MBUS cable (and MBUS is not supported by DLR-2L)
  • New phones have PopPort. It's for FBUS, MBUS the most often is not connected (see article from NokiaPort.de). You have AT commands in more expensive phones too.
For PopPort you have to connect cable with USB converter inside or not (it depends on phone model - new/more expensive models have USB converter on main board and cable is simple cable extension only).
  • cables for for phones without USB converter on phone main board

    • original DKU5 - Supported by Gammu in windows but unsupported in Linux (nobody wanted to make the kernel driver for it)
    • original CA42 - Supported fully in Windows, limited in Linux (see below)
    • cloned DKU5 with PL2303 and other - The most often suported in Windows, sometimes in Linux (depends on quality of manufacturer driver)
  • for phones with USB converter on phone main board.

    • original DKU2 - Supported by Gammu in windows.
      There is easy driver in Gammu distribution for Linux too - it works quite enough with the most popular phones, adding support for more models need to add their ID only (because all USB processing is done by phone, you add phone product ID). It doesn't work with Nokia 6230 with firmware 5.xx.
      NOTE: this cable will not give access to phone functions in Nokia 3300
      For more info (both for Linux and Windows) see notes below.
    • original CA53 - no info (probably very similiar to DKU2)
    • ark3116 cable - see below
A little more about cables compatibility for Nokia phones: http://europe.nokia.com/nokia/0,,79898,00.html (probably all CA42 phones can be used with DKU5 cable and probably all CA53 phones can be used with DKU2)
Generally - Gammu doesn't have problems with serial port cables. Just enable read/write access to the serial port being used, set it as "port" in gammurc and set "connection" to right protocol.

There are notes in Net, that some 3rd party serial cables for 8210/8250 doesn't work with 5210, some from 8210 doesn't work with 2100. It can happen, if signals are in different places in both models. So, be carefull here. Please note, that during connection using serial cable you can have incorrect chars too:
  • (Linux) if you have wrong kernel options for serial port - for FBUS there should be support enabled for the best possible UART (16550 or something similiar, which is required to have 115200 and 16 bytes UART queue)
  • if port can't be set correctly to required speed (the most often 115200)
  • if you have something wrong with hardware (cable, phone)
A little more about USB support in Linux: http://www.linux-usb.org/

DKU2 cable

for Linux:
  • build and install the kernel module -- this is for 2.6 *only*, it will not work on a 2.4 kernel. The Makefile uses the standard convention of /usr/src/linux-2.6 as the kernel source home; if you already have that, simply type "make; make install" and you're done.
NOTE: if you're on Fedora Core 3 and have no clue how to prepare your kernel source for building external modules, follow step #1 in my HowTo for the rt2x00 project on Sourceforge: http://sourceforge.net/forum/message.php?msg_id=2959689
  • Compile gammu as normal (./configure; make)
  • Plug in your phone, and look in /var/log/messages for the device that was registered as "FBUS". It should look like this:
  kernel: Nokia FBUS Port:
kernel: Nokia DKU2 1-2:1.10: Nokia 7600/6230 DKU2 driver converter detected
kernel: usb 1-2: Nokia 7600/6230 DKU2 driver converter now attached  to ttyUSB0
NOTE: there are two drivers that fight for the AT side of your Nokia -- the stock "cdc_acm" driver and the "nokia_dku2" module. So, if cdc_acm got there first and created ttyACM0, then most likely your phone will be ttyUSB0. If the nokia_dku2 got there first, then most likely your AT will be ttyUSB0, and the FBUS port ttyUSB1. I've had it happen both ways.
This can make sometimes problems (report from other user):
Problem: My Nokia 6230 phone does weird things - when I run smsd and receive new message, phone just hangs, restarts and message isn't saved in mysql, but ofcoure is saved next time I run smsd, but the same happens again if I receive message. Actually noticed the same when phone said - battery is full (or any other action is done with phone), connection with smsd droped.
Solution: Ok, problem seems to be solved, seems that linux acm module tries to make serial connection to phone and try to do something and when connection through fbus and serial is done at the same time, everything hangs. - just removed acm module and now serial and fbus connection is made through nokia_dku2 module.

  • make sure /dev/ttyUSB* is owned by the user running gammu! chown/chmod it as needed. On my FC3 machine I added the proper configurations to /etc/security/console.perms to chown it to the logged in user for me:
  Under this line: =/dev/raw1394
Add this line:   =/dev/ttyACM* /dev/ttyUSB*
  Under this line:   0600     0600 root
Add this line:     0600      0600 root
Log out and log back in and it will work properly for you forever.
  • Configure your .gammurc:
[gammu]
port = /dev/ttyUSB0
connection = dku2
  • run gammu --identify! At this point is should be working.
for Windows:
  1. Download driver from nokia.com (http://europe.nokia.com/nokia/0,,81914,00.html or other)
  2. Install driver
  3. (for some phones like N6111) Unlock phone keypad - it must be unlocked all time
  4. Connect phone to cable, cable to pc
  5. (for some phones like N6111) Select default mode in phone
  6. Phone will be installed
  7. Gammurc:
[gammu]
Connection = dku2

DKU5 cable

for Windows:
  • install driver from Nokia (latest 1.24 version). It's for Atmel based cables. Other drivers and cables with other chipsets sold as original DKU5 were not tested.
  • enter Control Panel and properties to created "Port 1 on Nokia adapter" device
  • set "bits per second" to 115200
  • set connection "dku5" without device (for FBUS) or "at..." with Port 1 device name (for AT) in Gammu config file
  • connect cable to phone
Sometimes it happen, that first connection try isn't successfull. Without disconnecting cable and phone try again. It should work then.

CA42 cable

for Windows:
  • install driver from Nokia
  • connect cable to phone and later to USB (cable will be recognized, when will be connected to phone !)
  • wait for driver installation
  • go into Windows Device Manager (Start, Settings, Control Panel, System, ...)
  • look for properties for modem "Nokia CA-42 USB"
  • check serial device assigned with it (for me it was COM20:)
  • use "port = COM20:" (or other) and "connection = dlr3" (for FBUS)/"connection = at115200" (for AT commands) in config file
  • remember to have phone keypad unlocked during communication
for Linux:
ACM driver should load automatically for CA-42 cable. You can then use at or dlr3 connections to talk to this device, eg.:
[gammu]
port = /dev/ttyACM0
model =
connection = dlr3

ark3116 cable

The ark3116 driver for 2nd-source cable (original does not exist) is included in the Linux-kernel since 2.6.17rc5.
If Linux attaches the ark3116 to a USB, use the following configuration:
[gammu]
port = /dev/ttyUSB0
model =
connection = fbus-nopower

Infrared

There are two methods: direct communication with the phone, or using operating system functions to communicate with it.
The first method ("infrared" in gammurc) is obsolete, but required with 6110/6130/6150 and compatible. Also Nokia 8210 uses it, when entering infrared using the 2 player mode.
In Linux disable infrared in kernel, connect your infrared device to serial port (other irda dongles than conenected to serial port won't be supported in this mode) and try Gammu with "infrared" connection. If doesn't work, there will be required some modifications of sources. Please contact authors.
In Windows ANY infrared device can be assigned to serial port with driver written by Jan Kiszka.
The second method ("irda" in gammurc) is much better. It's compatible with all modern operating systems (under Linux, infrared must be enabled in the kernel). This is called socket infrared and is used in all new phones.
Note: in many new models (like Nokia 6230 or 6230i) you have to have keypad unlocked during all connection time. Simply activate Bluetooth, infrared (or whatever you use) and enter phone menu before you will try to connect with Gammu.
Note: some infrared modules for PC require setting non standard parameters (for example, lowering max. speed to 115200) for communicating with phones. This is not Gammu issue then ! Example: for Stir 4200 based dongle you have to set in Control Panel
Infrared transceiver type - vishay 6101E
Min. Turn-around time - 0.5 ms (instead of default 1 ms)
Speed enable - 115200 (instead of default 4Mbps)
Example of using socket infrared under Linux (based on USB dongle):
  1. compile the kernel with USB and infrared protocols (this is already done in most modern distributions).
  2. if necessary, insert USB module (e.g. modprobe irda-usb) (in most modern distributions, this shouldn't be necessary).
  3. use irattach irda0 -s or similiar, to set up the infrared port.
  4. enable read/write access to the infrared port (/dev/ircomm0, or whatever) with the following command:
    chmod ugo+rw /dev/ircomm0
    (This step may or may not be necessary, depending on the way the distribution's configured.)
  5. set "connection" in gammurc to "irda", "port" to "/dev/ircomm0" (or the relevant infrared port)
A little more about infrared in Linux is here: http://www.hpl.hp.com/personal/Jean_Tourrilhes/IrDA/IrDA.html
Bluetooth
Works OK in all situations.
Note: in many new models (like Nokia 6230 or 6230i) you have to have keypad unlocked during all connection time. Simply activate Bluetooth, infrared (or whatever you use) and enter phone menu before you will try to connect with Gammu
Note: some old Nokias (6310i with old firmware and so on) need to use special connections (for example "bluerfphonet" instead of "bluephonet").
Example of using USB dongle for Linux (BlueZ stack): (Note: most of this needs to be done as the superuser - i.e., root)
  1. compile the kernel with USB and Bluetooth - don't use the bluetooth setting in the USB section! (this is already done in most modern distributions)
  2. if necessary, load the kernel driver (modprobe hci_usb) (in most modern distributions, you shouldn't need to do this)
  3. use hciconfig hci0 up to enable the dongle
  4. create a text file /etc/bluetooth/givepin with the following contents:
    #!/bin/sh
    echo "PIN:5432"
  5. change the file permissions to make it executable:
    chmod a+x /etc/bluetooth/givepin
  6. in /etc/bluetooth/hcid.conf set "pin_helper" to "/etc/bluetooth/givepin;"
  7. execute hcid to send options from hcid.conf to bluetooth device
  8. do hcitool scan to get the phone address and enter this as the "device" parameter in gammurc. Set protocol to "bluephonet" or whatever is relevant for your setup (see the Connection section of the config file for details on this)
  9. during first connection give PIN 5432 in phone
  10. use "bluephonet" or "bluerfphonet" or "blueat" connections (with or without device address in "device")
A little more about Bluez is here:
In Windows there are two ways:
  1. using emulated serial ports for connecting to concrete phone services. It was used by old Bluetooth stacks (like WidComm) or can be set with Microsoft stack (Windows XP SP2, Windows 2003 and later). Not recommended. To use it you need to pair phone with PC, assign some phone service to serial port, give it as "device" and use correct "*blue" (like "phonetblue") connection
  2. using Microsoft stack (Windows XP SP2, Windows 2003 and later) to direct connection. Recommended.

    1. pair phone with computer using "Bluetooth devices" in Windows Control Panel
    2. use "bluephonet" (for older phones there could "bluerfphonet" instead of "bluephonet" required) or "blueat" connections (with or without device address in "device")
    Flasher Cables
Flasher cables are different from standard data cables. They connect to the parallel (LPT) port and allow you to read from and write to the phone's internal flash memory. Using the correct software (called a flasher) and a flasher cable, you can upgrade the phone's firmware to a more recent version. Gammu, as user software, doesn't support flashing.
There's plenty of information about flashing and flasher equipment on the web - using a search engine, with terms like flasher, mobile, firmware, etc should turn some up.
Connecting to Ericsson / Siemens / Samsung / Alcatel

Cable

Get serial cable for the appropriate model, plug it into the phone and in a free serial port of the PC. In gammu, set the correct port ("COM1:" .. "COM9:" in Windows, "/dev/ttyS*" in Linux).

Set "connection=at115200" (or lower) and "model=at". You can also try "model=obex".

Infrared
You can map your infrared connection to a virtual COM port in Win9x and XP. Then give "port=COM4:" (or check the correct port in Control Panels/Infrared transfer) and the connection will look like normal serial connection. Continue as above.
If you wish to use true infrared connection, follow the steps in the Nokia answer above.

Bluetooth
See Nokia answer above.

General connection notes

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 without USB chip like 6230
    Connection "dku2phonet"/"dku2"
    Port type dku2
  • New Nokia protocol for DKU5 (and phone with USB chip like 5100
    Connection "dku5fbus"/"dku5"
    Port type dku5
  • New Nokia protocol for PL2303 USB cable (and phone with USB chip like 5100)
    Connection "fbuspl2303"
    Port type usb
  • Sony-Ericsson USB cable
    Connection "at"
    Port type usb
  • Old Nokia protocol for MBUS/DAU9P
    Connection "mbus"
    Port type serial

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" (under Windows) or "at" (under Linux)
    Port type IrDA
  • OBEX for infrared
    Connection "irdaobex"
    Port type IrDA
    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 Bluetooth
  • 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 Bluetooth
  • Nokia protocol for Bluetooth stack with other DCT4 Nokia models
    Connection "bluephonet"
    Port type Bluetooth
  • 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 Bluetooth
  • AT commands for Bluetooth stack with other phones (Siemens, other Nokia,etc.)
    Connection "blueat"
    Port type Bluetooth
  • 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 Bluetooth
  • OBEX for Bluetooth stack with other phones (Siemens, other Nokia, etc.)
    Connection "blueobex"
    Port type Bluetooth
    Model "obex"

    Adserver 
                    610x250

    If you liked this article, subscribe to the feed by clicking the image below to keep informed about new contents of the blog:





0 commenti:

Post a Comment

Random Posts

Recent Posts

Recent Posts Widget

Popular Posts

Labels

Archive

page counter follow us in feedly
 
Copyright © 2014 Linuxlandit & The Conqueror Penguin
-->