安装配置gnokii使用短信猫发送短信
来源:互联网 发布:linux netsnmp 下载 编辑:程序博客网 时间:2024/06/07 00:19
1. 安装依赖
yum -y install perl-XML-Parser
wget http://ftp.gnome.org/pub/gnome/sources/intltool/0.40/intltool-0.40.6.tar.gz
tar zxvf intltool-0.40.6.tar.gz
cd intltool-0.40.6
./configure
make
make install
yum install -y minicom gettext-devel gettext
minicom -s
配置Serial port setup–>Bps/Par/Bits, 将相关值改为9600 8N1,
配置Serial port setup–>Serial Device, /dev/modem改为对应串口(ttyS0是串口1,ttyS1是串口2).
最后选择Save setup as dfl—>Exit from Minicom
2. 安装gnokii
wget http://www.gnokii.org/download/gnokii/0.6.x/gnokii-0.6.28.tar.gz
tar zxvf gnokii-0.6.28.tar.gz
cd gnokii-0.6.28
./configure --prefix=/usr/local/gnokii
make
make install
3. 修改配置文件
确认短信猫插到服务器上,并重启服务器
(示例配置文件)/usr/local/gnokii/share/doc/gnokii/sample/gnokiirc
vim /etc/gnokiirc
检测
/usr/local/gnokii/bin/gnokii --identify
测试
yum -y install perl-XML-Parser
wget http://ftp.gnome.org/pub/gnome/sources/intltool/0.40/intltool-0.40.6.tar.gz
tar zxvf intltool-0.40.6.tar.gz
cd intltool-0.40.6
./configure
make
make install
yum install -y minicom gettext-devel gettext
minicom -s
配置Serial port setup–>Bps/Par/Bits, 将相关值改为9600 8N1,
配置Serial port setup–>Serial Device, /dev/modem改为对应串口(ttyS0是串口1,ttyS1是串口2).
最后选择Save setup as dfl—>Exit from Minicom
2. 安装gnokii
wget http://www.gnokii.org/download/gnokii/0.6.x/gnokii-0.6.28.tar.gz
tar zxvf gnokii-0.6.28.tar.gz
cd gnokii-0.6.28
./configure --prefix=/usr/local/gnokii
make
make install
3. 修改配置文件
确认短信猫插到服务器上,并重启服务器
(示例配置文件)/usr/local/gnokii/share/doc/gnokii/sample/gnokiirc
vim /etc/gnokiirc
添加(port = /dev/ttyS1这一行根据实际情况进行配置,有时候是ttyS0)
[global]port = /dev/ttyS1model = ATinitlength = defaultconnection = serialuse_locking = yesserial_baudrate = 9600smsc_timeout = 10[xgnokii]allow_breakage = 0[gnokiid]bindir = /usr/local/gnokii/bin/[connect_script]TELEPHONE = 12345678[disconnect_script][logging]debug = onrlpdebug = offxdebug = off
检测
/usr/local/gnokii/bin/gnokii --identify
测试
echo "hello1" | /usr/local/gnokii/bin/gnokii --sendsms 186******
注意:
如果用zabbix用户发短信,还要给zabbix增加sudo的权限,调用发送短信的命令的时候加上sudo
visudo
添加
#######################modem##############################################
Cmnd_Alias GNOKII = /usr/local/gnokii/bin/gnokii
zabbix ALL=(root) NOPASSWD:GNOKII
###########################################################################
0 0
- 安装配置gnokii使用短信猫发送短信
- gnokii 短信猫 中文安装使用文档
- gnokii发短信,使用配置
- 如何使用短信猫发送中文短信
- 利用短信猫发送短信
- fedora25+java1.8+idea下使用短信猫发送短信
- 使用Wininet发送短信
- 使用Wininet发送短信
- 使用Wininet发送短信
- 使用java发送短信
- 使用Wininet发送短信
- 使用HttpURLConnection发送短信
- 使用web短信平台发送短信
- 使用名商通短信接口发送短信
- 短信猫发送短信失败原因查找
- AT命令 短信猫发送短信 H6221
- 短信猫接收与发送短信整理
- 短信猫发送短信没有回执
- spring mvc + spring事务注意点
- 浅析CC2540 OSAL工作流程
- Fedora20更改开机默认启动项以及更改启动等待时间(grub2引导)
- Maven实战(七)settings.xml相关配置
- MySql数据库乱码
- 安装配置gnokii使用短信猫发送短信
- PHP Composer: installation on ubuntu
- C/C++ Windows多线程
- 安装完 MySQL 后必须调整的 10 项配置
- 第五周项目四静态成员应用
- Linux文件编辑器 Vi(Vim)常用命令
- 只执行一次callback
- Web_PHP_DedeCMS_网络预约;
- ubuntu14.04 开启root登陆