我正在使用AT命令编程调制解调器。当我执行AT+CMGL="ALL"
时,有时它不会返回任何内容。在其他时候,它返回消息列表。
你能告诉我为什么吗?
答案 0 :(得分: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)
所以你应该运行
AT+CMGF=1
AT+CMGL="ALL"
(也可能AT+CPMS
确定您正在阅读哪个存储空间(notice您可能希望同时指定<mem1>
和<mem2
))