源码包安装方法如下:
先安装依赖软件包:
#yum install intltool glib2-devel glib2-static mysql-devel
下载软件包
#wget http://gnokii.org/download/gnokii/gnokii-0.6.31.tar.gz
解压,编译并安装
#tar zxvf gnokii-0.6.31.tar.gz
#cd gnokii-0.6.31
#./configure
#gmake && gmake install
#cp Docs/sample/gnokiirc /etc/gnokiirc
配置文件
vi /etc/gnokiirc
[global]
port = /dev/ttyS0
model = AT
##同时需要注释掉mode = 6510
serial_baudrate = 115200
use_locking = no
#### use_locking 此项如果是yes,只能给一个人发短信
测试:
运行gnokii –identify
Received message type 06
IMEI : 352129000923087
Manufacturer : WAVECOM MODEM
Model : MULTIBAND 900E 1800
Product name : MULTIBAND 900E 1800
Revision : 651b09gg.Q2406A 428
Serial device: closing device
发短信:
echo -n “test by gnokii” |/usr/bin/gnokii –sendsms xxxxxxx(号码)
手机将会收到短信“test by gnokii ”