Gammu无法接收短信

时间:2017-06-02 14:33:37

标签: centos sms huawei gammu

我有USB调制解调器制造商:华为型号:E3531。在计算机上,Gammu版本1.38.3和Gammu-smsd版本1.38.3。安装。

的lsusb:

Bus 001 Device 011: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem

监务-配置:

[gammu]
port = /dev/ttyUSB0
model = E3531
connection = at19200
synchronizetime = yes
logfile = /var/log/gammu.log
logformat = errorsdate
use_locking =
gammuloc =

我无法接收短信命令gammu getallsms告诉我这个输出:

0 SMS parts in 0 SMS sequences

日志输出:

Fri 2017/06/02 16:26:45: 1 "AT+CGMM"
Fri 2017/06/02 16:26:45: 2 "E3531"
Fri 2017/06/02 16:26:45: 3 "OK"
Fri 2017/06/02 16:26:45: Checking line: OK
Fri 2017/06/02 16:26:45: AT reply state: 1
Fri 2017/06/02 16:26:45: Unknown model, but it should still work
Fri 2017/06/02 16:26:45: [Model name: `E3531']
Fri 2017/06/02 16:26:45: [Model data: `']
Fri 2017/06/02 16:26:45: [Model data: `unknown']
Fri 2017/06/02 16:26:45: 1 "AT+CGMI"
Fri 2017/06/02 16:26:45: 2 "huawei"
Fri 2017/06/02 16:26:45: 3 "OK"
Fri 2017/06/02 16:26:45: Checking line: OK
Fri 2017/06/02 16:26:45: AT reply state: 1
Fri 2017/06/02 16:26:45: Manufacturer info received
Fri 2017/06/02 16:26:45: [Manufacturer: Huawei]
Fri 2017/06/02 16:26:45: Checking for OBEX support
Fri 2017/06/02 16:26:45: 1 "AT+CPROT=?"
Fri 2017/06/02 16:26:45: 2 "ERROR"
Fri 2017/06/02 16:26:45: Checking line: ERROR
Fri 2017/06/02 16:26:45: AT reply state: 3
Fri 2017/06/02 16:26:45: Checking for SYNCML/OBEX support
Fri 2017/06/02 16:26:45: 1 "AT+SYNCML=?"
Fri 2017/06/02 16:26:45: 2 "ERROR"
Fri 2017/06/02 16:26:45: Checking line: ERROR
Fri 2017/06/02 16:26:45: AT reply state: 3
Fri 2017/06/02 16:26:45: 1 "AT$TSSPCSW=?"
Fri 2017/06/02 16:26:45: 2 "ERROR"
Fri 2017/06/02 16:26:45: Checking line: ERROR
Fri 2017/06/02 16:26:45: AT reply state: 3
Fri 2017/06/02 16:26:45: [Module           - "A2D|iPAQ|at|M20|S25|MC35|TC35|C35i|S65|S300|5110|5130|5190|5210|6110|6130|6150|6190|6210|6250|6310|6310i|6510|7110|8210|8250|8290|8310|8390|8850|8855|8890|8910|9110|9210"]
Fri 2017/06/02 16:26:45: Escaping SMS mode
Fri 2017/06/02 16:26:45: Sending simple AT command to wake up some devices
Fri 2017/06/02 16:26:45: 1 "AT"
Fri 2017/06/02 16:26:45: 2 "OK"
Fri 2017/06/02 16:26:45: Checking line: OK
Fri 2017/06/02 16:26:45: AT reply state: 1
Fri 2017/06/02 16:26:45: Enabling echo
Fri 2017/06/02 16:26:45: 1 "ATE1"
Fri 2017/06/02 16:26:45: 2 "OK"
Fri 2017/06/02 16:26:45: Checking line: OK
Fri 2017/06/02 16:26:45: AT reply state: 1
Fri 2017/06/02 16:26:45: Trying Motorola mode switch
Fri 2017/06/02 16:26:45: 1 "AT+MODE=2"
Fri 2017/06/02 16:26:45: 2 "ERROR"
Fri 2017/06/02 16:26:45: Checking line: ERROR
Fri 2017/06/02 16:26:45: AT reply state: 3
Fri 2017/06/02 16:26:45: Seems not to be supported
Fri 2017/06/02 16:26:45: Enabling CME errors
Fri 2017/06/02 16:26:45: 1 "AT+CMEE=1"
Fri 2017/06/02 16:26:45: 2 "OK"
Fri 2017/06/02 16:26:45: Checking line: OK
Fri 2017/06/02 16:26:45: AT reply state: 1
Fri 2017/06/02 16:26:45: 1 "AT+CSCS?"
Fri 2017/06/02 16:26:45: 2 "+CSCS: "GSM""
Fri 2017/06/02 16:26:45: 3 "OK"
Fri 2017/06/02 16:26:45: Checking line: OK
Fri 2017/06/02 16:26:45: AT reply state: 1
Fri 2017/06/02 16:26:45: 1 "AT+CSCS=?"
Fri 2017/06/02 16:26:45: 2 "+CSCS: ("IRA","UCS2","GSM")"
Fri 2017/06/02 16:26:45: 3 "OK"
Fri 2017/06/02 16:26:45: Checking line: OK
Fri 2017/06/02 16:26:45: AT reply state: 1
Fri 2017/06/02 16:26:45: Chosen GSM as normal charset
Fri 2017/06/02 16:26:45: Chosen UCS2 as unicode charset
Fri 2017/06/02 16:26:45: 1 "AT+CGMI"
Fri 2017/06/02 16:26:45: 2 "huawei"
Fri 2017/06/02 16:26:45: 3 "OK"
Fri 2017/06/02 16:26:45: Checking line: OK
Fri 2017/06/02 16:26:45: AT reply state: 1
Fri 2017/06/02 16:26:45: Manufacturer info received
Fri 2017/06/02 16:26:45: [Manufacturer: Huawei]
Fri 2017/06/02 16:26:45: Checking for OBEX support
Fri 2017/06/02 16:26:45: 1 "AT+CPROT=?"
Fri 2017/06/02 16:26:45: 2 "ERROR"
Fri 2017/06/02 16:26:45: Checking line: ERROR
Fri 2017/06/02 16:26:45: AT reply state: 3
Fri 2017/06/02 16:26:45: Checking for SYNCML/OBEX support
Fri 2017/06/02 16:26:45: 1 "AT+SYNCML=?"
Fri 2017/06/02 16:26:45: 2 "ERROR"
Fri 2017/06/02 16:26:45: Checking line: ERROR
Fri 2017/06/02 16:26:45: AT reply state: 3
Fri 2017/06/02 16:26:45: 1 "AT$TSSPCSW=?"
Fri 2017/06/02 16:26:45: 2 "ERROR"
Fri 2017/06/02 16:26:45: Checking line: ERROR
Fri 2017/06/02 16:26:45: AT reply state: 3
Fri 2017/06/02 16:26:45: Setting date & time
Fri 2017/06/02 16:26:45: 1 "AT+CCLK="17/06/02,16:26:45+01""
Fri 2017/06/02 16:26:45: 2 "ERROR"
Fri 2017/06/02 16:26:45: Checking line: ERROR
Fri 2017/06/02 16:26:45: AT reply state: 3
Fri 2017/06/02 16:26:45: Getting firmware versions
Fri 2017/06/02 16:26:45: 1 "AT+CGMR"
Fri 2017/06/02 16:26:45: 2 "22.521.23.00.00"
Fri 2017/06/02 16:26:45: 3 "OK"
Fri 2017/06/02 16:26:45: Checking line: OK
Fri 2017/06/02 16:26:45: AT reply state: 1
Fri 2017/06/02 16:26:45: Received firmware version: "22.521.23.00.00"
Fri 2017/06/02 16:26:45: Number version is "22.521230"
Fri 2017/06/02 16:26:45: [Connected]
Fri 2017/06/02 16:26:45: Entering GSM_GetSMSFolders
Fri 2017/06/02 16:26:45: Getting available SMS memories
Fri 2017/06/02 16:26:45: 1 "AT+CPMS=?"
Fri 2017/06/02 16:26:45: 2 "+CPMS: ("SM","ME"),("SM","ME"),("SM","ME")"
Fri 2017/06/02 16:26:45: 3 "OK"
Fri 2017/06/02 16:26:45: Checking line: OK
Fri 2017/06/02 16:26:45: AT reply state: 1
Fri 2017/06/02 16:26:45: Available SMS memories received: read: ME : ok, SM : ok, save: ME : ok, SM = ok, Motorola = no
Fri 2017/06/02 16:26:45: Setting SMS memory type to ME
Fri 2017/06/02 16:26:45: 1 "AT+CPMS="ME""
Fri 2017/06/02 16:26:45: 2 "+CPMS: 0,20,0,20,0,20"
Fri 2017/06/02 16:26:45: 3 "OK"
Fri 2017/06/02 16:26:45: Checking line: OK
Fri 2017/06/02 16:26:45: AT reply state: 1
Fri 2017/06/02 16:26:45: Leaving GSM_GetSMSFolders
Fri 2017/06/02 16:26:45: Entering GSM_GetNextSMS
Fri 2017/06/02 16:26:45: Starting reading!
Fri 2017/06/02 16:26:45: Number = 0, Location = 0, Folder = 0
Fri 2017/06/02 16:26:45: Trying SMS PDU mode
Fri 2017/06/02 16:26:45: 1 "AT+CMGF=0"
Fri 2017/06/02 16:26:45: 2 "OK"
Fri 2017/06/02 16:26:45: Checking line: OK
Fri 2017/06/02 16:26:45: AT reply state: 1
Fri 2017/06/02 16:26:45: Getting SIM SMS status
Fri 2017/06/02 16:26:45: 1 "AT+CPMS="SM","SM""
Fri 2017/06/02 16:26:45: 2 "+CPMS: 0,20,0,20,0,20"
Fri 2017/06/02 16:26:45: 3 "OK"
Fri 2017/06/02 16:26:45: Checking line: OK
Fri 2017/06/02 16:26:45: AT reply state: 1
Fri 2017/06/02 16:26:45: SMS status received
Fri 2017/06/02 16:26:45: Parsing +CPMS: 0,20,0,20,0,20 with +CPMS: @i, @i, @0
Fri 2017/06/02 16:26:45: Parsed int 0
Fri 2017/06/02 16:26:45: Parsed int 20
Fri 2017/06/02 16:26:45: Used : 0
Fri 2017/06/02 16:26:45: Size : 20
Fri 2017/06/02 16:26:45: Getting phone SMS status
Fri 2017/06/02 16:26:46: 1 "AT+CPMS="ME","ME""
Fri 2017/06/02 16:26:46: 2 "+CPMS: 0,20,0,20,0,20"
Fri 2017/06/02 16:26:46: 3 "OK"
Fri 2017/06/02 16:26:46: Checking line: OK
Fri 2017/06/02 16:26:46: AT reply state: 1
Fri 2017/06/02 16:26:46: SMS status received
Fri 2017/06/02 16:26:46: Parsing +CPMS: 0,20,0,20,0,20 with +CPMS: @i, @i, @0
Fri 2017/06/02 16:26:46: Parsed int 0
Fri 2017/06/02 16:26:46: Parsed int 20
Fri 2017/06/02 16:26:46: Used : 0
Fri 2017/06/02 16:26:46: Size : 20
Fri 2017/06/02 16:26:46: Setting SMS memory type to SM
Fri 2017/06/02 16:26:46: 1 "AT+CPMS="SM""
Fri 2017/06/02 16:26:46: 2 "+CPMS: 0,20,0,20,0,20"
Fri 2017/06/02 16:26:46: 3 "OK"
Fri 2017/06/02 16:26:46: Checking line: OK
Fri 2017/06/02 16:26:46: AT reply state: 1
Fri 2017/06/02 16:26:46: Getting SMS locations
Fri 2017/06/02 16:26:46: 1 "AT+CMGL=4"
Fri 2017/06/02 16:26:46: 2 "OK"
Fri 2017/06/02 16:26:46: Checking line: OK
Fri 2017/06/02 16:26:46: AT reply state: 1
Fri 2017/06/02 16:26:46: SMS listing received
Fri 2017/06/02 16:26:46: Read 0 SMS locations
Fri 2017/06/02 16:26:46: Cache status: Found: 0, count: 0
Fri 2017/06/02 16:26:46: Getting SIM SMS status
Fri 2017/06/02 16:26:46: 1 "AT+CPMS="SM","SM""
Fri 2017/06/02 16:26:46: 2 "+CPMS: 0,20,0,20,0,20"
Fri 2017/06/02 16:26:46: 3 "OK"
Fri 2017/06/02 16:26:46: Checking line: OK
Fri 2017/06/02 16:26:46: AT reply state: 1
Fri 2017/06/02 16:26:46: SMS status received
Fri 2017/06/02 16:26:46: Parsing +CPMS: 0,20,0,20,0,20 with +CPMS: @i, @i, @0
Fri 2017/06/02 16:26:46: Parsed int 0
Fri 2017/06/02 16:26:46: Parsed int 20
Fri 2017/06/02 16:26:46: Used : 0
Fri 2017/06/02 16:26:46: Size : 20
Fri 2017/06/02 16:26:46: Getting phone SMS status
Fri 2017/06/02 16:26:46: 1 "AT+CPMS="ME","ME""
Fri 2017/06/02 16:26:46: 2 "+CPMS: 0,20,0,20,0,20"
Fri 2017/06/02 16:26:46: 3 "OK"
Fri 2017/06/02 16:26:46: Checking line: OK
Fri 2017/06/02 16:26:46: AT reply state: 1
Fri 2017/06/02 16:26:46: SMS status received
Fri 2017/06/02 16:26:46: Parsing +CPMS: 0,20,0,20,0,20 with +CPMS: @i, @i, @0
Fri 2017/06/02 16:26:46: Parsed int 0
Fri 2017/06/02 16:26:46: Parsed int 20
Fri 2017/06/02 16:26:46: Used : 0
Fri 2017/06/02 16:26:46: Size : 20
Fri 2017/06/02 16:26:46: Getting SMS locations
Fri 2017/06/02 16:26:47: 1 "AT+CMGL=4"
Fri 2017/06/02 16:26:47: 2 "OK"
Fri 2017/06/02 16:26:47: Checking line: OK
Fri 2017/06/02 16:26:47: AT reply state: 1
Fri 2017/06/02 16:26:47: SMS listing received
Fri 2017/06/02 16:26:47: Read 0 SMS locations
Fri 2017/06/02 16:26:47: GSM_GetNextSMS failed with error EMPTY[22]: Entry is empty.
Fri 2017/06/02 16:26:47: Leaving GSM_GetNextSMS
Fri 2017/06/02 16:26:47: [Terminating]
Fri 2017/06/02 16:26:47: [Closing]

是什么原因以及如何解决此问题

获取帮助:)

4 个答案:

答案 0 :(得分:1)

将此行添加到您的.gammu文件中的gammu部分

atgen_setCNMI=2,0,0,2,1

有了它,我就能从E3531接收短信

答案 1 :(得分:0)

尝试在配置中指定model = E3131,这可能会有所帮助......

答案 2 :(得分:0)

我知道这不是关于gammu的正确答案。但是,如果您知道如何使用python编程,则可以使用python-gsmmodem。他们有一个非常nice example的工作就像E3531的魅力(它真的让我疯了,我花了一整天努力让服务器工作)。

答案 3 :(得分:0)

华为停止支持旧的串口AT命令以读取收到的短信。最好在这里或多或少地解释基于REST的通信协议:Sending and receiving SMS by command line with Huawei E3131 and HiLink on a debian system