In My project I initialize the ESP32 in AP with DHCP.
This is the code..
Code: Select all
void wifi_init_softap() {
wifi_event_group = xEventGroupCreate();
tcpip_adapter_init();
ESP_ERROR_CHECK(esp_event_loop_init(event_handler, NULL));
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
ESP_ERROR_CHECK(esp_wifi_init(&cfg));
wifi_config_t wifi_config = ………………..
At startup the event_handler receive:
Event 13 : SYSTEM_EVENT_AP_START
after connected
Event 15 : SYSTEM_EVENT_AP_STACONNECTED
Event 17 : SYSTEM_EVENT_AP_STAIPASSIGNED
but after disconnected sometimes (often the first time) the
Event 16 : SYSTEM_EVENT_AP_STADISCONNECTED
it is not received.
you have some ideas, thanks in advanced.