2008-12-01

Configuration SMS gateway By Gammu

created by yadi mulyadi

Celluler manager GAMMU is used for mobile phone or modem. Gammu contains a set of libraries and functions related to the functions of mobile phones in general, such as SMS, dial and other functions. Gammu support with the MySQL database. In the implementation of gammu, need to set communication between the computer and a modem / mobile phone, gammu with the data base, gammu with the programming language. The following configuration is required:

1. Configuration gammurc

gammurc is one of the files provided by the GAMMU function as a reference when making a connection between the computer and other media. Other media can be a mobile phone or modem. Gammurc found in the file written as follows:

--------------------------------------------------------------

[gammu]

port = ‘’

#model = ‘’

connection = ‘’

#synchronizetime = yes

--------------------------------------------------------------

--------------------------------------------------------------


Word [gammu] showed a set of configuration for a connection to the SMS gateway,
when using more than one connection will be added [gammu1], [gammu2] ... etc. with
some configuration of each. Only two of disetting to gammu can run the port and a
connection

Port filled hp port connector to the computer (needs to be connectornya meggunakan
usb, bluetooth or any other) connection and filled with the atcommand. Ex:

-----------------------------------------------------------

[gammu]

port = com3:

#model = k510i

connection = at115200

#synchronizetime = yes

-----------------------------------------------------------

-----------------------------------------------------------

2. Configuration smsdrc

The second file that is necessary in setting smsdrc. Smsdrc is one of the files gammu used to set the connection between gammu with the data base, in this case running MySQL. Data base and the relationship between the table provided gammu. The need to disetting is as follows:

-------------------------------------------------------------------
# --------------- SETTINGS FOR --smsd MYSQL -----------------------

user = ‘’

password = ‘’

pc = ‘’

database = ‘’

# when you send sms from some SMSC, you can have Delivery/Failed Delivery

# Reports from other SMSC number. You can set here number of this "buggy"

-------------------------------------------------------------------

-------------------------------------------------------------------

users with content in the name of the user who has access to the data base, with the contents of a password in the password for the user. Pc filled with localhost if the database is in a computer, and can be charged with using a computer where the ip database installed. And data base filled with the name of the database will be used.

Eg for Administration and Management System Customer Service Restaurants are as follows:

------------------------------------------------------------------

# ---------------------- SETTINGS FOR --smsd MYSQL --------------------

user = root

password =

pc = localhost

database = spappr3_1

# when you send sms from some SMSC, you can have Delivery/Failed Delivery

------------------------------------------------------------------

------------------------------------------------------------------

To check gammu can be used or not, the inspection should be done as follows: Entrance to the command prompt, and then go to the folder and
typing gammu:

>> gammu –identify

If hp or modem is detected then check the connection to check the
database gammu while running a server with the command:

>> gammu --smsd MYSQL smsdrc

If the server is running gammu and the operations using gammu could have been used.

2. Send and receive SMS using GAMMU

1. Send Message SMS
Delivery of SMS messages by using gammu can be done in two ways:

a. Operasi SQL insert to outbox table .

Delivery of messages by using insert the following:

insert into outbox ( destinationNumber,Coding,TextDecoded,

creatorID)

values ( '085221098710','Default_No_Compression',

'isi pesan’,'TEXT');

ket :

destinationNumber : Hp Number destination

Coding : type messages sent without kompressi

TextDecoded : Content of message

creatorID : Message Type: TEXT or IMAGE
b. By using the command send a message in gammu.

With menggunan command gammu then typing the following command in the command prompt:

>> echo ‘isi pesan’ | gammu --sendsms TEXT ‘nomor


2. Read SMS

Receive / read the incoming messages do with the content of table inboxes. In the table inboxes are processed by the field type boolean. Default this field is false.

No comments: