Just explore sms gateway that seems to be complicated but finally I can get it working on my own machine with my old K750i sony ericsson phone.
What sources are behind this sms gateway?There are 3 main sources that need to run in background and 1 sources as frontend.
Background source are:
- Gammu - for communicating with handphone.
- Handphone - as receiver and transmitter.
- Database (MySQL) - for storing and manipulating sms.
How to install sms gateway source?First, go install gammu. Type this on terminal
sudo add-apt-repository ppa:nijel/ppa
sudo apt-get update
sudo apt-get install gammu gammu-smsd
Second, install MySQL also with apache web server. Go to apachefriend to get latest XAMPP Linux also follow the installation step on that page. Now, you have local PHP, and MySQL server.
Third, setting up Kalkun database. Go to your web browser and go to this link http://localhost/phpmyadmin. Don't forget to start lampp (XAMPP Linux) before go to phpmyadmin page. You should now see Create new database form, fill form with kalkun and click on create button. Just close this page when you succeed.
Fourth, connect your phone. Just connect your phone with supported USB cable. After connected, type this on terminal to create log files.
sudo touch /etc/smsdlog
Test your phone connection by type this on terminal
If your phone supported and your config is correct, you will see phone information like Device, Model, Firmware, IMEI, SIM IMSI, etc. Please note on Device information as it will be used on editing configuration
Edit the content of /etc/gammu-smsdrc with your favourite text editor. Make sure you have permission to make a change on gammu-smsdrc. This is my gammu-smsdrc content:
# Configuration file for Gammu SMS Daemon
# Gammu library configuration, see gammurc(5)
# Please configure this!
port = /dev/ttyACM1connection = at115200
#logformat = textall
# SMSD configuration, see gammu-smsdrc(5)
PIN = 1234
service = mysql
DeliveryReport = sms
logfile = /etc/smsdlog
# Increase for debugging information
debuglevel = 1
User = root
PC = localhost:/opt/lampp/var/mysql/mysql.sock
Database = kalkun
# Paths where messages are stored
inboxpath = /var/spool/gammu/inbox/
outboxpath = /var/spool/gammu/outbox/
sentsmspath = /var/spool/gammu/sent/
errorsmspath = /var/spool/gammu/error/
Port should same as Device information. Now run gammu by typing on terminal
If running well you should see this on terminal
[sudo] password for ardinoto:
Log filename is "/etc/smsdlog"
Fifth - The Last Step, Install kalkun. Get the latest kalkun here. Extract kalkun contents to /opt/lampp/htdocs/kalkun. Edit kalkun database settings on /opt/lampp/htdocs/kalkun/system/application/config/database.php.
$db['default']['hostname'] = "localhost";$db['default']['username'] = "root";$db['default']['password'] = "";$db['default']['database'] = "kalkun";$db['default']['dbdriver'] = "mysql";
Finally, open your browser and go to http://localhost/kalkun