无法使用AT + CMGL ="ALL"读取消息

use*_*858 3 at-command

我正在使用AT命令编程调制解调器.当我执行时AT+CMGL="ALL",有时它不返回任何东西.在其他时候,它返回消息列表.

你能告诉我为什么吗?

hlo*_*dal 8

这取决于手机是配置为PDU模式还是文本模式.该27.005标准说:

<stat> integer type in PDU mode (default 0), or string type in text mode (default
"REC UNREAD"); indicates the status of message in memory; defined values:
       0 "REC UNREAD"   received unread message (i.e. new message)
       1 "REC READ"     received read message
       2 "STO UNSENT"   stored unsent message (only applicable to SMs)
       3 "STO SENT"     stored sent message (only applicable to SMs)
       4 "ALL"          all messages (only applicable to +CMGL command)
Run Code Online (Sandbox Code Playgroud)

所以你应该跑

AT+CMGF=1
AT+CMGL="ALL"
Run Code Online (Sandbox Code Playgroud)

(也可能AT+CPMS是肯定的,你是从读存储(请注意,你可能需要同时指定<mem1><mem2))