AT_Command学习
来源:互联网 发布:国内数据交易平台 编辑:程序博客网 时间:2024/05/18 01:01
AT Command
AT Command是Hayes开发的, 一般用在手机设备上, 用来给一些modem来发送指令来实现特别的功能.
AT Command所有的指令都是以AT开头
使用方法:
数据线连接上手机后,打开Windows附件里的的超级终端,选好通讯口,拨特率115200,流控制选无然后就可以使用AT指令了
有两种类型的AT Command:
1. Basic AT Commands
指令不是以+在AT后面开头
For example, ATD, ATA, ATH( 都是跟电话有关的指令)
2. Extended AT Commands
a) Commands that starts with ‘+’, ‘$’, etc.
b) Example: AT+CMGS, AT+CMGR, AT+CGMM etc
带参数的AT Commands有3种类型:
1. Read, 用来读取一个parameter的值
AT+<Command>?
例如:AT+CREG?
2. Write
AT+<Command>=<value>
例如:AT+W32K=1
3. Test
AT+<Command>=?(To determine the range of values supported)
Example:AT+CREG=?
返回值:+CREG: (0-2)(Response for the AT Command)
AT Command的返回值有3种类型:
o Terminal Responses(终端返回值)
o Final response of the command.(最终的结果)
o Indicates the success or failure of the command that is executed.(反映了是成功还是失败)
o Ex: OK, +CMS ERROR:<error_no>, +CME ERROR:<error_no>
o Unsolicited Responses(主动提供的返回值)
o Not related to the execution of any command.(跟我们输入的指令无关)
o Indicates occurrences of events like network registration, new SMS and incoming call.(反映了突然的事件,例如新的短消息, 新电话…)
o All AT commands end with a Terminal response. Unsolicited responses will be queued between command entry and associated terminal response
所有的AT Commands都必须以Terminal Responses结尾, Unsolicited Responses跟Terminal Responses无关, 随着新的突然事件反映在终端上.
o Intermediate Responses(中间返回值)
o Indicates the progress of the execution of command.(反映了命令执行的过程)
o Ex: Reception of “>” prompt when AT+CMGS command is executed.
如果要查询AT Command, 可以查询相应的文档。
(我有放在我的下载资源列表里面, 可以下载的到。AT命令手册(中文).pdf)
下面列出来常用的AT Command
• AT – Ping the modem
• ATD – Dial a number, can be either data call or voice call
• AT+CMGS – Send a SMS
• AT+CMGR, AT+CMGL – Read stored SMS
• ATI – Read the software revision used
• AT+CGMM – Current hardware version used
• ATE – Turn ON/OFF echo
- AT_Command学习
- 学习
- 学习
- 学习
- 学习
- 学习
- 学习
- 学习
- 学习
- 学习
- 学习
- 学习
- 学习
- 学习
- 学习
- 学习
- 学习
- 学习
- 虚拟机器启动的配置文件例子
- JET学习笔记(二)
- 不相信自己的意志,永远也做不成将军。
- IE8浏览器文本框突然变小的解决办法
- 如何让你的Android显示gif格式的图片
- AT_Command学习
- 一些概念
- 小木棍
- Struts2与Struts1的对比
- ERP系统2011.7.14日更新记录
- 以某种格式重命名目录下所有文件(ruby实现)
- linux使用技巧
- Java高亮显示被选中文本:StyledDocument.setCharacterAttributes()
- 一个项目经理的经验总结