AT: Test AT startup.
AT+RST: Restart a module.
AT+GMR: Check version information.
AT+CMD: List all AT commands and types supported in current firmware.
AT+GSLP: Enter Deep-sleep mode.
ATE: Configure AT commands echoing.
AT+RESTORE: Restore factory default settings of the module.
AT+SAVETRANSLINK: Set whether to enter Passthrough Mode on power-up.
AT+TRANSINTVL: Set the data transmission interval in the Passthrough Mode.
AT+UART_CUR: Current UART configuration, not saved in flash.
AT+UART_DEF: Default UART configuration, saved in flash.
AT+SLEEP: Set the sleep mode.
AT+SYSRAM: Query the heap memory status.
AT+SYSMSG: Query/Set System Prompt Information.
AT+SYSMSGFILTER: Enable or disable the system message filter.
AT+SYSMSGFILTERCFG: Query/Set the system message filters.
AT+SYSFLASH: Query/Set User Partitions in Flash.
AT+SYSMFG: Query/Set manufacturing nvs User Partitions.
AT+RFPOWER: Query/Set RF TX Power.
AT+RFCAL: RF full calibration.
AT+SYSROLLBACK: Roll back to the previous firmware.
AT+SYSTIMESTAMP: Query/Set local time stamp.
AT+SYSLOG: Enable or disable the AT error code prompt.
AT+SLEEPWKCFG: Query/Set the light-sleep wakeup source and awake GPIO.
AT+SYSSTORE: Query/Set parameter store mode.
AT+SYSREG: Read/write the register.
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>) OKParametersï
<AT version info>: information about the esp-at core library version, which is under the directory: esp-at/components/at/lib/
. Code is closed source, no plan to open.
<SDK version info>: information about the esp-at platform sdk version, which is defined in file: esp-at/module_config/module_{platform}_default/IDF_VERSION
<compile time>: the time to compile the firmware.
<Bin version>: esp-at firmware version. Version information can be modified in menuconfig. python build.py menuconfig
> Application manager
> Project version
. Maximum length: 32 bytes.
<module_name>: the module name, which is defined in file: esp-at/components/customized_partitions/raw_data/factory_param/factory_param_data.csv
.
If you have any issues on esp-at firmware, please provide AT+GMR
version information firstly.
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) OKAT+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> OKParametersï
<index>: AT command sequence number.
<âAT command nameâ>: AT command name.
<support test command>: 0 means not supported, 1 means supported.
<support query command>: 0 means not supported, 1 means supported.
<support set command>: 0 means not supported, 1 means supported.
<support execute command>: 0 means not supported, 1 means supported.
Command:
Response:
Parameterï<time>: The duration when the device stays in Deep-sleep. Unit: millisecond. When the time is up, the device automatically wakes up, calls Deep-sleep wake stub, and then proceeds to load the application.
0 means restarting right now
The theoretical and actual time of Deep-sleep may be different due to external factors.
Command:
or
Response:
ParametersïATE0: Switch echo off.
ATE1: Switch echo on.
Command:
Response:
NotesïThe execution of this command will restore all parameters saved in flash to factory default settings of the module.
The device will be restarted when this command is executed.
Command:
AT+SAVETRANSLINK=<mode>,<"remote host">,<remote port>[,<"type">,<keep_alive>]
Response:
Parametersï<mode>:
0: ESP32 will NOT enter Wi-Fi Passthrough Mode on power-up.
1: ESP32 will enter Wi-Fi Passthrough Mode on power-up.
<âremote hostâ>: IPv4 address, IPv6 address, or domain name of remote host. The maximum length is 64 bytes.
<remote port>: the remote port number.
<âtypeâ>: string parameter showing the type of transmission: âTCPâ, âTCPv6â, âSSLâ, or âSSLv6â. Default: âTCPâ.
<keep_alive>: It configures the SO_KEEPALIVE option for socket. Unit: second.
Range: [0,7200].
0: disable keep-alive function (default).
1 ~ 7200: enable keep-alive function. TCP_KEEPIDLE value is <keep_alive>, TCP_KEEPINTVL value is 1, and TCP_KEEPCNT value is 3.
This parameter of this command is the same as the <keep_alive>
parameter of AT+CIPTCPOPT command. It always takes the value set later by either of the two commands. If it is omitted or not set, the last configured value is used by default.
This command will save the Wi-Fi Passthrough Mode configuration in the NVS partition. If <mode>
is set to 1, ESP32 will enter the Wi-Fi Passthrough Mode in the next power on. The configuration will take effect after ESP32 reboots.
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ï<mode>:
0: ESP32 will NOT enter Wi-Fi Passthrough Mode on power-up.
1: ESP32 will enter Wi-Fi Passthrough Mode on power-up.
<âremote hostâ>: IPv4 address, IPv6 address, or domain name of remote host. The maximum length is 64 bytes.
<remote port>: the remote port number.
<âtypeâ>: string parameter showing the type of transmission: âUDPâ or âUDPv6â. Default: âTCPâ.
<local port>: local port when UDP Wi-Fi passthrough is enabled on power-up.
This command will save the Wi-Fi Passthrough Mode configuration in the NVS partition. If <mode>
is set to 1, ESP32 will enter the Wi-Fi Passthrough Mode in the next power on. The configuration will take effect after ESP32 reboots.
To establish an UDP transmission based on an IPv6 network, do as follows:
Exampleï
Make sure that the AP supports IPv6
Set AT+CIPV6=1
Obtain an IPv6 address through the AT+CWJAP command
(Optional) Check whether ESP32 has obtained an IPv6 address using the AT+CIPSTA? command
AT+SAVETRANSLINK=1,"192.168.6.110",1002,"UDP",1005 AT+SAVETRANSLINK=1,"240e:3a1:2070:11c0:55ce:4e19:9649:b75",8081,"UDPv6",1005Set 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ï<mode>:
<role>:
1: client role.
2: server role.
<tx_srv>: tx serviceâs index. It can be queried with command AT+BLEGATTCPRIMSRV=<conn_index> if AT works as GATTC role or with command AT+BLEGATTSSRV? if AT works as GATTS role.
<tx_char>: tx characteristicâs index. It can be queried with command AT+BLEGATTCCHAR=<conn_index>,<srv_index> if AT works as GATTC role or with command AT+BLEGATTSCHAR? if AT works as GATTS role.
<rx_srv>: rx serviceâs index. It can be queried with command AT+BLEGATTCPRIMSRV=<conn_index> if AT works as GATTC role or with command AT+BLEGATTSSRV? if AT works as GATTS role.
<rx_char>: rx characteristicâs index. It can be queried with command AT+BLEGATTCCHAR=<conn_index>,<srv_index> if AT works as GATTC role or with command AT+BLEGATTSCHAR? if AT works as GATTS role.
<âpeer_addrâ>: remote Bluetooth LE address.
This command will save the BLE Passthrough Mode configuration in the NVS partition. If <mode>
is set to 2, ESP32 will enter the Bluetooth LE Passthrough Mode in the next power on. The configuration will take effect after ESP32 reboots.
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> OKSet Commandï
Command:
Response:
Parameterï<interval>: Data transmission interval. Unit: milliseconds. Default value: 20. Range: [0,1000].
In passthrough mode, if the data received by ESP32 reaches or exceeds 2920 bytes, the data will be immediately sent in chunks of 2920 bytes. Otherwise, it will wait for <interval>
milliseconds before being sent.
To optimize data transmission in cases where the data size is small and the data transmission interval is short, adjusting <interval>
can be useful. A smaller <interval>
reduces the delay in sending data to the protocol stack, but this may increase the number of times the protocol stack sends data to the network, thereby potentially decreasing the throughput performance to some extent.
// Set to send immediately upon receiving data AT+TRANSINTVL=0AT+UART_CUR: Current UART Configuration, Not Saved in Flashï Query Commandï
Command:
Response:
+UART_CUR:<baudrate>,<databits>,<stopbits>,<parity>,<flow control> OKSet Commandï
Command:
AT+UART_CUR=<baudrate>,<databits>,<stopbits>,<parity>,<flow control>
Response:
Parametersï<baudrate>: UART baud rate
For ESP32 devices, the supported range is 80 ~ 5000000.
<databits>: data bits
5: 5-bit data
6: 6-bit data
7: 7-bit data
8: 8-bit data
<stopbits>: stop bits
1: 1-bit stop bit
2: 1.5-bit stop bit
3: 2-bit stop bit
<parity>: parity bit
0: None
1: Odd
2: Even
<flow control>: flow control
0: flow control is not enabled
1: enable RTS
2: enable CTS
3: enable both RTS and CTS
The Query Command will return actual values of UART configuration parameters, which may have minor differences from the set value because of the clock division.
The configuration changes will NOT be saved in flash.
To use hardware flow control, you need to connect CTS/RTS pins of your ESP32. For more details, please refer to Hardware Connection or components/customized_partitions/raw_data/factory_param/factory_param_data.csv
.
AT+UART_CUR=115200,8,1,0,3AT+UART_DEF: Default UART Configuration, Saved in Flashï Query Commandï
Command:
Response:
+UART_DEF:<baudrate>,<databits>,<stopbits>,<parity>,<flow control> OKSet Commandï
Command:
AT+UART_DEF=<baudrate>,<databits>,<stopbits>,<parity>,<flow control>
Response:
Parametersï<baudrate>: UART baud rate
For ESP32 devices, the supported range is 80 ~ 5000000.
<databits>: data bits
5: 5-bit data
6: 6-bit data
7: 7-bit data
8: 8-bit data
<stopbits>: stop bits
1: 1-bit stop bit
2: 1.5-bit stop bit
3: 2-bit stop bit
<parity>: parity bit
0: None
1: Odd
2: Even
<flow control>: flow control
0: flow control is not enabled
1: enable RTS
2: enable CTS
3: enable both RTS and CTS
The configuration changes will be saved in the NVS partition, and will still be valid when the chip is powered on again.
To use hardware flow control, you need to connect CTS/RTS pins of your ESP32. For more details, please refer to Hardware Connection or components/customized_partitions/raw_data/factory_param/factory_param_data.csv
.
AT+UART_DEF=115200,8,1,0,3AT+SLEEP: Set the Sleep Modeï Query Commandï
Command:
Response:
Set CommandïCommand:
Response:
Parameterï<sleep mode>:
0: Disable the sleep mode.
1: Wi-Fi Modem-sleep mode. The RF module will be periodically closed according to the APâs DTIM
. This setting only takes effect when Wi-Fi mode is Station; in the Null Wi-Fi mode, the setting is allowed but will not take effect (for compatibility with older AT firmware); in other cases, it cannot be set.
2: Light-sleep mode. This parameter cannot be set when the Wi-Fi mode is SoftAP or Station+SoftAP.
Null Wi-Fi mode.
CPU will automatically sleep and RF will be closed.
Only Wi-Fi mode.
CPU will automatically sleep and RF will be periodically closed according to listen interval
set by AT+CWJAP or AT+CWCONFIG.
Only Bluetooth mode.
When Bluetooth LE is advertising, CPU will automatically sleep and RF will be periodically closed according to advertising interval of Bluetooth.
When Bluetooth LE is connected, CPU will automatically sleep and RF will be periodically closed according to connection interval of Bluetooth.
Wi-Fi and Bluetooth coexistence mode.
CPU will automatically sleep and RF will be periodically closed according to power management module.
3: Wi-Fi Modem-sleep listen interval mode. The RF module will be periodically closed according to listen interval
set by AT+CWJAP or AT+CWCONFIG. This setting only takes effect when Wi-Fi mode is Station; in the Null Wi-Fi mode, the setting is allowed but will not take effect (for compatibility with older AT firmware); in other cases, it cannot be set.
Before setting the Light-sleep mode, it is recommended to set the wakeup source in advance through the command AT+SLEEPWKCFG, otherwise ESP32 canât wake up and will always be in sleep mode.
After setting the Light-sleep mode, if the Light-sleep wakeup condition is not met, ESP32 will automatically enter the sleep mode. When the Light-sleep wakeup condition is met, ESP32 will automatically wake up from sleep mode.
In only BLE mode, only BLE Light-sleep and BLE Modem-sleep modes are available. Use the AT+SLEEP=2
command to enable BLE Light-sleep, and use the AT+SLEEP=0
command to enable BLE Modem-sleep.
For Light-sleep mode in BLE mode, users must ensure external 32KHz crystal oscillator, otherwise the Light-sleep mode will work in Modem-sleep mode.
For more examples, please refer to Sleep AT Examples.
Command:
Response:
+SYSRAM:<remaining RAM size>,<minimum heap size> OKParametersï
<remaining RAM size>: current remaining heap size. Unit: byte.
<minimum heap size>: minimum available heap size in the runtime. Unit: byte. When the parameterâs value is less than or close to 10 KB, the Wi-Fi and BLE functions of ESP32 may be affected.
AT+SYSRAM? +SYSRAM:148408,84044 OKSet 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> OKParametersï
<caps>: Capability value. See Different capability definitions for details. Multiple values can be combined, e.g., AT+SYSRAM=0x1800
represents MALLOC_CAP_INTERNAL | MALLOC_CAP_DEFAULT
.
<caps_largest_free_block_size>: The maximum size of a free block that can be allocated under the given caps. Unit: byte.
<caps_free_size>: The total size of all free blocks under the given caps. Unit: byte.
<caps_minimum_free_size>: The minimum total size of all free blocks under the given caps since power-on. Unit: byte.
<caps_total_size>: The total memory size under the given caps. Unit: byte.
During system operation, if there is insufficient memory, the AT log port will output alloc failed, size:<requested_size>, caps:<requested_caps>
. You can send AT+SYSRAM=<requested_caps>
to check the memory usage under the current caps. The <caps_largest_free_block_size>
determines whether a memory block of size <requested_size>
can be allocated.
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ï<state>:
Bit0: Prompt information when quitting Wi-Fi Passthrough Mode, Bluetooth LE SPP and Bluetooth SPP.
0: Print no prompt information when quitting Wi-Fi Passthrough Mode, Bluetooth LE SPP and Bluetooth SPP.
1: Print +QUITT
when quitting Wi-Fi Passthrough Mode, Bluetooth LE SPP and Bluetooth SPP.
Bit1: Connection prompt information type.
0: Use simple prompt information, such as XX,CONNECT
.
1: Use detailed prompt information, such as +LINK_CONN:status_type,link_id,ip_type,terminal_type,remote_ip,remote_port,local_port
.
Bit2: Connection status prompt information for Wi-Fi Passthrough Mode, Bluetooth LE SPP and Bluetooth SPP.
0: Print no prompt information.
1: Print one of the following prompt information when Wi-Fi, socket, Bluetooth LE or Bluetooth status is changed:
- "CONNECT\r\n" or the message prefixed with "+LINK_CONN:" - "CLOSED\r\n" - "WIFI CONNECTED\r\n" - "WIFI GOT IP\r\n" - "WIFI GOT IPv6 LL\r\n" - "WIFI GOT IPv6 GL\r\n" - "WIFI DISCONNECT\r\n" - "+ETH_CONNECTED\r\n" - "+ETH_DISCONNECTED\r\n" - the message prefixed with "+ETH_GOT_IP:" - the message prefixed with "+STA_CONNECTED:" - the message prefixed with "+STA_DISCONNECTED:" - the message prefixed with "+DIST_STA_IP:" - the message prefixed with "+BLECONN:" - the message prefixed with "+BLEDISCONN:"
The configuration changes will be saved in the NVS partition if AT+SYSSTORE=1
.
If you set Bit0 to 1, it will prompt â+QUITTâ when you quit Wi-Fi Passthrough Mode.
If you set Bit1 to 1, it will impact the information of command AT+CIPSTART and AT+CIPSERVER. It will supply â+LINK_CONN:status_type,link_id,ip_type,terminal_type,remote_ip,remote_port,local_portâ instead of âXX,CONNECTâ.
// 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=4AT+SYSMSGFILTER: Enable or Disable the system message Filterï Query Commandï
Function:
Query the current system message filtering state.
Command:
Response:
+SYSMSGFILTER:<enable> OKSet Commandï
Function:
Enable or disable the system message filter.
Command:
Response:
Parameterï<enable>:
0: Disable system message filtering. System default value. When disabled, system messages will not be filtered by the set filter.
1: Enable system message filtering. When it is enabled, the data matching the regular expression will be filtered out by AT, and MCU will not receive it, whereas the unmatched data will be sent to the MCU as it is.
Please use AT+SYSMSGFILTERCFG to set up system message filters. Then, use this command to enable the system message filtering to achieve more sophisticated system message management.
Please use the AT+SYSMSGFILTER=1 command with caution. It is recommended that you disable the system message filtering promptly after enabling it to prevent the over-filtering of AT system messages.
Before entering the Passthrough Mode, it is strongly recommended to use the AT+SYSMSGFILTER=0 command to disable system message filtering.
If you are working on secondary development of AT project, please use the following APIs to transmit data via the AT command port.
// 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"> OKParametersï
<index>: The index of filters.
<âhead_regexpâ>: The regular expression of header.
<âtail_regexpâ>: The regular expression of tail.
Command:
AT+SYSMSGFILTERCFG=<operator>
Response:
Parameterï<operator>:
0: Clear all the filters. After clearing, you can free some heap size occupied by the filters.
// Clear all the filters AT+SYSMSGFILTERCFG=0Add 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ï<operator>:
1: Add a filter. A filter contains a header regular expression and a tail regular expression.
<head_regexp_len>: The length of the header regular expression. Range: [0,64]. If it is set to 0, the matching of the regular expression in the header is ignored, and <tail_regexp_len>
cannot be 0.
<tail_regexp_len>: The length of the tail regular expression. Range: [0,64]. If it is set to 0, the matching of the regular expression in the tail is ignored, and <head_regexp_len>
cannot be 0.
Please use this command to set up system message filters. Then, use AT+SYSMSGFILTER to enable the system message filtering to achieve more sophisticated system message management.
For more details about header and tail regular expression format, refer to POSIX Basic Regular Expression (BRE).
In order to avoid system message (TX data of AT command port) being filtered incorrectly, it is strongly recommended that the header regular expression starts with ^
and the tail regular expression ends with $
.
Only when the system message matches both the header regular expression and the tail regular expression at the same time is the system message filtered. After filtering, the data matching the regular expression will be filtered out by AT, and MCU will not receive it, whereas the unmatched data will be sent to the MCU as it is.
When the system message matches one filter, it will not continue to match other filters.
When the system message matches the filter, the system message will not be cached, that is, the previous system message and the current system message will not be combined for matching.
For devices with large throughput, it is strongly recommended that you limit the number of filters and disable system message filtering using the AT+SYSMSGFILTER=0 command in time.
// 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ï<operator>:
<head_regexp_len>: The length of the header regular expression. Range: [0,64]. If it is set to 0, the <tail_regexp_len>
cannot be 0.
<tail_regexp_len>: The length of the header regular expression. Range: [0,64]. If it is set to 0, the <head_regexp_len>
cannot be 0.
The filter to be deleted should be in the added filters.
// 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 againAT+SYSFLASH: Query/Set User Partitions in Flashï Query Commandï
Function:
Query user partitions in flash.
Command:
Response:
+SYSFLASH:<partition>,<type>,<subtype>,<addr>,<size> OKSet Commandï
Function:
Read/write the user partitions in flash.
Command:
AT+SYSFLASH=<operation>,<partition>,<offset>,<length>
Response:
+SYSFLASH:<length>,<data> OKParametersï
<operation>:
0: erase sector
1: write data into the user partition
2: read data from the user partition
<partition>: name of user partition
<offset>: offset of user partition
<length>: data length
<type>: type of user partition
<subtype>: subtype of user partition
<addr>: address of user partition
<size>: size of user partition
Please make sure that you have downloaded at_customize.bin before using this command. For more details, please refer to How to Customize Partitions.
When erasing a partition, please erase the target partition in its entirety. This can be done by omitting the parameters <offset>
and <length>
. For example, command AT+SYSFLASH=0,"mfg_nvs"
can erase the entire âmfg_nvsâ user partition.
The introduction to partitions is in ESP-IDF Partition Tables.
If the operator is write
, wrap return >
after the write command, then you can send the data that you want to write. The length should be parameter <length>
.
If the operator is write
, please make sure that you have already erased this partition.
If you want to modify some data in the âmfg_nvsâ partition, please use the AT+SYSMFG command (key-value pairs operation). If you want to modify total âmfg_nvsâ partition, please use the AT+SYSFLASH command (partition operation).
When writing to a partition, the MCU should write data in multiple chunks to avoid memory exhaustion caused by writing too much data at once. For example, write 4 KB of data each time until the write is complete.
// 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,0x1C000AT+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ï<operation>:
0: erase operation
1: read operation
2: write operation
<ânamespaceâ>: namespace name.
<âkeyâ>: key name. If this parameter is omitted, all key-value pairs of current <"namespace">
will be erased. Otherwise, only the current key-value pair is erased.
Please refer to the Non-Volatile Storage (NVS) documentation to understand the concept of namespace and key-value pairs.
// 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> OKParametersï
<operation>:
0: erase operation
1: read operation
2: write operation
<ânamespaceâ>: namespace name.
<âkeyâ>: key name.
<offset>: The offset of the value.
<length>: The length of the value.
<type>: The type of the value.
1: u8
2: i8
3: u16
4: i16
5: u32
6: i32
7: string
8: binary
<value>: The data of the value.
Please refer to the Non-Volatile Storage (NVS) documentation to understand the concept of namespace and key-value pairs.
// 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,200Write a key-value pair to a namespaceï Set Commandï
Command:
AT+SYSMFG=<operation>,<"namespace">,<"key">,<type>,<value>
Response:
Parametersï<operation>:
0: erase operation
1: read operation
2: write operation
<ânamespaceâ>: namespace name.
<âkeyâ>: key name.
<type>: The type of the value.
1: u8
2: i8
3: u16
4: i16
5: u32
6: i32
7: string
8: binary
<value>: It means differently depending on the parameter <type>
:
If <type>
is between 1-6, <value>
represents the real value.
If <type>
is between 7-8, <value>
represents the length of the value. After you send the command, AT will return >
. This symbol indicates that AT is ready for receiving data. You should enter the data of designated length. When the data length reaches the <value>
value, the key-value pair will be written to the namespace immediately.
Please refer to the Non-Volatile Storage (NVS) documentation to understand the concept of namespace and key-value pairs.
Before writing, you do not need to manually erase namespaces or key-value pairs (NVS will automatically erase key-value pairs as needed).
If you want to modify some data in the âmfg_nvsâ partition, please use the AT+SYSMFG command (key-value pairs operation). If you want to modify total âmfg_nvsâ partition, please use the AT+SYSFLASH command (partition operation).
// 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 bytesAT+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> OKSet Commandï
Command:
AT+RFPOWER=<wifi_power>[,<ble_adv_power>,<ble_scan_power>,<ble_conn_power>]
Response:
Parametersï<wifi_power>: the unit is 0.25 dBm. For example, if you set the value to 78, the actual maximum RF Power value is 78 * 0.25 dBm = 19.5 dBm. After you configure it, please confirm the actual value by entering the command AT+RFPOWER?
.
For ESP32 devices, the range is [40,84]:
set value
get value
actual value
actual dBm
[40,43]
34
34
8.5
[44,51]
44
44
11
[52,55]
52
52
13
[56,59]
56
56
14
[60,65]
60
60
15
[66,71]
66
66
16.5
[72,77]
72
72
18
[78,84]
78
78
19.5
<ble_adv_power>: RF TX Power of Bluetooth LE advertising. Range: [0,7].
0: 7 dBm
1: 4 dBm
2: 1 dBm
3: -2 dBm
4: -5 dBm
5: -8 dBm
6: -11 dBm
7: -14 dBm
<ble_scan_power>: RF TX Power of Bluetooth LE scanning. The parameters are the same as <ble_adv_power>
.
<ble_conn_power>: RF TX Power of Bluetooth LE connecting. The same as <ble_adv_power>
.
When Wi-Fi is turned off or not initialized, the AT+RFPOWER command cannot set or query the RF TX Power of Wi-Fi. Similarly, when Bluetooth LE is not initialized, the command cannot set or query that of Bluetooth LE, either.
Since the RF TX Power is actually divided into several levels, and each level has its own value range, the wifi_power
value queried by the esp_wifi_get_max_tx_power
may differ from the value set by esp_wifi_set_max_tx_power
and is no larger than the set value.
It is recommended to set the two parameters <ble_scan_power> and <ble_conn_power> to the same value as the <ble_adv_power> parameter. Otherwise, they will be automatically adjusted to the value of <ble_adv_power>.
Command:
Response:
NoteïESP32 will automatically perform RF full calibration on the first startup, and partial calibration on subsequent startups. For more details, please refer to RF Calibration.
It is recommended to perform RF full calibration after firmware upgrade, changes to the device environment, or prolonged periods of device inactivity.
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"> OKExecute Commandï
Command:
Response:
Parametersï<running_app_addr>: the address of the current running firmware.
<ârunning_app_versionâ>: the version of the current running firmware.
<rollback_app_addr>: the address of the rollback firmware.
<ârollback_app_versionâ>: the version of the rollback firmware.
This command will not upgrade via OTA. It only rolls back to the firmware which is in the other OTA partition.
Function:
Query the time stamp.
Command:
Response:
+SYSTIMESTAMP:<Unix_timestamp> OKSet 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ï<Unix-timestamp>: Unix timestamp. Unit: second.
AT+SYSTIMESTAMP=1565853509 //2019-08-15 15:18:29AT+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ï<status>: enable or disable
0: disable
1: enable
// 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
category: stationary value 0x01.
subcategory: error type.
Subcategory of Error CodeïError Type
Error Code
Description
ESP_AT_SUB_OK
0x00
OK
ESP_AT_SUB_COMMON_ERROR
0x01
reserved
ESP_AT_SUB_NO_TERMINATOR
0x02
terminator character not found (ârnâ expected)
ESP_AT_SUB_NO_AT
0x03
Starting AT not found (or at, At or aT entered)
ESP_AT_SUB_PARA_LENGTH_MISMATCH
0x04
parameter length mismatch
ESP_AT_SUB_PARA_TYPE_MISMATCH
0x05
parameter type mismatch
ESP_AT_SUB_PARA_NUM_MISMATCH
0x06
parameter number mismatch
ESP_AT_SUB_PARA_INVALID
0x07
the parameter is invalid
ESP_AT_SUB_PARA_PARSE_FAIL
0x08
parse parameter fail
ESP_AT_SUB_UNSUPPORT_CMD
0x09
the command is not supported
ESP_AT_SUB_CMD_EXEC_FAIL
0x0A
the command execution failed
ESP_AT_SUB_CMD_PROCESSING
0x0B
processing of previous command is in progress
ESP_AT_SUB_CMD_OP_ERROR
0x0C
the command operation type is error
extension: error extension information. There are different extensions for different subcategory. For more information, please see the components/at/include/esp_at.h
.
For example, the error code ERR CODE:0x01090000
means the command is not supported.
Command:
AT+SLEEPWKCFG=<wakeup source>,<param1>[,<param2>]
Response:
Parametersï<wakeup source>:
0: reserved, not supported now.
1: reserved, not supported now.
2: wakeup by GPIO.
<param1>:
If the wakeup source is GPIO, it means the GPIO number.
Reserved, not supported now.
<param2>:
If the wakeup source is GPIO, it means the wakeup level:
0: low level.
1: high level.
// GPIO12 wakeup, low level AT+SLEEPWKCFG=2,12,0Noteï
The wake-up pin must be driven to a valid logic level and should not be left floating. It must be either high or low.
Function:
Query the AT parameter store mode.
Command:
Response:
+SYSSTORE:<store_mode> OKSet Commandï
Command:
Response:
Parameterï<store_mode>:
0: command configuration is not stored into flash.
1: command configuration is stored into flash. (Default)
This command affects set commands only. Query commands are always fetched from RAM.
Affected commands:
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 flashAT+SYSREG: Read/Write the Registerï Set Commandï
Command:
AT+SYSREG=<direct>,<address>[,<write value>]
Response:
+SYSREG:<read value> // Only in read mode OKParametersï
<direct>: read or write register.
0: read register.
1: write register.
<address>: (uint32) register address. You can refer to Technical Reference Manuals.
<write value>: (uint32) write value (only in write mode).
AT does not check address. Make sure that the registers you are operating on are valid.
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