Issue with wifiAP SSID and Password

federicolonghin
Posts: 1
Joined: Tue Jul 02, 2024 6:47 pm

Issue with wifiAP SSID and Password

Postby federicolonghin » Tue Jul 30, 2024 3:49 pm

I have a problem using the esp32s3 as AP:
everything is working file while I write the wifi's SSID and password directly in the code as preprocessor instruction #define wifi_SSID "wifiTestSSID".
As soon I change it with const char* wifi_SSID = "wifiTestSSID" it stop working, and the network isn't visible. Similar thing happens with the password, if I use const char* give me the error "password less than 8" and it bootloop.

code after:

wifi_config_t wifi_config = {
.ap = {
.ssid = {EXAMPLE_ESP_WIFI_SSID},
.ssid_len = strlen(EXAMPLE_ESP_WIFI_SSID),
.password = {EXAMPLE_ESP_WIFI_PASS},
.max_connection = EXAMPLE_MAX_STA_CONN,
.authmode = WIFI_AUTH_WPA_WPA2_PSK},
};
if (strlen(EXAMPLE_ESP_WIFI_PASS) == 0)
{
wifi_config.ap.authmode = WIFI_AUTH_OPEN;
}

ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_AP));
ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_AP, &wifi_config));
ESP_ERROR_CHECK(esp_wifi_start());

Who is online

Users browsing this forum: No registered users and 13 guests