I think you already know (enough) about Gammu, so I won’t tell a lot about it. A little bit about Gammu, it is a software which has some abilities to control your phone through computer. It provides some useful function for handling Messages and Calls. That’s why it widely used and well-known as the backend for simple SMS Gateway System.
Few weeks ago, I got a project to build a LAN Monitoring System. The system is really simple, it’s do an automatic check for LAN and then send SMS notification if there any problem occurs. It combines Gammu (for SMS backend), MySQL (for data storage), and PHP (as the frontend of the System).
It’s easy to install and configure Gammu under my development environment. Here I’m using standar Ubuntu 10.04, with the default installed kernel, 2.6.32. And note, that I’m using MySQL as Backend for data storage. *I assume you already had Apache PHP MySQL on your system.
Okay, no more talks, let’s do it !!
Install Latest Stable Version of Gammu
1. Add Gammu’s Official PPA
sudo add-apt-repository ppa:nijel/ppa sudo apt-get update
2. Install Latest Gammu
sudo apt-get install gammu gammu-smsd libgammu7 libgsmsd7
Configure Gammu 1.29
For example, I’m using my SE w660i (k530i mods) which is connected to computer through an USB Cable. You can use any kind of phone, as long as it supported by Gammu.
1. Create new Gammu Configuration file (gammurc)
cd ~ gedit .gammurc
add the following configurations:
[gammu] device = /dev/ttyACM0 connection = at115200
Parameters value may different for each computer/ laptop, phone model, and connection type. I check my device node by seeing it in dmesg. Soon, after plugging in your phone type dmesg. Maybe it shown something like this :
Save the file. Now, you should test the configuration. Type this command in the terminal:
gammu --identify
if Gammu detect your phone, it should be like the image shown below:
2. Create new SMSD Configuration file (gammu-smsdrc)
gedit .gammu-smsdrc
Add these parameters:
[gammu] device = /dev/ttyACM0 connection = at115200 [smsd] service = sql driver = native_mysql LogFile = syslog user = root #mysql user password = root #mysql password pc = localhost database = smsd #database name
You can use any database you desired, but it should have required Gammu tables. Simply run this MySQL.Gammu.tables on your database. That’s all we need. Now you can test your configuration by running this command :
gammu-smsd -c .gammu-smsdrc
It will show nothing if your configuration is correct. Check if your inbox already moved into database by opening table ‘inbox’ (in the database you use).
Sometimes you may got some errors after run the command. I got some, hehehe.. But gammu-smsd will tell you the error detail, so you can fix it easily. These are errors I got while trying to setup Gammu :
- Error getting SMS (Unknown error.:27)
This is Gammu 1.26′s bugs. It’s already fixed in 1.29. Update your Gammu. - Version of installed libGammu.so (1.26.1) is different to version of Gammu (1.29.0)
This error occurs when you forget to update the following packages : gammu-smsd libgammu7 libgsmsd7
Remember to update those packages too when you updating the Gammu - unknown smsd service type: “sql”
Gammu 1.26 doesn’t recognized service type “sql”. So update your Gammu to 1.29 to fix this problem - DataBase structures are from higher Gammu version
It’s happened because the version of the Gammu isn’t corrensponded to gammu version in the database. Increase/ Decrease the value of field ‘version‘ in the ‘gammu‘ table. You may use phpMyAdmin or (mysql command prompt) to do it.

- MySQL is Deprecated, bla bla bla..
You should use ‘service=sql’ and the correct driver ‘driver=native_mysql’ in the Gammu SMSD Config file.
Some notes:
- After running gammu SMS Daemon, your inbox will be moved (‘backed up’) into MySQL Database automatically. Your inbox may empty.
- Your phone may still can be used as normal phone while Gammu SMS Daemon running, but it really freakin slow! *at least for my phone
![]()



Thanks sharing-nya mas,,saya ijin menyimak