ESP_ERROR_CHECK(esp_event_loop_init(wifi_event_handler, NULL));

函数wifi_event_handler 没有回调

缺少了

tcpip_adapter_init();这个方法