Skip to content

Wi‑Fi — Create Access Point (AP) (net_ap_mode)

What it does: Puts the ESP32 into AP mode and creates a custom Wi-Fi network with a specified name and optional password.

net_ap_mode

Inputs

  • wifi_essid: name of the network being created (SSID, text).
  • wifi_key: network password (text, can be blank for open network).

Output

  • None (statement block).

When to use it

  • When the ESP32 is to act as a hotspot for a phone or other device.
  • For local device configuration without a router.

Tips and pitfalls

  • The AP password must be at least 8 characters long, otherwise the network will not be created.
  • An empty password will create an open network, which is only suitable for testing.

Generated Python example

create_ap("ESP32-AP", "heslo1234")