- 浏览: 615552 次
- 性别:
- 来自: 厦门
文章分类
最新评论
-
咖啡舞者:
现在在厦门工作还好吧。
2013换工作记 -
huih1984:
工作8年,算起来楼主和我差不多岁数啊, ,本人现在干着没有合同 ...
2013换工作记 -
无心流泪wan:
乘法法则规定复数的乘法按照以下的法则进行:设z1=a+bi,z ...
帮朋友做的一笔试(友元 运算符重载) -
我叫营长1:
谢谢,很详细呢
SharedPreferences 的用法 -
javalinjx:
挺有意思的。哈哈
2013换工作记
转自:http://www.developershome.com/sms/cmgwCommand.asp
如果是搞MTK或是与AT模块有关的人,去上面的网址看看,一定会收获很多,MTK的AT文档其中有些错误,上面网页中讲的比较详细.
The AT command +CMGW (command name in text: Write Message to Memory) is used to write an SMS message to memory (i.e. message storage). The memory/message storage area to which SMS messages are written is specified by the +CPMS AT command (command line in text: Preferred Message Storage). Details about the +CPMS AT command can be found in the earlier section "Preferred Message Storage (AT+CPMS) " of this SMS tutorial.
23.1. Syntax of the +CMGW AT Command in SMS Text Mode
In SMS text mode, the syntax of the +CMGW AT command is: (Optional parameters are enclosed in square brackets.)
+CMGW[=address [,address_type [,message_status ]]]<CR>sms_message_body<Ctrl+z>
Before we discuss each of the parameters, let's see an example that gives you some idea of how an actual command line should look like:
AT+CMGW="+85291234567",145,"STO UNSENT"<CR> This is an example for illustrating the syntax of the +CMGW AT command in SMS text mode.<Ctrl+z>
The address Parameter
The first parameter of the +CMGW AT command, address , specifies the destination address to send the SMS message to. Usually it is a mobile number formatted using the typical ISDN / telephony numbering plan (ITU E.164/E.163). For example, "+85291234567" and "91234567". Note that the value passed to the address parameter should be a string, i.e. it should be enclosed in double quotes.
The address parameter is optional and so it can be omitted. Later when you want to send the SMS message out, you can specify the destination address by the +CMSS AT command (command name in text: Send Message from Storage).
The address_type Parameter
The second parameter of the +CMGW AT command, address_type , specifies the type of the address assigned to the address parameter. Two values are commonly used. They are 129 and 145:
-
129 . Meaning: The value of address is formatted using the typical ISDN / telephony numbering plan (ITU E.164/E.163) but it is not sure whether the value of address is an international number, a national number or a number of other types. Example addresses: "85291234567", "91234567".
-
145 . Meaning: The value of address is formatted using the typical ISDN / telephony numbering plan (ITU E.164/E.163) and it is an international number. Example address: "+85291234567".
As address_type is an optional parameter, it can be omitted. If you do so, the GSM/GPRS modem or mobile phone will use the default value of the address_type parameter, which is:
-
129 if the value of address does not start with a "+" character. For example, "85291234567".
-
145 if the value of address starts with a "+" character. For example, "+85291234567".
The message_status Parameter
The third parameter of the +CMGW AT command, message_status , specifies the status of the SMS message to be written. The SMS specification has defined four status values:
-
REC UNREAD . It refers to the message status "received unread".
-
REC READ . It refers to the message status "received read".
-
STO UNSENT . It refers to the message status "stored unsent". This is the default value.
-
STO SENT . It refers to the message status "stored sent".
Note that the value assigned to the message_status parameter should be a string. Thus, it should be enclosed in double quotes.
As message_status is an optional parameter, it can be omitted. If you do so, the GSM/GPRS modem or mobile phone will use the default value of the message_status parameter, which is "STO UNSENT".
The <CR> Character
<CR> , which represents the carriage return character, follows the message_status parameter. When the GSM/GPRS modem or mobile phone receives the carriage return character, it will send back a prompt formed by these four characters: the carriage return character, the linefeed character, the ">" character and the space character. If you don't understand what this means, don't worry. This should be clear to you when you see the example in the section "Example Demonstrating How to Use the +CMGW AT Command to Write SMS Text Messages to Message Storage in SMS Text Mode ".
The sms_message_body Parameter
The fourth parameter of the +CMGW AT command, sms_message_body , specifies the SMS message body to be written to the memory/message storage area. Entering the <Esc> character will cancel the +CMGW AT command. If you don't understand what this means, see the example in the section "Example Demonstrating How to Use the +CMGW AT Command to Write SMS Text Messages to Message Storage in SMS Text Mode ".
The <Ctrl+z> Character
When you finish entering the SMS message body, you have to enter the <Ctrl+z> character to mark the end of the SMS message body. The GSM/GPRS modem or mobile phone will then attempt to write the SMS message to the memory/message storage area.
23.2. SMSC Number Stored with the SMS Message (SMS Text Mode)
In SMS text mode, the +CMGW AT command does not have a parameter that allows you to specify an SMSC number. (Note that the +CMGW AT command does have such parameter when the GSM/GPRS modem or mobile phone is operating in SMS PDU mode.) However, when an SMS message is written to message storage, an SMSC number is actually stored with it. The SMSC number stored is the one specified by the +CSCA AT command (command name in text: Service Centre Address). Later if you send the SMS message, it will be transmitted through this SMSC. Once an SMS message has been written to message storage, it is not possible to change the SMSC number stored with the SMS message by using AT commands.
Note that it is possible that the command behavior on your mobile device is slightly different from what was described above.
More information about this issue is available in the "SMSC Number to be Used by the +CMSS AT Command to Send SMS Messages " section of this SMS tutorial.
23.3. Format of the Information Response of the +CMGW AT Command in SMS Text Mode
If the GSM/GPRS modem or mobile phone writes the SMS message to the message storage area successfully, it will return an information response to the computer / PC. In SMS text mode, the information response of the +CMGW AT command has the following format:
+CMGW: index
index is an integer that tells us the memory location to which the SMS message was written in the message storage area.
发表评论
-
自己的感想:如何在非纯软件公司做研发
2010-11-17 10:16 2257在这家公司挺多年的,公司是以硬件销售为主,也这个是 ... -
转 从我写程序那天起:我就没打算写程序
2010-08-31 16:23 1750序: 大约是前年的时 ... -
oracle自动备份脚本
2010-07-29 09:16 978具体参看附件 -
元宵节后上班
2010-03-01 16:23 1083在新岗位上工作一星期了,慢慢有点感觉了。今天早上经 ... -
Modem 安装指南.pdf
2009-10-16 08:13 1032MTK模块建立拔号上网的指南,有时可以用做检验模块GPRS拔号 ... -
是什么在阻碍移动公司电子渠道的发展
2009-09-28 18:01 1481如果从一个软件工程师的角度来分析这个问题,可能显得十分狭隘。但 ... -
嵌入式系统数据同步协议 SyncML 简介
2009-05-27 09:31 2212目前在嵌入式系 ... -
SubVersion服务器Windows安装指南
2009-05-18 16:32 2645SubVersion及TortoiseSVN下载 ... -
WinCVS 1.3.6.1简明操作指南
2009-05-18 13:59 2754作者:陈先波 邮件:turbochen@163.com ... -
MTK之LCD亮度调整测试代码块
2009-05-14 15:05 2773前一段的东西做完了准备要提交测试了,这次是第二版本 ... -
MTK打印之:定时器设计两式比较
2009-05-13 20:49 2266MTK打印之:定时器设计 ... -
如何使用Outlook Express拒收邮件
2009-05-13 15:07 1677我们公司有上bu ... -
使用StarUML建模
2009-05-09 15:40 4338http://javasso.cn/2009/04/29/%E ... -
MTK电话本短信同步
2009-04-27 20:03 3533做MTK开发也有一段时间,最近做一个产品,其中有一个测试功能, ... -
串口通讯的python模块——pySerial
2009-04-27 19:42 9118pySerial Overview This modu ... -
设计模式趣解
2009-04-24 08:32 10871、FACTORY-工厂模式:追MM少不了请吃饭了,麦当劳的 ... -
我对acts as tree的理解及应用
2007-04-30 17:13 2876最近在看敏捷一书,把我对Acts as tree一节的理解写下 ...
相关推荐
orcl安装参数
1 -> enable writing to data memory, 0 -> disable writing to data memory - Address for read/write operand (A -> n_bits_address bits = 32 bits) - Write Data for write operand (WD -> data_mem_width...
《深入理解计算机系统》(CSAPP)是一门深入探索计算机硬件与软件交互的课程,而实验5的主题是“Writing a Dynamic Storage Allocator”,即编写一个动态存储分配器。这个实验旨在帮助学生理解内存管理机制,特别是...
本文是一本关于从调查研究到学术写作的英文写作教程,书名为《From Inquiry to Academic Writing - A text and reader》第二版。这本书由Stuart Greene和April Lidinsky联合撰写,他们分别来自圣母大学和印第安纳...
基于kaggle赛题Linking Writing Processes to Writing Quality的源代码。 在写作过程中,很难总结出一系列复杂的行为和认知活动。作者可能会使用不同的技巧来计划和修改他们的作品,展示不同的停顿模式,或者在写作...
The analysis of big data at exascale (1018 bytes or flops) has introduced the emerging need to reexamine the existing hardware platform that can support intensive dataoriented ...writing/erasing cycles
From Hacking to Report Writing An Introduction to Security and Penetration Testing 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
Jean Wyrick's rhetorically organized STEPS TO WRITING WELL WITH ADDITIONAL READINGS is known for its student-friendly tone and the clear way it presents the basics of essay writing in an easy-to-...
From Hacking to Report Writing An Introduction to Security and Penetration Testing 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传...
Explorer扩展编程的指导资料,包括一个chm教程以及其对应的源代码。 Part I - A step-by-step ...Part V - A tutorial on writing a shell extension that adds pages to the properties dialog of files ......
A Framework for Authorship Identification of Online Messages Writing-Style Features and Classification Techniques
It is a book for everybody who wants to learn how to write or who needs to do some writing to get through the day, as almost everybody does in the age of e-mail and the Internet. Whether you want to ...
-> writing /Users/fukamachi/Programs/lib/cl-sample/.gitignore ; writing /Users/fukamachi/Programs/lib/cl-sample/README.markdown ; writing /Users/fukamachi/Programs/lib/cl-sample/cl-sample-test.asd ; ...
标题中的“Memo Writing _memory_memo_”暗示了这是一个关于编写内存管理备忘录的教程,主要面向Windows平台的开发者。在Windows开发中,理解内存管理和优化是至关重要的,因为这直接影响到应用程序的性能、稳定性和...
《A helpful guide to essay writing》是一份涵盖了撰写论文所需知识的指南,它融合了多份出版物的材料,为学生提供了一个关于如何写作论文的全面指导。这份指南分为两个主要部分,第一部分关注的是结构与组织,第二...
内容翔实,可有效提高英语专业表达能力和写作水平。
On Writing Well 英文写作圣经。 On Writing Well is a craft book. That's what I set out to write 25 years ago—a book that would teach the craft of writing warmly and clearly—and its principles have ...
前言 最近这两天登陆服务器,发现用 wget 下载文件的时候提示“No space left on device”,而且连使用 tab 键进行补全时也会提示该错误。 之前遇到过一次这种问题,是由于磁盘空间被占满了,导致无法创建新文件。...