AT指令详解:操作指南与实例

需积分: 10 4 下载量 168 浏览量 更新于2024-07-29 收藏 176KB PDF 举报
"本文主要介绍了AT指令集的基本概念和常用的操作实例,包括检测连接、查询网络信号、恢复出厂设置、查询模块版本、修改串口波特率、保存设置以及拨打电话等基本功能。" AT指令集是Modem或其他通信设备使用的标准命令集,用于配置和控制这些设备。这些命令通常通过串行接口发送,以ASCII码的形式,以“AT”开头,后面跟着特定的参数或命令代码。在中文环境中,理解并使用这些指令对于进行通信设备的调试和配置至关重要。 1. AT指令:这是最基础的命令,用于检查模块是否能正常接收AT命令。当返回“OK”时,表示与串口通信正常。 2. AT+CSQ:该命令用于检查网络信号强度和SIM卡状态。返回值+CSQ:**,##中,**表示信号质量,数值范围10到31,数值越大表示信号越好;##通常为99,表示SIM卡状态。如果返回异常,可能需要检查天线或SIM卡安装。 3. ATZ:这个命令用于将模块设置恢复到出厂默认状态,清除所有用户配置。 4. AT+CGMR:查询模块的固件版本。返回的结果如“R4A021CXC1122528”代表了模块的具体版本信息。 5. AT+IPR:修改串口1的波特率。例如,设置波特率为19200,需执行AT+IPR=19200,并确保串口调试工具的波特率与之匹配,否则模块不会响应。 6. AT&W:保存当前的模块设置。如果保存成功,返回“OK”,否则返回“ERROR”。 7. ATD:拨打电话的命令,格式为ATD<电话号码>;<CR>。返回“OK”表示拨号成功,其他返回值如NODIALTONE或NOCARRIER可能表示拨号失败或硬件问题。 8. RING:当有电话呼入时,设备会发出RING响应,表示有来电。 9. ATA:用于接听电话,当收到RING提示后,发送ATA命令可以模拟手动摘机接听。 以上是AT指令集的一些基本操作和实例,它们是通信设备配置和调试的基础。理解并熟练使用这些命令,可以帮助用户更好地管理和维护通信设备,特别是在开发和维护无线通信解决方案时。
2010-03-28 上传
目录 前言 AT 命令概述...........................................................................................................................................4 AT 命令详细说明.....................................................................................................................................4 1. 一般命令............................................................................................................................................5 1.1 AT+CGMI......................................................................................................5 1.2 AT+CGMM ....................................................................................................5 1.3 AT+CGMR.....................................................................................................5 1.4 AT+CGSN.....................................................................................................5 1.5 AT+CSCS......................................................................................................6 1.6 AT+CLVL ......................................................................................................6 1.7 AT+VTD .......................................................................................................6 2. 呼叫控制命令......................................................................................................................................7 2.1 ATD .............................................................................................................7 2.2 ATA..............................................................................................................7 2.3 ATH .............................................................................................................8 2.4 AT+VTS........................................................................................................8 2.5 ATS0............................................................................................................8 3. 网络服务相关命令................................................................................................................................9 3.1 AT+CNUM.....................................................................................................9 3.2 AT+CSQ.......................................................................................................9 4. 电话本命令.........................................................................................................................................9 4.1 AT+CPBS......................................................................................................9 4.2 AT+CPBR....................................................................................................10 4.3 AT+CPBW ...................................................................................................11 4.4 AT+CPBF....................................................................................................11 5. 短消息命令.......................................................................................................................................12 5.1 AT+CSMS ...................................................................................................13 5.2 AT+CPMS ...................................................................................................14 5.3 AT+CMGF ...................................................................................................15 5.4 AT+CSCA....................................................................................................15 5.5 AT+CSCB....................................................................................................16 5.6 AT+CNMI....................................................................................................16 5.7 AT+CMGL ...................................................................................................18 5.8 AT+CMGR...................................................................................................18 5.9 AT+CMGS...................................................................................................19 5.10 AT+CMSS .................................................................................................19 5.11 AT+CMGW ................................................................................................20 5.12 AT+CMGD.................................................................................................20 6. 自定义命令 6.1 AT+ON....................................................................................................... 6.2 AT+OFF...................................................................................................... 6.3 AT+LSD...................................................................................................... 6.4 AT+CMPVL.................................................................................................. 6.5 AT+LED................................................................................................... 3 页 共 3 页 7. 开发示例...............................................................................................................................