Code: Select all
//#include "freertos/FreeRTOS.h"
#include "esp_wifi.h"
//#include "esp_system.h"
//#include "esp_event.h"
//#include "esp_event_loop.h"
//#include "nvs_flash.h"
#include "driver/gpio.h"
void app_main(void)
{
wifi_init_config_t config = WIFI_INIT_CONFIG_DEFAULT();
esp_wifi_init(&config);
esp_wifi_set_mode(WIFI_MODE_AP);
wifi_config_t ap_config = {
.ap = {
.ssid = "alexisESP32",
.password = "12345678",
.channel=0,
.authmode=WIFI_AUTH_OPEN,
.ssid_hidden=0,
.max_connection=4,
.beacon_interval=100
}
};
esp_wifi_set_config(WIFI_IF_AP, &ap_config);
esp_wifi_start();
};