A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.espressif.com/projects/esp-at/en/latest/esp32/AT_Command_Set/Basic_AT_Commands.html below:

Website Navigation


Basic AT Commands - ESP32

Basic AT Commands

[中文]

Introduction

Important

The default AT firmware supports all the AT commands mentioned on this page.

AT: Test AT Startup Execute Command

Command:

Response:

AT+RST: Restart a Module Execute Command

Command:

Response:

AT+GMR: Check Version Information Execute Command

Command:

Response:

<AT version info>
<SDK version info>
<compile time>
Bin version:<Bin version>(<module_name>)

OK
Parameters Note Example
AT+GMR
AT version:2.2.0.0-dev(ca41ec4 - ESP32 - Sep 16 2020 11:28:17)
SDK version:v4.0.1-193-ge7ac221b4
compile time(98b95fc):Oct 29 2020 11:23:25
Bin version:2.1.0(MINI-1)

OK
AT+CMD: List all AT commands and types supported in current firmware Query Command

Command:

Response:

+CMD:<index>,<"AT command name">,<support test command>,<support query command>,<support set command>,<support execute command>

OK
Parameters AT+GSLP: Enter Deep-sleep Mode Set Command

Command:

Response:

Parameter Notes ATE: Configure AT Commands Echoing Execute Command

Command:

or

Response:

Parameters AT+RESTORE: Restore Factory Default Settings Execute Command

Command:

Response:

Notes AT+SAVETRANSLINK: Set Whether to Enter Wi-Fi/Bluetooth LE Passthrough Mode on Power-up Set Whether to Enter TCP/SSL Passthrough Mode on Power-up Set Command

Command:

AT+SAVETRANSLINK=<mode>,<"remote host">,<remote port>[,<"type">,<keep_alive>]

Response:

Parameters Notes Example
AT+SAVETRANSLINK=1,"192.168.6.110",1002,"TCP"
AT+SAVETRANSLINK=1,"www.baidu.com",443,"SSL"
AT+SAVETRANSLINK=1,"240e:3a1:2070:11c0:55ce:4e19:9649:b75",8080,"TCPv6"
AT+SAVETRANSLINK=1,"240e:3a1:2070:11c0:55ce:4e19:9649:b75",8080,"SSLv6"
Set Whether to Enter UDP Passthrough Mode on Power-up Set Command

Command:

AT+SAVETRANSLINK=<mode>,<"remote host">,<remote port>,[<"type">,<local port>]

Response:

Parameters Notes
Example
AT+SAVETRANSLINK=1,"192.168.6.110",1002,"UDP",1005
AT+SAVETRANSLINK=1,"240e:3a1:2070:11c0:55ce:4e19:9649:b75",8081,"UDPv6",1005
Set Whether to Enter Bluetooth LE Passthrough Mode on Power-up Set Command

Command:

AT+SAVETRANSLINK=<mode>,<role>,<tx_srv>,<tx_char>,<rx_srv>,<rx_char>,<"peer_addr">

Response:

Parameters Notes Example
AT+SAVETRANSLINK=2,2,1,7,1,5,"26:a2:11:22:33:88"
AT+TRANSINTVL: Set the Data Transmission Interval in Passthrough Mode Query Command

Command:

Response:

+TRANSINTVL:<interval>

OK
Set Command

Command:

Response:

Parameter Note Example
// Set to send immediately upon receiving data
AT+TRANSINTVL=0
AT+UART_CUR: Current UART Configuration, Not Saved in Flash Query Command

Command:

Response:

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

OK
Set Command

Command:

AT+UART_CUR=<baudrate>,<databits>,<stopbits>,<parity>,<flow control>

Response:

Parameters Notes Example
AT+UART_CUR=115200,8,1,0,3
AT+UART_DEF: Default UART Configuration, Saved in Flash Query Command

Command:

Response:

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

OK
Set Command

Command:

AT+UART_DEF=<baudrate>,<databits>,<stopbits>,<parity>,<flow control>

Response:

Parameters Notes Example
AT+UART_DEF=115200,8,1,0,3
AT+SLEEP: Set the Sleep Mode Query Command

Command:

Response:

Set Command

Command:

Response:

Parameter Note Example AT+SYSRAM: Query the Heap Memory Status Query Command

Command:

Response:

+SYSRAM:<remaining RAM size>,<minimum heap size>
OK
Parameters Example
AT+SYSRAM?
+SYSRAM:148408,84044
OK
Set Command

Function:

Query the memory usage under given capabilities.

Command:

Response:

+SYSRAM:<caps_largest_free_block_size>,<caps_free_size>,<caps_minimum_free_size>,<caps_total_size>
OK
Parameters Note AT+SYSMSG: Query/Set System Prompt Information Query Command

Function:

Query the current system prompt information state.

Command:

Response:

Set Command

Function:

Configure system prompt information. If you need more fine-grained management of AT messages, please use the AT+SYSMSGFILTER command.

Command:

Response:

Parameter Notes Example
// print no promt info when quitting Wi-Fi passthrough mode
// print detailed connection prompt info
// print no prompt info when the connection status is changed
AT+SYSMSG=2

