Test WIFI on ESP32 - WIFI AP Mode
Description
In this project, we are going to learn the WiFi AP mode of the ESP32.
Components
Wiring Diagram
Plug the ESP32 mainboard to the USB port of your PC.
Component Knowledge
AP Mode:
When setting AP mode, a hotspot network will be created, waiting for other WiFi devices to connect. As shown below:
Take the ESP32 as the hotspot, if a phone or PC needs to communicate with the ESP32, it must be connected to the ESP32’s hotspot. Communication is only possible after a connection is established via the ESP32.
Test Code
Before running the code, you can make any changes to the ESP32 AP name and password in the box as shown below, but in a default circumstance, it doesn’t need to modify.
Test Result
Compile and upload the code to the ESP32. After uploading successfully,we will use a USB cable to power on. Open the serial monitor and set the baud rate to 115200, then monitor will display as follows: (If open the serial monitor and set the baud rate to 115200, the information is not displayed, please press the RESET button of the ESP32)
When observing the printed information of the serial monitor, turn on the WiFi scanning function of the mobile phone, you can see the ssid_AP on ESP32, which is dubbed “ESP32_Wifi” in this program code. You can connect to it either by typing the password “12345678” or by modifying the program code to change its AP name and password.