ESP-AT
When using browser-based Wi-Fi provisioning on ESP8266 through AT commands, why does AT+WEBSERVER=1,80,25 always return ERROR and fail to create the web server?
Cause: the default AT firmware does not include AT web server support.
Solution:
- In the
ESP_ATproject, run./build.py menuconfigand enable the AT web server feature. On ESP8266, you may need to disable some unnecessary options to make room for the required HTML files. - Save the configuration and run
./build.pyto compile. After the build is complete, flash the new firmware image with AT web server support to the ESP8266.
If AT+CIPSTART blocks in ESP-AT, is there any command that can interrupt it?
- ESP-AT does not provide a command to forcibly interrupt
CIPSTART. AT+CIPSTARTremains blocked until the TCP connection attempt times out.
Possible mitigations:
- Reduce the TCP connection timeout, either on the server side or the device side.
- Avoid issuing BLUFI / provisioning commands concurrently with network connection commands.
- Optimize command timing to avoid repeatedly starting
CIPSTARTwhile the network is unstable.
Why is ping latency high in ESP-AT STA mode, and how can it be reduced?
Cause:
ESP-AT defaults to AT+SLEEP=1, which enables Wi-Fi Modem-sleep. In this mode, when the device operates in Station (STA) mode, the Wi-Fi radio periodically sleeps according to the AP's DTIM interval, which increases packet latency, including ping response time.
Solution:
Disable sleep after power-on:
AT+SLEEP=0
This keeps the Wi-Fi radio active and avoids extra delay caused by the DTIM mechanism.
Notes:
- Disabling sleep improves responsiveness but increases power consumption.
- This setting only takes effect when Wi-Fi is operating in STA mode.
Does ESP-AT support custom BLE Services and Characteristics?
Yes, and the following items can all be customized:
ServiceCharacteristicDescriptor
This can be done by modifying the ble_data namespace through AT+SYSMFG. In essence, it dynamically updates the GATT table, namely gatts_data.csv.
Will a BLE UUID change in ESP-AT take effect immediately?
No.
The BLE GATT table is registered when BLE is initialized, and the UUID is a static attribute of the Attribute Table. In addition, clients usually cache the service structure after a connection is established. Therefore, after changing the UUID, BLE must be reinitialized before the new UUID can take effect.
How can UART configuration be changed in ESP-AT?
ESP-AT provides several ways to change UART configuration:
- Use
AT+UART_CURorAT+UART_DEFto change the current or default UART baud rate. - Use
AT+SYSMFGto modify factory-default parameters. - Rebuild the AT firmware with a different default UART configuration.
After establishing a Bluetooth connection with ESP32-C3 AT firmware, why does AT+SLEEP=2 fail to enter Light-sleep?
If this happens, UART0 usually prints the following error log:
E (40369) at-base: shouldn't enable sleep when softap is enabled
This means the device is currently operating in SoftAP mode, and the AT firmware does not support enabling sleep while SoftAP is active.
To fix it:
- Send
AT+CWMODE=1to switch the device toStationmode and disableSoftAP. - Then send
AT+SLEEP=2again to enableLight-sleep.
In addition, if Light-sleep is used in BLE mode, an external 32 KHz crystal is also required. Without it, sleep will not work correctly.