# Basic Command

#Command List

The basic command include three types: Execute Command, Query Command, and Set Command.

Num

Command

Function

1

AT (opens new window)

Test whether the AT is started.

2

AT+RST (opens new window)

Restare module.

3

AT+GMR (opens new window)

View version information.

4

AT+CMD (opens new window)

View AT instructions supported.

5

AT+SYSLOG (opens new window)

Enable or disable AT error code prompts.

6

AT+SYSMSG (opens new window)

Query/Set System Prompt Information.

7

AT+SYSSTORE (opens new window)

Set store mode of parameter.

8

AT+CIPMODE (opens new window)

The output format of network data on the serial port.

9

AT+RESTORE (opens new window)

Restore factory settings.

10

AT+UART_CUR (opens new window)

Configure the current temporary configuration of UART and do not save it to flash.

11

AT+UART_DEF (opens new window)

Configure the current temporary configuration of UART and save it to flash.

12

AT+UARTPACK (opens new window)

The packaging and processing method of serial port data.

#1. AT

Function: Test whether the AT is started.

Execute Command:

AT

Response:

OK

#2. AT+RST

Function:Restare module.

Execute Command:

AT+RST

Response:

OK

#3. AT+GMR

Function:View version information.

Query Command:

AT+GMR

Response:

<Firmware sn>

<Firmware crc>

<Driver version>

<Firmware info>

OK

Parameter:

  • Firmware sn: MXCHIP is a unique identifier used to control firmware, Defined in <at_ project>/CMakeLists.txt.

  • Firmware CRC: Real time calculated CRC of the Application partition in Flash.

  • Driver version: Driver version.

  • Firmware information: includes.

    • Name: Firmware name, such as "BLE AT", in<at_ Defined in project>/CMakeLists.txt.
    • Git commit: Git repository source code submission version information.
    • Version: Version, format is<major>< minor>, Defined in <at_ project>/CMakeLists.txt.

#4. AT+CMD

Function:View AT instructions supported.

Query Command:

AT+CMD

Response:

+CMD:<index>,<"name">[,<"EXE">,<"QUERY">,<"SET">]

OK

Parameter:

  • ndex: command number
  • name:command name.
  • EXE:support Execute Command
  • QUERY:support Query Command
  • SET:support Set Command,Always support testing instructions simultaneously.

#5. AT+SYSLOG

Function:Enable or disable AT error code prompts.

Query Command:

AT+SYSLOG?

Response:

+SYSLOG:<status>

OK

Parameter:

  • <status>:Error code prompt status

    • 0: Disabled
    • 1: Enable

Demo:

// Start AT error code pompts
AT+SYSLOG=1

OK
AT+FAKE
ERR CODE:0x01090000

ERROR

// Disable AT error code prompts
AT+SYSLOG=0

OK
AT+FAKE
// No prompt`ERR CODE:0x01090000`

ERROR

#6. AT+SYSMSG

Function:Query/Set System Prompt Information.

Query Command:

AT+SYSMSG?

Response:

+SYSMSG:<state>

OK

Set Command:

AT+SYSMSG=<state>

Response:

OK

Parameter:

  • <state>:

    • ○ Bit0: Whether to print prompt information when exiting the serial port data receiving mode, refer to AT+BLEGATTSNTFY

      • 0: Do not print
      • 1: Print+QUITT

    ○ Bit1: The type of information prompted when connecting, currently there are no supported connection events

    *   <span class="ne-text">0: Use simple version prompt information</span>
    *   <span class="ne-text">1: Use detailed version prompt information</span>
    

    ○ Bit2: AT event prompt information

    *   <span class="ne-text">0: Do not print event information</span>
    *   <span class="ne-text">1: Print event information as follows:</span>
    
        *   <span class="ne-text">+BLECONN: Bluetooth connection establishment</span>
        *   <span class="ne-text">+BLEDISCONN: Bluetooth connection disconnected</span>
        *   <span class="ne-text">+NOTIFY_ ENABLED: Enable Notify for transparent transmission attributes</span>
        *   <span class="ne-text">+NOTIFY_ DisaBLED: Turn off Notify for transparent transmission attributes</span>
        *   <span class="ne-text">+SEND_ OK: Successfully sent</span>
        *   <span class="ne-text">+SEND_ FAIL: Sending failed</span>
        *   <span class="ne-text">+SEND_ CANCELED: Sending cancellation</span>
    

Description:

  • If AT+SYSSTORE=1, the configuration changes will be saved in the KV partition.
  • If Bit0 is set to 1, a prompt of+QUITT will appear when exiting Wi Fi transparent mode.

Demo:

// Open AT event information
AT+SYSMSG=4

OK
+BLECONN        //When BLE connection is established
+NOTIFY_ENABLED	//When Notify is turned on

#7. AT+SYSSTORE

