Page 1 of 1

ESP_ERROR_CHECK( esp_wifi_init(&cfg) ) line is failing

Posted: Fri Feb 09, 2018 12:09 pm
by embedded.engg
Hi,
I have code as below. The below line is always failing with error as shown below.

My code is:
static void initialise_wifi(void)
{
esp_log_level_set("wifi", ESP_LOG_NONE); // disable wifi driver logging
tcpip_adapter_init();
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
ESP_ERROR_CHECK( esp_wifi_init(&cfg) );
ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_STA) );
ESP_ERROR_CHECK( esp_wifi_start() );
}

void app_main()
{
ESP_ERROR_CHECK( esp_event_loop_init(event_handler, NULL) );
wifi_event_group = xEventGroupCreate();
initialise_wifi();
xTaskCreate(&printWiFiIP,"printWiFiIP",2048,NULL,5,NULL);
}