or

// In the transparent transmission mode, a prompt message will be printed when the Wi-Fi, socket, Bluetooth LE or Bluetooth status changes
AT+SYSMSG=4
AT+SYSMSGFILTER: Enable or Disable the system message Filter Query Command

Function:

Query the current system message filtering state.

Command:

Response:

+SYSMSGFILTER:<enable>

OK
Set Command

Function:

Enable or disable the system message filter.

Command:

Response:

Parameter Notes
// Data transmission via native AT command port. Data will not be filtered by AT+SYSMSGFILTER command, and AT will not actively wake up MCU before sending data (MCU wake-up function is set by AT+USERWKMCUCFG).
int32_t esp_at_port_write_data_without_filter(uint8_t data, int32_t len);

// Data transmission via AT command port with a filtering function. Data will be filtered by AT+SYSMSGFILTER command (if enabled), and AT will not actively wake up MCU before sending data (MCU wake-up function is set by AT+USERWKMCUCFG command).
int32_t esp_at_port_write_data(uint8_t data, int32_t len);

// Data transmission via AT command port with wake-up MCU function. Data will not be filtered by AT+SYSMSGFILTER command, and AT will actively wake up MCU before sending data (MCU wake-up function is set by AT+USERWKMCUCFG command).
int32_t esp_at_port_active_write_data_without_filter(uint8_t data, int32_t len);

// Data transmission via AT command port with wake-up MCU function and filtering function. Data will be filtered by AT+SYSMSGFILTER command (if enabled), and AT will actively wake up MCU before sending data (MCU wake-up function is set by AT+USERWKMCUCFG command).
int32_t esp_at_port_active_write_data(uint8_t data, int32_t len);
Example

For detailed examples, refer to system message filtering example.

AT+SYSMSGFILTERCFG: Query/Set the system message Filters Query the Filters Query Command

Command:

Response:

+SYSMSGFILTERCFG:<index>,<"head_regexp">,<"tail_regexp">

OK
Parameters Clear all the Filters Set Command

Command:

AT+SYSMSGFILTERCFG=<operator>

Response:

Parameter Example
// Clear all the filters
AT+SYSMSGFILTERCFG=0
Add a Filter Set Command

Command:

AT+SYSMSGFILTERCFG=<operator>,<head_regexp_len>,<tail_regexp_len>

Response:

The symbol > indicates that AT is ready for receiving regular expressions from AT command port. You should enter the head regular expression and the tail regular expression. When the length reaches the <head_regexp_len> + <tail_regexp_len> value, the regular expression integrity check starts.

If the regular expression integrity check fails or the addition of filter fails, AT returns:

If the integrity of the regular expression is verified successfully and the filter is added successfully, AT returns:

Parameters Notes Example
// Set the filter to filter out the "WIFI CONNECTED" system message report
AT+SYSMSGFILTERCFG=1,17,0
// After the command returns OK and >, enter "^WIFI CONNECTED\r\n" (Note: \r\n are 2 bytes, corresponding to 0D 0A in ASCII code)

// Enable system message filtering
AT+SYSMSGFILTER=1

// Test filtering function
AT+CWMODE=1
AT+CWJAP="ssid","password"
// AT no longer outputs "WIFI CONNECTED" system message report

For more examples of filtering system messages, refer to system message filter example.

Delete a Filter Set Command

Command:

AT+SYSMSGFILTERCFG=<operator>,<head_regexp_len>,<tail_regexp_len>

Response:

The symbol > indicates that AT is ready for receiving regular expressions from AT command port. You should enter the head regular expression and the tail regular expression. When the length reaches the <head_regexp_len> + <tail_regexp_len> value, the regular expression integrity check starts.

If the regular expression integrity check fails or the addition of filter fails, AT returns:

If the integrity of the regular expression is verified successfully and the filter is added successfully, AT returns:

Parameters Notes Example
// Delete the filter added above
AT+SYSMSGFILTERCFG=2,17,0
// After the command returns OK and >, enter "^WIFI CONNECTED\r\n" (Note: \r\n are 2 bytes, corresponding to 0D 0A in ASCII code)

// Test filtering function
AT+CWMODE=1
AT+CWJAP="ssid","password"
// AT will output "WIFI CONNECTED" system message report again
AT+SYSFLASH: Query/Set User Partitions in Flash Query Command

Function:

Query user partitions in flash.

Command:

Response:

+SYSFLASH:<partition>,<type>,<subtype>,<addr>,<size>
OK
Set Command

Function:

Read/write the user partitions in flash.

Command:

AT+SYSFLASH=<operation>,<partition>,<offset>,<length>

Response:

+SYSFLASH:<length>,<data>
OK
Parameters Notes Example
// erase the "mfg_nvs" partition in its entirety.
AT+SYSFLASH=0,"mfg_nvs",4096,8192

// write a new "mfg_nvs" partition (size: 0x1C000) at offset 0 of the "mfg_nvs" partition.
AT+SYSFLASH=1,"mfg_nvs",0,0x1C000
AT+SYSMFG: Query/Set manufacturing nvs User Partitions Query Command

