Aim:This Article explains how to set up ESP 32 Camera Module as an Access Point Mode to connect to it directly through WIFI from Smart Devices.
ESP32 Camera Module operates under Station and Soft Access Point Modes. In Station Mode, ESP 32 need to connect to WIFI Router for other device to access its Video Stream. In Soft Access Point Mode, ESP 32 acts as Router and other smart devices can connect to the ESP 32 directly to access its Video Stream.
Prerequisites:
ESP32 Web Cam Module - 1 Jumper Pins - 4 to 5 Numbers USB to TTL Converter (To Program the ESP32 alone)
Program the ESP 32 Camera Module:
Connect the ESP 32 Camera Module and make sure the respective Port is selected in the Arduino IDE. Then Go to File > Examples > ESP32 > Camera > CameraWebServer Code. It will load the default Code, make the below code changes to make ESP 32 work in Soft Access Point Mode.
Update SSID: const char* ssid = "ECAP-Connect"; const char* password = "ComplexPassword";
Uncomment the below code: #define CAMERA_MODEL_AI_THINKER // Has PSRAM
In Setup() Method:
Comment the below station method and add the Access point Code as shown below
// ** Station Method // WiFi.begin(ssid, password); // // while (WiFi.status() != WL_CONNECTED) { // delay(500); // Serial.print("."); // } // Serial.println(""); // Serial.println("WiFi connected");
//** Access Point Method WiFi.softAP(ssid, password);
Connect to ESP 32 Camera Module: After uploading the code, You can connect to ESP32 Module through WIFI Settings on your Smart Device and access this Local IP "192.168.4.1" in your Browser to view the Video Stream of ESP32 Camera Module.
Module:
Browser: 192.168.4.1
Click on the "Start Stream" to view the Video Stream from ESP32 WebCam.
|