AT^SYSINFO and a C++ terminal program

前端 未结 1 2021
没有蜡笔的小新
没有蜡笔的小新 2020-11-29 14:13

I have written a program that comminucates serially with a USB 3g Modem. When I open the port and write the AT command

AT

To the modem, I g

相关标签:
1条回答
  • You MUST terminate an AT command line with \r and nothing else (unless you have modified ATS3, but you should not)1. To quote the V.250 specification:

    5.2.1   Command line general format
    
    A command line is made up of three elements: the prefix, the body, and
    the termination character. The command line prefix consists of the
    characters "AT" or "at", or, to repeat the execution of the previous
    command line, the characters "A/" or "a/". The body is made up of
    individual commands as specified later in this Recommendation. Space
    characters are ignored and may be used freely for formatting purposes,
    unless they are embedded in numeric or string constants (see 5.4.2.1
    or 5.4.2.2). The termination character may not appear in the body. The
    DCE shall be capable of accepting at least 40 characters in the body.
    The termination character may be selected by a user option (parameter S3),
    the default being CR (ASCII value 13).
    

    DCE means modem.

    (I removed the IA5 references in the quote above as that is only confusing)


    1 Terminating with \r\n will usually work, but that is only because of the 125ms abort timeout delay that makes the extra \n not abort the command.

    0 讨论(0)
提交回复
热议问题