AT command set

This chapter will specifically describe how to use various AT commands.

It is strongly recommended to read the following content before using the command to understand some basic information about the AT command.

AT command classification

There are four types of generic AT commands:

Type

Command format

Instructions

Test command

AT+<command name>=?

Query the internal parameters of the setting command and its value range

query command

AT+<command name>?

Returns the current parameter value

Set Command

AT+<command name>=<…>

Set user-defined parameter values and run commands

Execute command

AT+<command name>

Run commands without user-defined parameters

  • Not every AT command has the above four types of commands.

  • Enter parameters in the command. Currently, only string parameters and shaping number parameters are supported.

  • Parameters in angle brackets <> cannot be omitted.

  • The parameters in square brackets [] can be omitted, and the default value is used when omitted. For example, some parameters are omitted when running the AT + WJAP command:

    AT+WJAP="ssid","password"
    AT+WJAP="ssid","password","11:22:33:44:55:66"
    
  • When there are still parameters to fill in after the omitted parameters, you must use ,,to show the separation. For example:

    AT+CWJAP="ssid","password",,1
    
  • Use double quotation marks to represent string parameters, For example:

    AT+CWSAP="ESP756290","21030826",1,4
    
  • Special characters need to be escaped, such as ,"\ and so on.

    • \\:Escape backslash.

    • \,:Escape commas, commas separating parameters do not need to be escaped.

    • \":Escape double quotation marks, double quotation marks that indicate string parameters do not need to be escaped.

    • \<any>:escape the <any> character, that is, only the <any> character is used, and no backslash is used.

  • Only special characters in the AT command need to be escaped, and no escape is required elsewhere. For example, when the AT command port print > waits for input data, the data does not need to be escaped.

    AT+WJAP="comma\,backslash\\ssid","1234567890"
    AT+MQTTPUB=0,"topic","\"{\"sensor\":012}\"",1,0
    
  • The default baud rate for the-AT command is 115200。

  • The length of each AT command should not exceed 256 bytes.

  • AT command ends with a new line (CR-LF), so the serial port tool should be set to “new line mode”.

  • For the definition of AT command error code, please see Response error code