gnokii Configuration

Introduction

gnokii provides tools and drivers for use with mobile phones under various operating systems (most testing is done under Linux but also Solaris, *BSD family and MS Windows families are known to work). See http://en.wikipedia.org/wiki/gnokii for introductory information.

The following guidance might be useful in helping to configure gnokii on a Linux server.


My gnokii Configuration

Essentially I followed the standard installation procedure as described in the gnokii installation link below.

The /etc/gnokiirc configuration file does take some effort to get right in order to get a working configuration going.

First download and install a working version of gnokii.

[root@host gnokii]$ pwd
/usr/local/src/gnokii
[root@host gnokii]$

[root@host gnokii] yum install gnokii
...
(which fully installed gnokii)

Check the installation:

[root@host etc]# gnokii --version
GNOKII Version 0.6.19
Copyright (C) Hugh Blemings , 1999, 2000
Copyright (C) Pavel Janik ml. , 1999, 2000
Copyright (C) Pavel Machek , 2001
Copyright (C) Pawel Kot , 2001-2006
Copyright (C) BORBELY Zoltan , 2002
gnokii is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
There is absolutely no warranty for gnokii.  See GPL for details.
Built 17:03:09 Oct  6 2007
[root@host etc]#

[root@host MyDocuments]$ sudo vi /var/log/messages
...
Nov  6 14:59:23 host yum: Installed: gnokii.i386 0.6.19-1.el4.rf
...
[root@host MyDocuments]$

Modify the /etc/gnokiirc configuration file in a text editor :

[root@host ~]$ vi /etc/gnokiirc
[root@host ~]$

Check the system configuration, USB:


[root@host ~]# lsusb
Bus 002 Device 027: ID 0ac8:301b Z-Star Microelectronics Corp. ZC0301 WebCam
Bus 002 Device 026: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 002 Device 013: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 003: ID 046d:08a2 Logitech, Inc. Labtec WebCam Pro
Bus 001 Device 002: ID 152d:2329 JMicron Technology Corp. / JMicron USA Technology Corp.
Bus 001 Device 001: ID 0000:0000
[root@host ~]#

Check the system configuration, devices:

[root@host ~]# cat /proc/bus/usb/devices

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc= 38/900 us ( 4%), #Int=  2, #Iso=  2
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.9-78.0.22.plus.c4 uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=0000:00:1f.4
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 13 Spd=12  MxCh= 4
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=05e3 ProdID=0608 Rev= 7.02
S:  Product=USB2.0 Hub
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=255ms

T:  Bus=02 Lev=02 Prnt=13 Port=00 Cnt=01 Dev#= 26 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=e0(unk. ) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0a12 ProdID=0001 Rev=15.93
C:* #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:  If#= 1 Alt= 0 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb
E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb
E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb
E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms

T:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 27 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=ff(vend.) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0ac8 ProdID=301b Rev= 1.00
S:  Manufacturer=Vimicro Corp.
S:  Product=PC Camera
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=160mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=spca5xx
E:  Ad=81(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:  If#= 0 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=spca5xx
E:  Ad=81(I) Atr=01(Isoc) MxPS= 128 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:  If#= 0 Alt= 2 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=spca5xx
E:  Ad=81(I) Atr=01(Isoc) MxPS= 192 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:  If#= 0 Alt= 3 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=spca5xx
E:  Ad=81(I) Atr=01(Isoc) MxPS= 256 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:  If#= 0 Alt= 4 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=spca5xx
E:  Ad=81(I) Atr=01(Isoc) MxPS= 384 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:  If#= 0 Alt= 5 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=spca5xx
E:  Ad=81(I) Atr=01(Isoc) MxPS= 512 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:  If#= 0 Alt= 6 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=spca5xx
E:  Ad=81(I) Atr=01(Isoc) MxPS= 768 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:  If#= 0 Alt= 7 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=spca5xx
E:  Ad=81(I) Atr=01(Isoc) MxPS= 896 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=100/900 us (11%), #Int=  0, #Iso=  2
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 2.06
S:  Manufacturer=Linux 2.6.9-78.0.22.plus.c4 uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=0000:00:1f.2
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=152d ProdID=2329 Rev= 0.00
S:  Manufacturer=TrekStor GmbH & Co. KG
S:  Product=DataStation maxi n.u
S:  SerialNumber=0D0000000000688
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  3 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=046d ProdID=08a2 Rev= 1.00
C:* #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=160mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=spca5xx
E:  Ad=81(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:  If#= 0 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=spca5xx
E:  Ad=81(I) Atr=01(Isoc) MxPS= 128 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:  If#= 0 Alt= 2 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=spca5xx
E:  Ad=81(I) Atr=01(Isoc) MxPS= 192 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:  If#= 0 Alt= 3 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=spca5xx
E:  Ad=81(I) Atr=01(Isoc) MxPS= 256 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:  If#= 0 Alt= 4 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=spca5xx
E:  Ad=81(I) Atr=01(Isoc) MxPS= 384 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:  If#= 0 Alt= 5 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=spca5xx
E:  Ad=81(I) Atr=01(Isoc) MxPS= 512 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:  If#= 0 Alt= 6 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=spca5xx
E:  Ad=81(I) Atr=01(Isoc) MxPS= 768 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:  If#= 0 Alt= 7 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=spca5xx
E:  Ad=81(I) Atr=01(Isoc) MxPS=1023 Ivl=1ms
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:  If#= 1 Alt= 0 #EPs= 0 Cls=01(audio) Sub=01 Prot=00 Driver=snd-usb-audio
I:  If#= 2 Alt= 0 #EPs= 0 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
I:  If#= 2 Alt= 1 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
E:  Ad=83(I) Atr=01(Isoc) MxPS=  16 Ivl=1ms
I:  If#= 2 Alt= 2 #EPs= 1 Cls=01(audio) Sub=02 Prot=00 Driver=snd-usb-audio
E:  Ad=83(I) Atr=01(Isoc) MxPS=  32 Ivl=1ms
[root@host ~]#

Check the system configuration, loaded modules:

[root@host ~]# lsmod | grep usb
hci_usb                14657  2
bluetooth              48069  7 hci_usb,rfcomm,l2cap
usbserial              26409  1 pl2303
usb_storage            60809  2
snd_usb_audio          59681  0
snd_usb_lib            12225  1 snd_usb_audio
snd_pcm                97993  3 snd_usb_audio,snd_intel8x0,snd_pcm_oss
snd_rawmidi            27109  2 snd_usb_lib,snd_mpu401_uart
snd                    56613  10 snd_usb_audio,snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_mpu401_uart,snd_rawmidi,snd_seq_device
scsi_mod              126285  3 sd_mod,usb_storage,libata
[root@host ~]#

Use gnokii commands to test connectivity:

[root@host]$
[root@host]$ gnokii --phone siemensS55_bt --identify
GNOKII Version 0.6.19
IMEI         : 351083530948570
Manufacturer : SIEMENS
Model        : S55
Product name : S55
Revision     : 20
[root@host]$
[root@host]$
[root@host]$ gnokii --phone siemensS55_bt --getnetworkinfo
GNOKII Version 0.6.19
Network      : unknown (unknown)
Network code : undefined
LAC          : 33e2
Cell id      : 621d
[root@host]$
[root@host]$

Send SMS messages

Via Global Definition

Test the sending of a SMS message (via the global definition in the /etc/gnokiirc file):

[root@host tmp]$ gnokii --sendsms 12345678

Via Specific Phone Definition

Testing using definitions (in the /etc/gnokiirc file) for the NokiaE65 i) via the USB cable and ii) via Bluetooth:

[root@host tmp]$ gnokii --phone nokiaE65_usb --sendsms 12345678
[root@host tmp]$ gnokii --phone nokiaE65_bt --sendsms 12345678

Testing using definitions for the Siemens S55 i) via the IrDA and ii) via Bluetooth:

[root@host tmp]$ gnokii --phone siemensS55_ir --sendsms 12345678
[root@host tmp]$ gnokii --phone siemensS55_bt --sendsms 12345678

Conclusion

It proved possible to successfully configure gnokii for use with both the Nokia E65 and the Siemens S55 phones.
In the case of the Nokia the tests over both USB and Bluetooth connections were successful.
In the case of the Siemens it was only possible to get the Bluetooth connection working correctly.


General Links

The following general links are useful references when setting up gnokii:


URLSummary/Description
http://www.gnokii.org/ gnokii home page
http://wiki.gnokii.org/index.php/Installation Installation
http://wiki.gnokii.org/index.php/User's_Guide User's Guide - GnokiiWiki
http://linux.die.net/man/1/gnokii gnokii Linux man page
http://www.askarali.org/gnokii_install.html gnokii on Linux
http://www.gnokii.org/docs.shtml gnokii documentation
http://free-opensource.qvantel.net/mediawiki//index.php/AT_gnokii_with_Nokia_6120_Classic AT gnokii with Nokia 6120 Classic
http://www.chrisburgess.com.au/sms-gateway-how-to/ SMS Gateway How-To
http://wiki.gnokii.org/index.php/Smsd SMSD - GnokiiWiki (the easier solution for handling SMS from PHP is using smsd with the file module)
http://kandalaya.org/Docs/html/A760-3.html Motorola A760 and Linux Connectivity (address USB, IrDA and Blueototh connectivity)