# Basic Command
#Command List
The basic command include three types: Execute Command, Query Command, and Set Command.
Num | Command | Function |
1 | Test whether the AT is started. | |
2 | Restare module. | |
3 | View version information. | |
4 | View AT instructions supported. | |
5 | Enable or disable AT error code prompts. | |
6 | Query/Set System Prompt Information. | |
7 | Set store mode of parameter. | |
8 | The output format of network data on the serial port. | |
9 | Restore factory settings. | |
10 | Configure the current temporary configuration of UART and do not save it to flash. | |
11 | Configure the current temporary configuration of UART and save it to flash. | |
12 | 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: |
|
#4. AT+CMD
Function:View AT instructions supported.
Query Command: | AT+CMD |
Response: | +CMD:<index>,<"name">[,<"EXE">,<"QUERY">,<"SET">] OK |
Parameter: |
|
#5. AT+SYSLOG
Function:Enable or disable AT error code prompts.
Query Command: | AT+SYSLOG? |
Response: | +SYSLOG:<status> OK |
Parameter: |
|
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: |
|
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: |
|
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