How do i connect to a wifi network using an ESP32

Hello every one, I’m new using RTOS and I don’t really know how to connect my ESP 32 to a WIFI network.

I’ve been looking for some examples but can’t find anything.

1 Like

Hi and welcome! You can use any networking example together with ESP32 and WiFi, e.g. examples/gnrc_networking.

WiFi credentials currently have to be configured at compile-time in the Makefile:

CFLAGS += -DESP_WIFI_SSID=\"your_wifi_ssid\"
CFLAGS += -DESP_WIFI_PASS=\"your_wifi_password\"

Also make sure to select the esp_wifi module:

USEMODULE += esp_wifi

(otherwise esp_now will be the default. This can be used for peer-to-peer/mesh communication between multiple ESPs without an access point)

1 Like