Chinaunix首页 | 论坛 | 博客
  • 博客访问: 693139
  • 博文数量: 139
  • 博客积分: 7607
  • 博客等级: 少将
  • 技术积分: 1964
  • 用 户 组: 普通用户
  • 注册时间: 2007-11-11 23:43
个人简介

...

文章分类

全部博文(139)

文章存档

2012年(53)

2011年(4)

2010年(29)

2009年(10)

2008年(33)

2007年(10)

分类: LINUX

2012-02-17 15:32:08

第一:安装硬件:把短信猫接上电,把sim卡插入,把串口接到服务器主板的接口上。
第二:安装minicom,gettext-devel gettext
[root@nagios ~]# yum install -y minicom gettext-devel gettext
第三:运行命令:
[root@nagios ~]# minicom -s ,配置Serial port setup–>Bps/Par/Bits, 将相关值改为9600 8N1, /dev/modem改为对应串口(ttyS0是串口1,ttyS1是串口2). 最后选择Save setup as dfl—>Exit from Minicom
第四:从下载gnokii,并编译安装.
[root@nagios ~]# tar jxvf gnokii-0.6.28.1.tar.bz2 
[root@nagios ~]# cd gnokii-0.6.28
[root@nagios ~]# ./configure
[root@nagios ~]# gmake
[root@nagios ~]# gmake install
[root@nagios ~]#cp /usr/local/share/doc/gnokii/sample/gnokiirc  /root/.gnokiirc
[root@nagios ~]#vi ~/.gnokiirc(修改如下几项)
model = AT
# model = 6110
serial_baudrate = 9600

[root@nagios ~]#gnokii -identify#检测
GNOKII Version 0.6.28
LOG: debug mask is 0x1
Config read from file /root/.gnokiirc.
phone instance config:
model = AT
port = /dev/ttyS0
connection = serial
initlength = default
serial_baudrate = 9600
serial_write_usleep = -1
handshake = software
require_dcd = 0
smsc_timeout = 10
rfcomm_channel = 0
sm_retry = 0
Initializing AT capable mobile phone ...
Serial device: opening device /dev/ttyS0
Serial device: setting RTS to high and DTR to high
Message sent: 0x00 / 0x0004
-----华丽的省略线------ (不省略博文不显示)           
Received message type 06
IMEI         : 012345678901234
Manufacturer : WAVECOM MODEM
Model        : MULTIBAND  900E  1800 
Product name : MULTIBAND  900E  1800 
Revision     : 534_09gg.2D 1748852
Serial device: closing device
[root@nagios ~]#
说明木问题了,你可以发给短信试一试:
[root@nagios ~]# echo -e "我注意你很久了。" | gnokii --sendsms 1365139XXXX
阅读(1229) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~