MS: Mobile Station
SC: Service Centre (used for SMS)
SR:Status Report Message storage
<!--[if !supportLists]-->1) <!--[endif]-->SMS-DELIVER
<!--[if !supportLists]-->2) <!--[endif]-->SMS-DELIVER-REPORT
<!--[if !supportLists]-->3) <!--[endif]-->SMS-SUBMIT
<!--[if !supportLists]-->4) <!--[endif]-->SMS-SUBMIT-REPORT,
<!--[if !supportLists]-->5) <!--[endif]-->SMS-STATUS-REPORT
<!--[if !supportLists]-->6) <!--[endif]-->SMS-COMMAND
<!--[if !supportLists]-->1) <!--[endif]-->AT+CNMI=2,1,0,1,1
<!--[if !supportLists]-->2) <!--[endif]-->AT+CMGF=0
<!--[if !supportLists]-->3) <!--[endif]-->AT+CSCS=”UCS2”
八位元
|
描述
|
00
|
SMSC长度,此处为零,表示不含短消息中心号码
|
06
|
First octet字节,即00000110B,表示这是一个status report
|
08
|
引用消息号码,就是使用AT+CMGS发送短信成功时返回的那个+CMGS值,可以一一对应检索状态
|
0D91683158136777F7
|
对应短信接受方手机号码 13853167777
|
60207041653000
|
SMSC接收到所发送短信的时间
|
60207041653000
|
SMSC处理并给出状态的时间
|
00
|
对应发送短信的状态,00表示成功
|
<!--[if !supportLists]-->1) <!--[endif]-->AT+CNMI=2,1,0,2,1
<!--[if !supportLists]-->2) <!--[endif]-->AT+CPMS=”SR”,”SM”
<!--[if !supportLists]-->3) <!--[endif]-->… …
switch(getMaskByte(pDst->TP_FIRSTOCT, FOD_TP_MTI))
case SMS_STATUS_REPORT:
gsmString2Bytes(pCloneSrc, &tmp, 2); //TP-Message-Reference
pDst->TP_MR = tmp;
pCloneSrc += 2; // 指针后移
gsmString2Bytes(pCloneSrc, &tmp, 2); // 取长度
if(tmp & 1) tmp += 1; // 调整奇偶性
pCloneSrc += 4; // 指针后移,忽略了回复地址(TP-RA)格式
gsmSerializeNumbers(pCloneSrc, pDst->TPA, tmp); // 取TP-RA号码
pCloneSrc += tmp; // 指针后移
gsmSerializeNumbers(pCloneSrc, pDst->TP_SCTS, 14); // 服务时间戳字符串(TP_SCTS)
pCloneSrc += 14; // 指针后移
gsmSerializeNumbers(pCloneSrc, pDst->TP_DT, 14); // 处理时间戳字符串(TP_DT)
pCloneSrc += 14; // 指针后移
gsmString2Bytes(pCloneSrc, &tmp, 2); // TP-Status
pDst->TP_ST = tmp;
break;
case SMS_DELIVER:
default:
… …
更多技术文章请参看施昌权的个人网站: http://www.joyvc.cn