9号彩票

Linux系统安装短信猫

更新:2018-1-23 10:53:35点击:
  • 品牌:博通
  • 型号:Linux
  • 市场价:
  • 优惠价:(已有 0 人购买)
  • 在线订购
产品介绍


//实现:在linux下通过短信猫发短信


//环境平台

CentOS5.4

intltool-0.41.1.tar.gz

gnokii-0.6.30.tar.gz

yum


//安装minicom及依赖包

yum -y install lockdev  minicom perl-XML-Parser


//编译安装intltool

tar zxvf intltool-0.41.1.tar.gz 

cd intltool-0.41.1

./configure

make

make install


//编译安装gnokii

tar zxvf gnokii-0.6.30.tar.gz

cd gnokii-0.6.30

./configure

make

make install


//配置minicom

/usr/bin/minicom -s


选择serial port setup


选择A( A修改为

/dev/ttySO   

//ttyS0 com

选择E( E修改为 

同样选择E9600

回车



//保存配置,Save setup as dfl



//退出配置界面,Exit from Minicom



//测试minicom

/usr/bin/minicom

输入 AT 后回车,返回 ok 则成功

//退出minicom

按,[ Ctrl+A ] --> [ z ] --> [ x ]


//配置gnokii

mkdir -p /root/.config/gnokii

cp /usr/local/share/doc/gnokii/sample/gnokiirc /root/.config/gnokii/config

vi /root/.config/gnokii/config


[global]

port = /dev/ttyS0

model = AT

initlength = default

connection = serial

use_locking = no

serial_baudrate = 9600

smsc_timeout = 10


[xgnokii]

allow_breakage = 0


[gnokiid]

bindir = /usr/local/bin/


[connect_script]

TELEPHONE = 12345678


[disconnect_script]


[logging]

debug = off

rlpdebug = off

xdebug = off


[phone_fake]

port = foobar

model = AT

connection = serial


[fake_driver]

sms_inbox = /tmp/sms



//测试gnokii

/usr/local/bin/gnokii --identify


[root@Nagios ~]# gnokii --identify

GNOKII Version 0.6.30

Cannot open logfile /root/.cache/gnokii/gnokii-errors

WARNING: cannot open logfile, logs will be directed to stderr

Lockfile /var/lock/LCK..ttyS0 is stale. Overriding it...

IMEI         : 351047888189814

Manufacturer : WAVECOM MODEM

No flags section in the config file.

Model        : MULTIBAND  900E  1800 

Product name : MULTIBAND  900E  1800 

Revision     : 641b09gg.Q2403A 132


//测试短信

echo -e "Give me a surprise" |/usr/local/bin/gnokii --sendsms 1581111****(号码)




//赋予权限
chown -R nagios.nagios /usr/local/bin/gnokii
chown -R nagios.nagios /dev/ttyS0


更多产品
友情链接:快赢彩票  易发彩票  幸运飞艇  创元彩票  广发彩票平台  

免责声明: 本站资料及图片来源互联网文章,本网不承担任何由内容信息所引起的争议和法律责任。所有作品版权归原创作者所有,与本站立场无关,如用户分享不慎侵犯了您的权益,请联系我们告知,我们将做删除处理!