Free help & advice Talk to us

  • Free shipping over A$55

    Within Australia

  • Free help & advice

    We reply within 24 hours

  • 30-day returns

    12-month warranty on faults

  • Ships next business day

    When the item is in stock

Access Point Mode

Lonely Binary |

### Wi-Fi Access Point Mode In **Access Point mode (AP)**, the ESP32 acts as a Wi-Fi access point, creating its own Wi-Fi network that other devices can join. This mode works similarly to a wireless router, allowing multiple clients to connect to the ESP32. ESP32 can host a simple web server in AP mode. Devices connecting to the ESP32 can access a web page, making this mode ideal for local control interfaces, configuration pages, or monitoring systems. ESP32 AP mode can handle up to 4 simultaneous connections. ```cpp #include // Set the SSID and password for the ESP32's Access Point const char* ssid = "LonelyBinaryESP32AP"; const char* password = "123456789"; // Minimum 8 characters void setup() { // Start serial communication Serial.begin(115200); Serial.println("Setting up Access Point..."); // Set up the Access Point WiFi.softAP(ssid, password); // Print the IP address of the ESP32 in AP mode Serial.print("Access Point IP Address: "); Serial.println(WiFi.softAPIP()); } void loop() { // Nothing to do here, the ESP32 is in AP mode } ``` ```cpp WiFi.softAP(ssid, password); ``` This function configures the ESP32 to operate in **Access Point (AP) mode**. By calling this function, the ESP32 will create a local Wi-Fi network with the specified SSID and password, and devices can connect to it directly. ```cpp WiFi.softAPIP() ``` WiFi.softAPIP() is a function that returns the IP address of the ESP32’s Access Point (AP) interface. By default, the **ESP32 AP’s IP address** is usually 192.168.4.1. The DHCP server is enabled by default, meaning that all connected wireless clients will have their IP addresses assigned automatically. ![[Pasted image 20250125234600.png]]