Been build gammu-1.27.90-1.1klixs2010.i586.rpm and wammu-0.33-2.1klixs2010.noarch.rpm and tried with klixs with no problem and now would like to try on building a smsgateway based on that gammu-smsd daemon and a nice webbased php interface for end user named kalkun.
Before continuing installing and configuring everything, I assume you already have the mysql, phpMyAdmin, apache and php system running well, otherwise do so.
First of all we need to configure our sms hardware device which in this tutorial I’m using Huawei E272 3G USB Modem and without any difficulties can work on klixs. We need to know the device node name for this device using dmesg command :
{code type=CSS}[root@jfklixs-domain jfdesign]# dmesg | tail
option 1-2:1.0: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB0
option 1-2:1.1: GSM modem (1-port) converter detected
usb 1-2: GSM modem (1-port) converter now attached to ttyUSB1
usbcore: registered new interface driver option
option: v0.7.2:USB Driver for GSM modems
scsi 9:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
sr1: scsi-1 drive
sr 9:0:0:0: Attached scsi CD-ROM sr1
sr 9:0:0:0: Attached scsi generic sg2 type 5
[root@jfklixs-domain jfdesign]#{/code}
Thus we know that our device were at ttyUSB0 and now it’s time to write the config for gammu-smsd daemon, save this config as /etc/gammu-smsdrc :
{code type=html}
[gammu]
port=/dev/ttyUSB0
connection = at
name = Huawei E272
model =
synchronizetime = yes
logfile = gammulog
logformat = textall
use_locking = yes
gammuloc = locfile
startinfo = yes
gammucoding = utf8
usephonedb = yes
number1 = 1234
[smsd]
service = MYSQL
PIN =.
logfile = smsdlog
debuglevel = 0
phoneid = +6287853085xxx
commtimeout = 30
sendtimeout = 30
receivefrequency = 0
checksecurity = 1
resetfrequency = 0
deliveryreport = no
deliveryreportdelay = 10
inboxpath = /var/spool/sms/inbox/
outboxpath = /var/spool/sms/outbox/
sentsmspath = /var/spool/sms/sent/
errorsmspath = /var/spool/sms/error/
inboxformat = unicode
transmitformat = auto
outboxformat = detail
user = dbuser
password = dbpasswd
pc = dbhost
database = dbname
{/code}
Let’s now create the database using phpMyAdmin and create database same as you define above on gammu-smsrc config, which named as dbname and had a database user as dbuser with password dbpasswd and the mysql service were run at dbhost.
We almost done, the last thing we must do is installing the webinterface to process the database as our interface for end user. Download the kalkun source here, and extract them to document root of your webserver.
Don’t forget to change the owner of the folder unto apache group user.
We need to initialize the database with pre-installed sql database, open again the phpMyAdmin and import the sql from folder media/db/install.sql from that kalkun source.
It’s time to fire up the sms daemon service, open konsole, logon to root and try starting the daemon with :
{code type=CSS}[root@jfklixs-domain jfdesign]# gammu-smsd
Log filename is “smsdlog”{/code}
As you may see from the message, you could investigate file smsdlog file in case the daemon could not run properly, which is in many case it’s always about the device name and database parameter. 🙂
Now, we could test the system within our browser, the default user is kalkun with password kalkun, and try to send some message ….
Good luck and have fun.