3

我有一个 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 配置:

[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

4 回答 4

1

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

atgen_setCNMI=2,0,0,2,1

有了它,我可以从 E3531 收到短信

于 2019-02-27T09:54:42.740 回答
0

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

于 2017-06-02T17:38:57.940 回答
0

华为不再支持旧的串口 AT 命令读取收到的短信。最好切换到基于 REST 的通信协议或多或少在这里解释:在 debian 系统上使用华为 E3131 和 HiLink 通过命令行发送和接收短信

于 2018-01-17T21:28:40.743 回答
0

我知道这不是关于gammu. 但是,如果您知道如何使用 python 编程,则可以使用python-gsmmodem. 他们有一个非常好的例子,它就像 E3531 的魅力一样(它真的让我发疯,我花了一整天的时间试图让服务器正常工作)。

于 2017-11-02T20:41:09.817 回答