Linux 下利用gnokii 调用短信猫发送短,突然就不能发送了,更换短信猫也是那样

缘沐 2017-02-14 03:42:47
[root@localhost ~]# echo "测试正常" |gnokii --sendsms XXXXXXXXXXX
GNOKII Version 0.6.31
LOG: debug mask is 0x1
Config read from file /etc/gnokiirc.
phone instance config:
model = AT
port = /dev/ttyUSB0
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/ttyUSB0
Serial device: setting RTS to high and DTR to high
Message sent: 0x00 / 0x0004
41 54 5a 0d | ATZ
write: [ATZ<cr>]
read : [ATZ<cr><cr><lf>OK<cr><lf>]
Message received: 0x00 / 0x000a
02 41 54 5a 0d 0d 0a 4f 4b 0d | ATZ OK
Received message type 00
Message sent: 0x00 / 0x0005
41 54 45 31 0d | ATE1
write: [ATE1<cr>]
read : [OK<cr><lf>]
Message received: 0x00 / 0x0004
02 4f 4b 0d | OK
Received message type 00
Message sent: 0x00 / 0x000a
41 54 2b 43 4d 45 45 3d 31 0d | AT+CMEE=1
write: [AT+CMEE=1<cr>]
read : [AT+CMEE=1<cr><cr><lf>OK<cr><lf>]
Message received: 0x00 / 0x0010
02 41 54 2b 43 4d 45 45 3d 31 0d 0d 0a 4f 4b 0d | AT+CMEE=1 OK
Received message type 00
Message sent: 0x06 / 0x0007
41 54 2b 47 4d 4d 0d | AT+GMM
write: [AT+GMM<cr>]
read : [AT+GMM<cr><cr><lf>TC35<cr><lf><cr><lf>OK<cr><lf>]
Message received: 0x06 / 0x0015
02 41 54 2b 47 4d 4d 0d 0d 0a 54 43 33 35 0d 0a | AT+GMM TC35
0d 0a 4f 4b 0d | OK
Received message type 06
Message sent: 0x06 / 0x0008
41 54 2b 43 47 4d 49 0d | AT+CGMI
write: [AT+CGMI<cr>]
read : [AT+CGMI<cr><cr><lf>SIEMENS<cr><lf><cr><lf>OK<cr><lf>]
Message received: 0x06 / 0x0019
02 41 54 2b 43 47 4d 49 0d 0d 0a 53 49 45 4d 45 | AT+CGMI SIEME
4e 53 0d 0a 0d 0a 4f 4b 0d | NS OK
Received message type 06
Message sent: 0x63 / 0x0009
41 54 2b 43 53 43 53 3f 0d | AT+CSCS?
write: [AT+CSCS?<cr>]
read : [AT+CSCS?<cr><cr><lf>+CSCS: "GSM"<cr><lf><cr><lf>OK<cr><lf>]
Message received: 0x63 / 0x001f
02 41 54 2b 43 53 43 53 3f 0d 0d 0a 2b 43 53 43 | AT+CSCS? +CSC
53 3a 20 22 47 53 4d 22 0d 0a 0d 0a 4f 4b 0d | S: "GSM" OK
Received message type 63
Initialisation completed
Message sent: 0x23 / 0x0009
41 54 2b 43 53 43 41 3f 0d | AT+CSCA?
write: [AT+CSCA?<cr>]
read : [AT+CSCA?<cr><cr><lf>+CSCA: "+8613010851500",145<cr><lf><cr><lf>OK<cr><lf>]
Message received: 0x23 / 0x002e
02 41 54 2b 43 53 43 41 3f 0d 0d 0a 2b 43 53 43 | AT+CSCA? +CSC
41 3a 20 22 2b 38 36 31 33 30 31 30 38 35 31 35 | A: "+86130108515
30 30 22 2c 31 34 35 0d 0a 0d 0a 4f 4b 0d | 00",145 OK
Received message type 23
=====> ENTER gn_sms_send()
enc_chars: 6
ext_chars: 0
total: 12
size of the input string: 18 bytes
number of characters in the input string: 6 chars
=====> ENTER sms_send_single()
General Data Coding
UCS-2
dcs: 0x08
Length: 0x0c
user_data_length: 0x0c
ValidityIndicator: 2
user_data: 59167F516D4B8BD56B635E38
Input is 18 bytes long
SMS is 12 octets long
Sending
Message sent: 0x65 / 0x000a
41 54 2b 43 4d 47 46 3d 30 0d | AT+CMGF=0
write: [AT+CMGF=0<cr>]
read : [AT+CMGF=0<cr><cr><lf>OK<cr><lf>]
Message received: 0x65 / 0x0010
02 41 54 2b 43 4d 47 46 3d 30 0d 0d 0a 4f 4b 0d | AT+CMGF=0 OK
Received message type 65
PDU mode set
Sending initial sequence
Message sent: 0x66 / 0x000b
41 54 2b 43 4d 47 53 3d 32 36 0d | AT+CMGS=26
write: [AT+CMGS=26<cr>]
read : [AT+CMGS=26<cr><cr><lf>> ]
Message received: 0x66 / 0x000f
01 41 54 2b 43 4d 47 53 3d 32 36 0d 0d 0a 3e | AT+CMGS=26 >
Received message type 66
Got response: No error.
Sending frame: 0891683110801505F011000B813127503531F50008AA0C59167F516D4B8BD56B635E38
Message sent: 0x21 / 0x0047
30 38 39 31 36 38 33 31 31 30 38 30 31 35 30 35 | 0891683110801505
46 30 31 31 30 30 30 42 38 31 33 31 32 37 35 30 | F011000B81312750
33 35 33 31 46 35 30 30 30 38 41 41 30 43 35 39 | 3531F50008AA0C59
31 36 37 46 35 31 36 44 34 42 38 42 44 35 36 42 | 167F516D4B8BD56B
36 33 35 45 33 38 1a | 635E38
write: [0891683110801505F011000B813127503531F50008AA0C59167F516D4B8BD56B635E38^Z]
read : [^A^491683110801505F011000B813127503531F50008AA0C59167F516D4B8BD56B635E38^Z<cr><lf>+CMS ERROR: 500<cr><lf>]
Message received: 0x21 / 0x005a
04 01 f4 39 31 36 38 33 31 31 30 38 30 31 35 30 | 9168311080150
35 46 30 31 31 30 30 30 42 38 31 33 31 32 37 35 | 5F011000B8131275
30 33 35 33 31 46 35 30 30 30 38 41 41 30 43 35 | 03531F50008AA0C5
39 31 36 37 46 35 31 36 44 34 42 38 42 44 35 36 | 9167F516D4B8BD56
42 36 33 35 45 33 38 1a 0d 0a 2b 43 4d 53 20 45 | B635E38 +CMS E
52 52 4f 52 3a 20 35 30 30 0d | RROR: 500
Received message type 21
SMS Send failed (Unknown error - well better than nothing!!)
Serial device: closing device
...全文
1129 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

1,025

社区成员

发帖
与我相关
我的任务
社区描述
Linux /Unix kernel支持不同的硬件体系,X86, ARM, MIPS, 等等
社区管理员
  • CPU和硬件区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