Sunteți pe pagina 1din 4

Install playsms and kannel on CentOS 6 Final and Huawei E220 unlocked

" , " , , 2-, ,


1 yum install gcc 2 yum install libxml2-devel 3 yum install wvdial

220
1 wvdialconf /etc/wvdial.conf

: . Editing `/etc/wvdial.conf'. Scanning your serial ports for a modem. Modem Port Scan<*1>: S0 S1 S2 S3 WvModem<*1>: Cannot get information for serial port. ttyUSB0<*1>: ATQ0 V1 E1 -- OK ttyUSB0<*1>: ATQ0 V1 E1 Z -- OK ttyUSB0<*1>: ATQ0 V1 E1 S0=0 -- OK ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK ttyUSB0<*1>: Modem Identifier: ATI -- Manufacturer: huawei ttyUSB0<*1>: Speed 9600: AT -- OK ttyUSB0<*1>: Max speed is 9600; that should be safe. ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK WvModem<*1>: Cannot get information for serial port. ttyUSB1<*1>: ATQ0 V1 E1 -- OK ttyUSB1<*1>: ATQ0 V1 E1 Z -- OK ttyUSB1<*1>: ATQ0 V1 E1 S0=0 -- OK ttyUSB1<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK ttyUSB1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK ttyUSB1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK ttyUSB1<*1>: Modem Identifier: ATI -- Manufacturer: huawei

ttyUSB1<*1>: Speed 9600: AT -- OK ttyUSB1<*1>: Max speed is 9600; that should be safe. ttyUSB1<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK Found a modem on /dev/ttyUSB0. Modem configuration written to /etc/wvdial.conf. ttyUSB0: Speed 9600; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0" ttyUSB1: Speed 9600; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0" download xampp
http://nchc.dl.sourceforge.net/project/xampp/XAMPP%20Linux/1.7.4/xampplinux-1.7.4.tar.gz 2 tar zxvf xampp-linux-1.7.4.tar.gz -C /opt/ 1 3 cd /opt/lampp 4 ./lampp start

download sms engine kannel


1 wget http://www.kannel.org/download/1.4.3/gateway-1.4.3.tar.gz 2 tar zxvf gateway-1.4.3.tar.gz -C /usr/local/src/ 3 cd /usr/local/src/gateway-1.4.3/ 4 mkdir -p /opt/kannel 5 ./configure --prefix=/opt/kannel 6 make 7 make install

buat konfigurasi kannel.conf untuk modem E220 huawei seperti ini, simpan di /opt/kannel/sbin/
01 #CORE 02 group = core 03 admin-port = 13000 04 admin-password = playsms 05 status-password = playsms 06 log-file = "/var/log/kannel/kannel.log" 07 log-level = 0 08 access-log = "/var/log/kannel/access.log" 09 smsbox-port = 13001 10 store-type = file 11 store-file = "/var/log/kannel/kannel.store" 12 13 #SMSC MODEM GSM 14 group = smsc 15 smsc = at 16 port = 13013 17 host = "localhost" 18 smsc-id = Huawei

19 modemtype = Huawei 20 device = /dev/ttyUSB1 21 speed = 9600 22 sms-center = "isi dengan sms center" 23 24 group = modems 25 id = huawei 26 name = huawei 27 detect-string = "huawei" 28 init-string = "AT+CNMI=2,1,0,0,0;+CMEE=1" 29 30 #SMSBOX SETUP 31 group = smsbox 32 bearerbox-host = localhost 33 bearerbox-port = 13001 34 sendsms-port = 13131 35 sendsms-chars = "0123456789+" 36 global-sender = "isi dengan sms center" 37 log-file = "/var/log/kannel/smsbox.log" 38 log-level = 0 39 access-log = "/var/log/kannel/access.log" 40 41 #SEND-SMS USERS 42 group = sendsms-user 43 username = playsms 44 password = playsms 45 46 #SMS SERVICE 47 group = sms-service 48 keyword = default 49 accept-x-kannel-headers = true 50 max-messages = 0 51 assume-plain-text = true 52 catch-all = true get-url = 5 "http://localhost/playsms/index.php?app=call&cat=gateway&plugin=kannel&acce 3 ss=geturl&t=%t&q=%q&a=%a"

jalankan sms engine


1 cd /opt/kannel/sbin 2 ./bearerbox kannel.conf & 3 ./smsbox kannel.conf &

download aplikasi (playsms)


wget 1 http://nchc.dl.sourceforge.net/project/playsms/playsms/Version%200.9.5.2/pla ysms-0.9.5.2.tar.gz 2 tar zxvf playsms-0.9.5.2.tar.gz -C /usr/local/src/ 3 cd /usr/local/src/playsms-0.9.5.2/web 4 mkdir -p /opt/lampp/htdocs/playsms 5 mkdir -p /var/spool/playsms 6 mkdir -p /var/log/playsms 7 cp -rR * /opt/lampp/htdocs/playsms/ 8 /opt/lampp/bin/mysqladmin -u root -p create playsms /opt/lampp/bin/mysql -u root -p playsms < /usr/local/src/playsms9 9.5.2/db/playsms.sql cd bin/ cp playsmsd playsmsd_start playsmsd.php /usr/local/bin cp playsms /etc/default/

aktifkan sms engine di menu Gateway > Manage Kannel > kannel (Inactive) (click here to activate) jalankan playsmsd_start
1 /usr/local/bin/playsmsd_start

login ke http://localhost/playsms username dan password admin, testing kirim dan terima jika ingin dengan git repository untuk konfigurasi sama seperti yang diatas