Web Server

Use ESP-AT’s built-in web server feature to help WiFi provisioning and/or Firmware Over-the-Air update.


Web Server is not enabled in ESP-AT by default. Refer to ESP-AT User Guide to build a custom image from source.


Web Server function.


lwespr_t lwesp_set_webserver(uint8_t en, lwesp_port_t port, uint16_t timeout, const lwesp_api_cmd_evt_fn evt_fn, void *const evt_arg, const uint32_t blocking)

Enables or disables Web Server.

  • en[in] Set to 1 to enable web server, 0 to disable web server.

  • port[in] The web server port number.

  • timeout[in] The timeout for the every connection. Unit: second. Range:[21,60].

  • evt_fn[in] Callback function called when command has finished. Set to NULL when not used

  • evt_arg[in] Custom argument for event callback function

  • blocking[in] Status whether command should be blocking or not


lwespOK on success, member of lwespr_t enumeration otherwise