1. Introduction
All the previous demonstrations which are related to WiFi, ESP32 operate in Station mode in which ESP32 will become a client of a WiFi network.  In this demonstration, we will make it an Access Point in which it is a WiFi emission point so that WiFi clients can connect to it. Note that ESP32 can operation in both Station and Access Point mode where it is a WiFi client and emit WiFi as well.
2. Hardware
You do not need any extra hardware.
3. Software
In order to set the WiFi mode for ESP32 we will use the function:
- WiFi.mode(mode): where mode can be: WIFI_OFF (turn off WiFi), WIFI_STA (Station mode), WIFI_AP (Access Point mode), WIFI_AP_STA (both Station and Access Point mode)
- WiFi.begin(ssid, password): use this function to make ESP32 a WiFi client that connect to a network have ssid and password. If we use this function we need not to use WiFi.mode(WIFI_STA).
WiFi.softAP(ssidAP, passwordAP):  use this function to make ESP32 an Access Point that has authentication information are ssidAP and passwordAP. If we use this function we need not to use WiFi.mode(WIFI_AP)
Let's make ESP32 an Access Point with authentication information below:
 - ssid  is "ESP32ap"
 - password is "12345678"
Note: the default IP add ress of ESP32 in AP mode is "192.168.4.1"
Create an Arduino project and save as esp32ap with the code:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#include <WiFi.h>

const char *ssid = "ESP32ap";
const char *password = "12345678";
void setup() {
  Serial.begin(115200);
  Serial.println();
  Serial.print("Configuring access point...");
  /* You can remove the password parameter if you want the AP to be open. */
  WiFi.softAP(ssid, password);

  IPAddress myIP = WiFi.softAPIP();
  Serial.print("AP IP address: ");
  Serial.println(myIP);
}

void loop() {
}
4. Result
Figure: ESP32 as AP mode with default local IP is 192.168.4.1
 Figure: from smartphone you will see AP (ESP32ap), fill password and connected