Configuring ESP32 to act as Access Point
In a previous article we learned how to use ESP32 as a WiFi client. If you haven’t I recommend you take a look at that article, since there are some steps in common that I’m not going to cover in much depth here.
Initialize WiFi
When we are creating a client or and Access Point, we need to initialize NETIF and create the default event loop:
1
2
ESP_ERROR_CHECK(esp_netif_init());
ESP_ERROR_CHECK(esp_event_loop_create_default());
To initialize our WiFi interface as an Access Point, we need to call:
1
esp_netif_create_default_wifi_ap();