找回密码
 注册
搜索
查看: 1853|回复: 6

大家好,我现在正学习协议栈,其中有个AT命令,大家能不能给解释一下AT命令到底干什

[复制链接]
发表于 2007-9-16 20:39:25 | 显示全部楼层 |阅读模式
大家好,我是菜鸟,我现在正学习协议栈,其中有个AT命令,大家能不能给解释一下AT命令到底干什么用,在测试的时候怎么测试?谢谢
发表于 2007-9-17 18:35:46 | 显示全部楼层
简单的说是个协议,主要用于跟终端进行通讯,一般是通过串口进行数据的交互。

底下是以前学习时总结和摘录的,作为参考:
1、TE TA  ME(CE): TE TA 之间的通信可以存在多种连接方式,并一般采用8bit的数据模式。<GSM0707-C1>

2、若参数省略,对于设置型的命令,则参数值等于前一次的值;对于动作型的命令,则参数等于默认设置的参数。<GSM0707-C3.2>

3、下划线的参数值,是该参数的推荐值。对于设置型参数,该值通过命令&F0进行出厂配置;对于动作型命令,该值为该参数的缺省值。<GSM0707-C3.2>

4、 命令从语法上可以分为:基本命令(Basic command)或扩展命令(extended command);
    从类型上可以分为: 设置型命令(parameter type command)或动作型命令(action type command)。

    Basic command:
        no + prefix; 均在ITU V.25ter中定义;

        The category 'basic AT Commands' look like this:
            - Basic AT Commands   (e.g. AT Cn)
            - & AT Commands       (e.g. AT &Cn)
            - % AT Commands       (e.g. AT %Cn)
            - \ AT Commands       (e.g. AT \Cn)
            etc.

            This set of commands has the following properties:
            - The command name is composed of only one alphabetic character
              between A and Z possibly preceded with a symbol.
            - The command may be followed with a parameter of zero to five
              numeric digits.  Negative values are not allowed.
            - Individual commands are not terminated on the command line.
              Another command may immediately follow the parameter of a
              previous command.

   Extened command:
        prefix with +; delimited with semicolon; GSM命令采用的均是扩展命令的格式;扩展命令均有测试命令(=?);设置型命令还存在
        读命令(?),动作型命令不存在该命令;
        特别指出:以+C为前缀的命令(属于扩展命令)都被保留用于数字蜂窝系统。<GSM0707-C1>

   命令行必须以AT打头;以<CR>结尾;<GSM0707-C1-C4.1>

            The category 'S Register Commands' look like this:

            These commands come in two flavors, the read command (e.g. AT Sr?)
            and the set command (e.g. AT Sr=n).

            This set of commands have the following properties:
            - The command name is composed of an 'S' followed by one to five
              numeric digits.
            - The command must be followed with either a '?' to denote a
              'read' command or a '=' to denote a 'set' command.
            - The read command may NOT be followed with a parameter.
            - The set command MUST be followed with a parameter of zero to
              five numeric digits.  Negative values are not allowed.
            - Individual commands are not terminated on the command line.
              Another command may immediately follow the parameter of a
              previous command.

       

5、verbose responses with command V1:
        命令行均成功执行,则返回: <CR><LF>OK<CR><LF>
        命令行执行中未被接受,则返回: <CR><LF>ERROR<CR><LF>; 并且命令行的后续命令不被执行;

   numeric responses with command V0:
        命令行均成功执行,则返回: 0<CR>
        命令行执行中未被接受,则返回: 4<CR>; 并且命令行的后续命令不被执行;
       
   ERROR (or 4) response may be replaced by +CME ERROR: <err> (refer clause 9) when command was not processed due to an error    related to ME operation.<GSM0707-C4.1>
       
6、 intermediate result codes:返回命令执行过程的信息,如链接的建立(connect);
    unsolicited result codes:用于告之某个事件的发生,如来电(ring);
    条目5中的返回属于final result codes。 <GSM0707-C4.2>

详细的可以参考:
规范:GSM0707/GSM0705/ITU-T(v.25)
点评回复

使用道具 举报

发表于 2007-9-30 16:54:38 | 显示全部楼层
就是数据终端跟数据设备间的一种通信机制
点评回复

使用道具 举报

发表于 2007-10-9 20:42:50 | 显示全部楼层
楼主讲的好详细啊
点评回复

使用道具 举报

发表于 2007-11-26 15:02:43 | 显示全部楼层
讲的很详细,但是有点涩
点评回复

使用道具 举报

发表于 2009-8-8 12:07:12 | 显示全部楼层
有相关资料吗?谢谢1
点评回复

使用道具 举报

发表于 2009-9-12 08:59:56 | 显示全部楼层
good topic and discussion!!
点评回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-3-28 19:48 , Processed in 0.052336 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表