Function:

Query all namespaces of manufacturing nvs user partitions.

Command:

Response:

Erase a namespace or key-value pair Set Command

Command:

AT+SYSMFG=<operation>,<"namespace">[,<"key">]

Response:

Parameters Note Example
// Erase all key-value pairs of client_cert namespace (That is, erase all client certificates)
AT+SYSMFG=0,"client_cert"

// Erase the client_cert.0 key-value pair of client_cert namespace (That is, erase the first client certificate)
AT+SYSMFG=0,"client_cert","client_cert.0"
Read a namespace or key-value pair Set Command

Command:

AT+SYSMFG=<operation>[,<"namespace">][,<"key">][,<offset>,<length>]

Response:

When <"namespace"> and subsequent parameters are omitted, it returns:

When <"key"> and subsequent parameters are omitted, it returns:

+SYSMFG:<"namespace">,<"key">,<type>

OK

In other cases, it returns:

+SYSMFG:<"namespace">,<"key">,<type>,<length>,<value>

OK
Parameters Note Example
// Read all namespaces
AT+SYSMFG=1

// Read all key-value pairs of client_cert namespace
AT+SYSMFG=1,"client_cert"

// Read the value of client_cert.0 key in client_cert namespace
AT+SYSMFG=1,"client_cert","client_cert.0"

// Read the value of client_cert.0 key in client_cert namespace, from offset: 100 place, read 200 bytes
AT+SYSMFG=1,"client_cert","client_cert.0",100,200
Write a key-value pair to a namespace Set Command

Command:

AT+SYSMFG=<operation>,<"namespace">,<"key">,<type>,<value>

Response:

Parameters Note Example
// Write a new value for client_cert.0 key into client_cert namespace (That is, update the 0th client certificate)
AT+SYSMFG=2,"client_cert","client_cert.0",8,1164

// Wait until AT command port returns ``>``, and then write 1164 bytes
AT+RFPOWER: Query/Set RF TX Power Query Command

Function:

Query the RF TX Power.

Command:

Response:

+RFPOWER:<wifi_power>,<ble_adv_power>,<ble_scan_power>,<ble_conn_power>
OK
Set Command

Command:

AT+RFPOWER=<wifi_power>[,<ble_adv_power>,<ble_scan_power>,<ble_conn_power>]

Response:

Parameters
Note AT: RF Full Calibration Execute Command

Command:

Response:

Note AT+SYSROLLBACK: Roll Back to the Previous Firmware Query Command

Function:

Query the address and version of the current running firmware and the rollback firmware.

Command:

Response:

+SYSROLLBACK:<running_app_addr>,<"running_app_version">,<rollback_app_addr>,<"rollback_app_version">
OK
Execute Command

Command:

Response:

Parameters Note AT+SYSTIMESTAMP: Query/Set Local Time Stamp Query Command

Function:

Query the time stamp.

Command:

Response:

+SYSTIMESTAMP:<Unix_timestamp>
OK
Set Command

Function:

Set local time stamp. It will be the same as SNTP time when the SNTP time is updated.

Command:

AT+SYSTIMESTAMP=<Unix_timestamp>

Response:

Parameter Example
AT+SYSTIMESTAMP=1565853509    //2019-08-15 15:18:29
AT+SYSLOG: Enable or Disable the AT Error Code Prompt Query Command

Function:

Query whether the AT error code prompt is enabled or not.

Command:

Response:

Set Command

Function:

Enable or disable the AT error code prompt.

Command:

Response:

Parameter Example
// enable AT error code prompt
AT+SYSLOG=1

OK
AT+FAKE
ERR CODE:0x01090000

ERROR
// disable AT error code prompt
AT+SYSLOG=0

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

ERROR

The error code is a 32-bit hexadecimal value and defined as follows:

category

subcategory

extension

bit32 ~ bit24

bit23 ~ bit16

bit15 ~ bit0

For example, the error code ERR CODE:0x01090000 means the command is not supported.

AT+SLEEPWKCFG: Set the Light-sleep Wakeup Source and Awake GPIO Set Command

Command:

AT+SLEEPWKCFG=<wakeup source>,<param1>[,<param2>]

Response:

Parameters Example
// GPIO12 wakeup, low level
AT+SLEEPWKCFG=2,12,0
Note AT+SYSSTORE: Query/Set Parameter Store Mode Query Command

Function:

Query the AT parameter store mode.

Command:

Response:

+SYSSTORE:<store_mode>

OK
Set Command

Command:

Response:

Parameter Note Examples
AT+SYSSTORE=0
AT+CWMODE=1  // Not stored into flash
AT+CWJAP="test","1234567890" // Not stored into flash

AT+SYSSTORE=1
AT+CWMODE=3  // Stored into flash
AT+CWJAP="test","1234567890" // Stored into flash
AT+SYSREG: Read/Write the Register Set Command

Command:

AT+SYSREG=<direct>,<address>[,<write value>]

Response:

+SYSREG:<read value>    // Only in read mode
OK
Parameters Note

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4