0% found this document useful (0 votes)
13 views3 pages

Experiment No. 7

This document provides a step-by-step procedure for configuring an ESP32 development board as a Wi-Fi access point, allowing devices to connect directly without a router. It includes instructions for setting up the Arduino IDE, writing the necessary code, and uploading it to the board. The code snippet provided establishes the access point and prints the IP address for connected devices.

Uploaded by

S. O. D FLIPS
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views3 pages

Experiment No. 7

This document provides a step-by-step procedure for configuring an ESP32 development board as a Wi-Fi access point, allowing devices to connect directly without a router. It includes instructions for setting up the Arduino IDE, writing the necessary code, and uploading it to the board. The code snippet provided establishes the access point and prints the IP address for connected devices.

Uploaded by

S. O. D FLIPS
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Experiment -7

Configure/Set Your ESP32 Development broad as an access point


When you set your ESP32 board as an access point, you can be connected using any device with
Wi-Fi capabilities without connecting to your router. When you set the ESP32 as an access point,
you create its own Wi-Fi network, and nearby Wi-Fi devices (stations) can connect to it, like
your smartphone or computer. So, you don’t need to be connected to a router to control it.

PROCEDURE:
1. Plug the ESP32 development board to your PC
2. Open the Arduino IDE in computer and write the program. Save the new sketch in your
working directory
Note: Make sure you have the right board and COM port selected in your Arduino
IDE settings.
3. Define a SSID name and a password to access the ESP32 development board
4. Compile the program and upload it to the ESP32 Development Board. If everything went
as expected, you should see a “Done uploading” message. (You need to hold the ESP32
on-board Boot button while uploading).
5. After uploading the code, open the Serial Monitor at a baud rate of 115200.
CODE:
#include <WiFi.h>
const char *ssid = "SSID_Name_your_Choice";
const char *password = " Your_Choice(min 6 character) ";
IPAddress local_IP(192,168,4,22);
IPAddress gateway(192,168,4,9);
IPAddress subnet(255,255,255,0);
void setup()
{
Serial.begin(115200);
Serial.println();
Serial.print("Setting soft-AP configuration ... ");
Serial.println(WiFi.softAPConfig(local_IP, gateway, subnet) ? "Ready" : "Failed!");
Serial.print("Setting soft-AP ... ");
Serial.println(WiFi.softAP(ssid,password) ? "Ready" : "Failed!");
//WiFi.softAP(ssid);
//WiFi.softAP(ssid, password, channel, ssdi_hidden, max_connection)

Serial.print("Soft-AP IP address = ");


Serial.println(WiFi.softAPIP());
}
void loop() {
Serial.print("[Server Connected] ");
Serial.println(WiFi.softAPIP());
delay(500);
}

Result:
Through Smart phone:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy