短信服务相关的AT指令集

2018-12-22  本文已影响0人  QI的咖啡

1、AT+CPMS="MT"
设置短信存储载体,MT表示移动终端

2、AT+CPMS=?
显示当前存储载体设置
例:"MT",40,40,"MO",0,40
移动终端中可以存储40条,目前已经存了40条了

3、AT+CMGF=1 (0,1)
设置读取短信时的编码,1-Ascii编码 0-unicode编码

4、AT+CMGL=all
查询(这个是查询不是读取)设备中的短信条数,all-所有短信,0-未读短信,1-是已读短信

5、AT+CMGD=1,4
删除短信
1,0 The message from the preferred message storage at the location 1 is deleted
1,1 ALL READ messages from the preferred message storage are deleted
1,2 ALL READ messages and SENT mobile originated messages are deleted
1,3 ALL READ, SENT and UNSENT messages are deleted
1,4 ALL messages are deleted

6、AT+CMGR=0
读取短信内容,0表示第一条短信

上一篇下一篇

猜你喜欢

热点阅读