Tuesday, December 9, 2014

How to Install Gammu Centos 7

Gammu is used to control the phone that made the C language. You can play a lot of things and a very easy way to manipulation.
While gammu-smsd is a daemon that runs continuously behind the scenes program.

In this manual before installation, you need to run centos minimal install, you can use a USB or CD media to install it.

mysql

install completeness compilation needs.

yum groupinstall 'Development Tools'

check whether the compiler is complete according to the need, if not add and fill compiler.

yum install gcc gcc-c++ ncurses-devel


Install cmake
-------------
cd /tmp/

wget http://www.cmake.org/files/v3.0/cmake-3.0.0.tar.gz

tar -zxvf cmake-3.0.0.tar.gz

cd cmake-3.0.0

.bootstrap
gmake
gmake install


check cmake installed

cmake -version

Install gammu 64 bit
-------------

http://software.opensuse.org/package/gammu

wget http://download.opensuse.org/repositories/home:/Nijel/CentOS_CentOS-6/x86_64/gammu-1.33.0-2.2.x86_64.rpm

yum install gammu-1.33.0-2.2.x86_64.rpm -y



check modem are used

dmesg


gammu --identify

gammu-config



Create mysql database:

mysql -uroot -p

create database dbsms;

\q

import data tab:

mysql -uroot -p dbsms < /root/gammu-1.33.0/docs/sql/mysql.sql




vi /etc/gammu-smsdrc


[gammu]
device = /dev/ttyACM0
model = E173 (E173)
connection = at115200

[smsd]
service = sql
driver = native_mysql
PIN = 1234
logfile = /var/log/gammu/smsdlog
debuglevel = 1
#runonreceive = /some/script
commtimeout = 30
sendtimeout = 30
user =
password =
pc = localhost
database = dbsms


esc:wq

simple use:

gammu-smsd --daemon

ps aux | grep gammu-smsd

tail -f /var/log/gammu/smsdlog