3

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

你能告诉我为什么吗?

4

1 回答 1

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确定您正在从哪个存储读取(请注意,您可能希望同时指定<mem1><mem2))

于 2013-04-01T15:53:06.840 回答