As our dependence on the internet deepens, it seems that people have developed a reliance on WiFi. Regardless of where they are, they are constantly searching for available WiFi hotspots to stay connected online. While connecting to WiFi is a simple task for smartphones and tablets, configuring WiFi for your ESP32 to enable remote control or IoT development requires some time. Fortunately, the ESP32 offers a convenient solution to this problem: Web Hotspot Manual Provisioning. So let’s take a look at how to implement this operation!
Step 1: Preparation
Before getting started, make sure you have the following:
- Arduino IDE installed with support for ESP32 development boards.
- WebServer and WiFi libraries installed to enable serial communication between ESP32 and SNR9816TTS modules.
Step 2: Example Code
Here’s a simple example code demonstrating how to use ESP32 to create an AP hotspot and provide a network configuration page for entering WiFi information.
#include
#include
const char *ssid = "ESP32-AP";
const char *password = ""; // Set to an empty string to indicate no password
WebServer server(2024);
void setup() {
Serial.begin(115200);
// Set ESP32 to AP mode
WiFi.softAP(ssid, password);
// Configure server handling functions
server.on("/", HTTP_GET, handleRoot);
server.on("/connect", HTTP_POST, handleConnect);
// Start server
server.begin();
Serial.println("WiFi hotspot started");
}
void loop() {
// Handle client requests
server.handleClient();
}
void handleRoot() {
// Return a simple HTML form for entering WiFi information
server.send(200, "text/html", "ESP32 WiFi Provisioning
Please enter your WiFi name and password
");
}
void handleConnect() {
// Handle connection request, attempt to connect to the specified WiFi network
String ssid = server.arg("ssid");
String password = server.arg("password");
if (ssid != "" && password != "") {
WiFi.begin(ssid.c_str(), password.c_str());
int count = 0;
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
if (++count > 60) {
Serial.println("WiFi connection failed");
server.send(400, "text/html", "Connection failed
Please check your WiFi information and try again.
");
return;
}
}
Serial.println("WiFi connected successfully");
server.send(200, "text/html", "Connection successful
Please disconnect from the network.
");
} else {
Serial.println("Incomplete WiFi information");
server.send(400, "text/html", "Error
Please enter WiFi name and password.
");
}
}
Step 3: Upload Program
In the Arduino IDE, select the correct ESP32 development board model and port, then click the “Upload” button to burn the program into the ESP32.
Step 4: Perform Manual Provisioning
- Connect to the ESP32 hotspot: Open the WiFi settings on your smartphone or computer, find and connect to the hotspot named “ESP32-AP.”
- Access the provisioning page: Enter http://192.168.33.33:2024 in your browser to access the provisioning page provided by the ESP32.

- Enter WiFi information: On the page, enter the SSID and password for your home WiFi network, then click the “Connect” button.
- Confirm provisioning result: If provisioning is successful, the browser will display “Connection successful, please disconnect the network.” Then, disconnect from the ESP32 hotspot to allow the ESP32 to automatically connect to your home WiFi.
You Might Be Interested


This guide illustrates how to integrate LVGL with the ESP32, enabling the creation of engaging graphical user interfaces for embedded systems. By configuring libraries and writing code, developers can enhance user experiences on ESP32 devices with dynamic interfaces.


This article offers a comprehensive guide on utilizing ESP32 with Arduino IDE to control a 3.5-inch LCD display, navigating through development approaches, library installations, wiring configurations, and driver modifications.


This project explores the creation of an ESP32-based web server that allows remote control of two LEDs via a web interface. Leveraging the ESP32’s Wi-Fi capabilities and web server functionality, users can toggle LEDs from any device with a web browser. It highlights the ESP32’s potential for IoT and home automation, showcasing its adaptability and convenience for controlling connected devices remotely. The project serves as a foundation for expanding web-enabled IoT applications.


This comprehensive guide elucidates the process of enabling multi-core functionality on the ESP32 microcontroller, leveraging its dual-core architecture for enhanced parallel processing capabilities. Through detailed steps and code examples, developers can effectively harness the power of both cores to optimize resource utilization and achieve versatile application scenarios.


This project integrates sonar, servo motors, and the ESP32 microcontroller to create an object detection system with applications in robotics, security, and more. It uses sound waves for distance measurement and servo motors for precise control. Key code elements control the sonar sensor and servo motor. A Processing app enhances data visualization, making this project valuable for various applications.


Unlock the potential of your ESP32 with these 4 simple steps to WiFi connectivity! Dive into the world of IoT and remote control effortlessly, as we guide you through setting up a Web Hotspot Manual Provisioning system. Say goodbye to complex configurations and hello to seamless connectivity.


In the world of IoT, the ESP32 microcontroller stands out as a versatile champion with its integrated Bluetooth Low Energy (BLE) technology. This article explores the technical intricacies and diverse applications of ESP32 BLE, shedding light on how it powers IoT solutions. From its efficient BLE integration to its robust community support, the ESP32 is a cost-effective and versatile choice for IoT development.


Dive into the world of microcontrollers with TechSparks’ comprehensive guide to the ESP32! Discover the power of this versatile chip, renowned for its integration, low power consumption, and robust security features, perfect for IoT enthusiasts and DIY projects. Explore its architecture, development boards, and key features, and unleash the full potential of your next project!