
Changsha Sinocare Inc.
Page (10) of (42)
Start mark of the command Command code Parameter list End mark of the command
Start mark of the command: AT+
These three consecutive characters are used to indicate the beginning of a command packet.
Command code
It is the specific identification of the command, and is used to distinguish different commands.
a) Characters irrelevant to the command code are not allowed to appear between the characters of
the command code;
b) Spaces or other characters irrelevant to the command code are not allowed to appear between
the start mark of the command and the command code.
Parameter list
Different commands have different parameters. The parameters of the command need to be
separated by spaces. The command code and the parameter list also need to be separated by
spaces.
a) Except for the command code with special requirements or instructions (for example, “=” must
be used between the setName parameter list and the command code), the command code and the
parameter list must be separated by a space;
b) For the multi-parameter command code, the parameters must be separated by a space (such as
setConnlnt);
c) Unless there are special requirements or instructions (such as setName) for the single-parameter
command code, no spaces or characters irrelevant to the parameter are allowed to appear in the
parameter.
End mark of the command: \r\n
Two characters (Enter, line break) are used to indicate the end of a command packet.
If the command code is a setting type (setXXXX) command, the command end mark must closely
follow the parameter list, and no characters irrelevant to the parameter are allowed to appear
between the command end mark and the parameter list;
If the command code is a getting type (getXXXX) command, the command end mark must closely
follow the command code.
Example: Set the baud rate of the module to be 9600: “AT+setBR 9600\r\n”
Wherein, “AT+” is the start mark of the command;
“SetBR” is the command code, which indicates the operation of switching the baud rate;
“9600” is a parameter, which indicates that the baud rate for the serial port of the
module is set to be 9600bps;
“\r\n” is the end mark of the command.
7.2 Restrictions
(1) A complete command shall be sent to the module continuously. If the command cannot be sent
continuously and becomes multiple packets to be sent to the module, the data interval between
packets must be less than 80ms and the total frame reception time shall be less than 500ms. If the
total frame reception time expires, the received data is transparently transmitted;