Koozali.org: home of the SME Server
Obsolete Releases => SME 8.x Contribs => Topic started by: Num3 on June 18, 2014, 06:49:41 PM
-
Hi all,
I just managed to successfully install Gammu (http://wammu.eu/gammu/) on a machine running SME server 8.1 with a GPRS modem, and i would like to share it here.
Maybe someone can make a contrib?
P.S.: I was only able to compile gammu version 1.32, the latest 1.33 version gives errors.
1. Downloads
wget http://sourceforge.net/projects/gammu/files/gammu/1.32.0/gammu-1.32.0.tar.gz
yum install gcc
yum install e-smith-devtools
yum install cmake libusb-1_0-devel libdbi-devel bluez-devel postgresql-devel mysql-devel python-devel libcurl-devel cmake pkgconfig unixODBC-devel glib2-devel libgudev-1_0-devel
signal-event post-upgrade; signal-event reboot
Some packages do not download anymore, but no worries.
2. Compiling / Installing
tar -xzvf gammu-1.32.0.tar.gz
cd gammu-1.32.0
./configure
make install
3. Configuration
mkdir /var/log/gammu
touch /var/log/gammu/gammurc
echo '' > /var/log/gammu/smsdlog
Next configuration, may vary according to you own needs and modem, read gammu manual for more info!
nano /etc/gammu-smsdrc
Paste this basic config and save:
[gammu]
device = /dev/ttyS1
model = at
connection = at115200
[smsd]
service = sql
driver = native_mysql
PIN = 0000
logfile = /var/log/gammu/smsdlog
debuglevel = 0
phoneid = SMS_PHONE_NAME
CommTimeout = 300
SendTimeout = 30
MaxRetries = 3
StatusFrequency = 3600
ReceiveFrequency = 300
ResetFrequency = 3600
DeliveryReport = sms
user = yoursmsuser
password = yoursmspassword
pc = 127.0.0.1
database = smsdatabasename
Create mysqldatabase:
mysql
create database smsdatabasename;
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,ALTER ON smsdatabasename.* TO 'yoursmsuser'@'%' IDENTIFIED BY 'yoursmspassword';
FLUSH PRIVILEGES;
\q
mysql smsdatabasename < docs/sql/mysql.sql
Test!
/usr/local/bin/gammu-smsd -d -c /etc/gammu-smsdrc
If you get an error with 'libGammu.so.7' just fix it like this:
nano /etc/ld.so.conf
add this line at endo of file:
/usr/local/lib
Save, then type:
ldconfig
Start Daemon on boot:
cd /etc/e-smith/events/local/
cat <<EOF > /etc/e-smith/events/local/S95gammu-sms
#! /bin/sh
exec /usr/local/bin/gammu-smsd -d -c /etc/gammu-smsdrc
EOF
chmod +x /etc/e-smith/events/local/S95gammu-sms
signal-event local
Hope this helps someone else!
Thanks
-
hi, welcome here
thank you for your work/report but I suggest you to follow this howto, adapting it to SME server
http://anythingopensource.blogspot.it/2012/02/gammu-installation-in-scientific-linux.html
in a package oriented distro (rpm, deb, whatever) you should never install anything via compilation from sources..
if you follow the howto you have all rpm/yum tools and upgrading/updating will be easier
in any case, thank you very much for sharing