我正在使用 AT 命令对调制解调器进行编程。当我执行AT+CMGL="ALL"
时,有时它不会返回任何东西。在其他时候,它返回消息列表。
你能告诉我为什么吗?
这取决于电话是配置为 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)
所以你应该跑
AT+CMGF=1
AT+CMGL="ALL"
(可能还要AT+CPMS
确定您正在从哪个存储读取(请注意,您可能希望同时指定<mem1>
和<mem2
))