Web Server AT Commands
AT+WEBSERVER: Enable/disable Wi-Fi connection configuration via Web server.
AT+WEBSERVER: Enable/disable Wi-Fi connection configuration via Web server
<enable>: Enable or disable Web server.
0: Disable the Web server and release related resources.
1: Enable Web server, which means that you can use WeChat or a browser to configure Wi-Fi connection information.
<server_port>: The Web server port number.
<connection_timeout>: The timeout for the every connection. Unit: second. Range:[21,60].
There are two ways to provide the HTML files needed by the Web server. One is to use FAT file system, and you need to enable AT FS command at this time. The other one is to use embedded files to store HTML files (default setting).
Please make sure that the maximum number of open sockets is not less than 12, you may change the number by
Max bumber of open socketsand compile the project (see Compile ESP-AT Project).
The default firmware does not support Web server AT commands (see ESP-AT Firmware Differences), but you can enable it by
AT WEB Server command supportand compile the project (see Compile ESP-AT Project).
ESP-AT supports captive portals in ESP32 series of devices. See example.
For more examples, please refer to Web Server AT Example.
The command implementation is open-source. See the source code in at/src/at_web_server_cmd.c.
Please refer to How to Implement OTA Upgrade for more OTA commands.
// Enable the Web server with port 80, and the timeout for the every connection is 50 seconds AT+WEBSERVER=1,80,50 // Disable the Web server AT+WEBSERVER=0