这几天单位要折腾下子短信猫,于是就折腾了下子SMS Server Toos 3,官网:http://smstools3.kekekasvi.com/
参考网址:http://www.ozekisms.com/index.php?ow_page_number=380 这个是可能在发送短信过程中的遇到的错误列表
转载请注明出处。
首先,安装SMS Server Tools 3:
在官网下载,选择自己需要的版本,我使用的版本是smstools3-3.1.11.tar.gz(一开始使用的版本是最新的,但是和我的短信猫modem不兼容,调了半天换回低版本就好了)
进入下载到的目录;
tar -xzvf smstools3-3.1.11.tar.gz;
cd smstools3;
sudo make && make install;
出现指示信息:
[root@databak1 smstools3]# make install
cd src && make -
make[1]: Entering directory `/data1/soft/smstools3/src'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/data1/soft/smstools3/src'
./install.sh /usr/local/bin
Installing binary program files
/usr/local/bin/smsd
Installing some scripts
/usr/local/bin/sendsms
/usr/local/bin/sms2html
/usr/local/bin/sms2unicode
/usr/local/bin/unicode2sms
Installing config file
/etc/smsd.conf
Creating minimum spool directories
Skipped /var/spool, directory already exists
Creating directory /var/spool/sms
Creating directory /var/spool/sms/incoming
Creating directory /var/spool/sms/outgoing
Creating directory /var/spool/sms/checked
Installing start-script
/etc/init.d/sms3
Example script files are not installed automatically.
Please dont forget to edit /etc/smsd.conf.
则说明安装成功,现在配置smsd, 即编辑/etc/smsd.conf 文件如下即可
# Example smsd.conf. Read the manual for a description
devices = GSM1
logfile = /var/log/smsd.log
loglevel = 7
outgoing = /var/spool/sms/outgoing
checked = /var/spool/sms/checked
failed = /var/spool/sms/failed
incoming = /var/spool/sms/incoming
#sent = /var/spool/sms/sent
receive_before_send = no
keep_filename = no
[GSM1]
#init = AT+CPMS="SM","SM"
#pre_init = no
#init = ATE1;+CPMS="SM","SM"
#device = /dev/ttyUSB1
#device = /dev/usb/ttyUSB0
device = /dev/ttyS0
incoming = no
#pin = 1111
mode = new
rtscts = yes
cs_convert = yes
smsc = 8613800100500
memory_start=1
report = no
send_delay = 0
#baudrate = 115200
baudrate = 9600
#queues = OTHER
使用的时候,启用smsd并可以完成发送短信
/usr/local/bin/smsd;
sendsms 86183****8133(你的手机号,以86开头) ‘test(发送的内容)’
每一次修改配置文件后都要重启smsd
pkill smsd
/usr/local/bin/smsd
即可,希望能帮到你,如果有问题或者需要帮助欢迎邮箱交流:jiangyeziwh@gmail.com