问题
I have a USB-Modem Manufacturer:Huawei Model:E3531. On the computer, the Gammu version 1.38.3 and Gammu-smsd version 1.38.3. installed.
lsusb:
Bus 001 Device 011: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem
Gammu-Config:
[gammu]
port = /dev/ttyUSB0
model = E3531
connection = at19200
synchronizetime = yes
logfile = /var/log/gammu.log
logformat = errorsdate
use_locking =
gammuloc =
I cannot receive sms the command gammu getallsms
show me this output:
0 SMS parts in 0 SMS sequences
Output from Log:
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]
What is the reason and how can i resolve this Problem
Thaks for helps :)
回答1:
add this line to your .gammu file to gammu section
atgen_setCNMI=2,0,0,2,1
With it i am able to get SMS from E3531
回答2:
Try specifying model = E3131
in the configuration, that might help...
回答3:
I know this is not a proper answer regarding gammu
. However if you know how to program with python, you can use python-gsmmodem. They have a really nice example that work like a charm with E3531 (it was really driving me nuts, I spent the whole day trying to get a server working).
回答4:
Huawei stopped supporting old serialport AT commands for reading out received SMS. Better to switch to the REST based communication protocols more or less explained here: Sending and receiving SMS by command line with Huawei E3131 and HiLink on a debian system.
来源:https://stackoverflow.com/questions/44331447/gammu-can-not-receive-sms