Function:Set store mode of parameter.

Query Command:

AT+SYSSTORE?

Response:

+SYSSTORE:<store_mode>

OK

Parameter:

Please refer to set command parameter.

Set Command:

AT+SYSSTORE=<store_mode>

Response:

OK

Parameter:

  • <store_mode>:Parameterstorage mode

    • 0: Command configuration not stored in flash
    • 1: Command configuration saved to flash (default)

Description:

  • This command only affects the setting command, not the query command, because the query command is always called from RAM.
  • This command will affect the following commands:
<span class="ne-text">AT+BLENAME</span>

<span class="ne-text">AT+POWER</span>

<span class="ne-text">AT+BLEADVPARM</span>

<span class="ne-text">AT+BLEADVDATA</span>

<span class="ne-text">AT+BLEADVDATAEX</span>

<span class="ne-text">AT+SYSMSG</span>

#8. AT+CIPMODE

Function:The output format of network data on the serial port.

Query Command:

AT+CIPMODE?

Response:

+CIPMODE:<mode>

OK

Set Command:

AT+CIPMODE=<mode>

Response:

OK

Parameter:

  • <mode>: Data display method

    • 0: Output in AT event mode:+WRITE,<xxx>:<raw data>CR-LF
    • 1: Directly output the received network data in RAW data format on the serial port, that is, transmit the network data to the serial port.

Demo:

AT+CIPMODE=0

OK
+WRITE,5:Hello //Output in the form of AT events

AT+CIPMODE=1

OK
Hello	//Output in the form of RAW Data

#9. AT+RESTORE

Function:Restore factory settings.

Execute Command:

AT+RESTORE

Response:

OK

Description:

  • This command will erase all parameters saved to flash and restore them to the default parameters.
  • Running this command will restart the device.

#10. AT+UART_CUR

Function:Configure the current temporary configuration of UART and do not save it to flash.

Query Command:

AT+UART_CUR?

Response:

+UART_CUR:<baudrate>,<databits>,<stopbits>,<parity>,<flow control>

OK

Parameter:

Please refer to set command parameter.

Set Command:

AT+UART_CUR=[<baudrate>,<databits>,<stopbits>,<Parity>,<flow control>]

Response:

OK

Parameter:

  • <baudrate>: UART baud rate, MX1510 series module support range from 1200 to 2000000

  • <databits>: Data bits

    ○ 5:5 bit data bits

    ○ 6:6 bit data bits

    ○ 7:7 bit data bits

    ○ 8:8 bit data bits

  • <stopbits>: Stop bits

    ○ 1:1 bit stop bit

    ○ 2:1.5 bit stop bit

    ○ 3:2 bit stop bit

  • <party>: Check bit

    ○ 0: None

    ○ 1: Odd

    ○ 2: Even

  • Flow control

    ○ 0: Do not enable flow control

    ○ 1: Enable RTS

    ○ 2: Enable CTS

    ○ 3: Enable both RTS and CTS simultaneously

Description:

  • The query command returns the actual value of the UART configuration parameter, which may differ slightly from the set value due to clock division.
  • This setting is not saved to flash.
  • To use hardware flow control functions, it is necessary to connect the CTS/RTS pins of the device. Currently, the MX1510 series modules do not support flow control

Example:

11. AT+UART_DEFFunction:Configure the current temporary configuration of UART and save it to flash.Query Command:AT+UART_DEF?Response:+UART_DEF:,,,,OKParameter:Please refer to AT+UART_CUR set command parameter.Set Command:AT+UART_DEF=[,,,,]Response:OKParameter:Please refer to AT+UART_CUR set command parameter.Description:This setting is saved to the KV partition of flash. Still valid when the device is powered on againThe Query Command reads the parameters saved in the KV partition, which may be different from the current serial port parametersDemo:12. AT+UARTPACKFunction:The packaging and processing method of serial port data.Query Command:AT+UARTPACK?Response:+UARTPACK:OKParameter:Please refer to set command parameter.Set Command:AT+UARTPACK=Response:OKParameter::  UART data packaging processing method, please refer to the work mode switching content on this page for details.○ 0: RAW DATA mode, when the data reaches its maximum length or has not received new data for a period of time, the data is packaged and sent to a predefined network channel. The received network data is also directly sent to the serial port○ 1: AT mode: Parse data in the format of the AT command (starting with AT and ending with CR-LF), and send it to the AT subsystem for processing. In this mode, the echo function of the AT command is automatically activated.○ 2: AUTO mode: If the first two bytes are "AT", the data is processed in AT mode; otherwise, it is packaged and processed in RAW DATA mode.Demo:AT+CIPMODE=0

OK
+WRITE,5:Hello //Output in the form of AT events

AT+CIPMODE=1

OK
Hello	//Output in RAW data format
Last Updated: 11/29/2023, 1:52:34 PM