Page 1 of 1

Calling esp_netif_init() caused a panic error

Posted: Wed Sep 01, 2021 7:28 am
by sch0bert
Hello,

I'm currently migrating my application from TCP/IP to Netif. I used to have v4.0.3 and I'm moving to v4.3 stable. I'm following the recomendations found in here:

https://docs.espressif.com/projects/esp ... ation.html

But when I initially call:

 ESP_ERROR_CHECK(esp_netif_init());

I get the next message in the console that points to this line

abort() was called at PC 0x40128b78 on core 0
0x40128b78: wifi_init at c:\users\pasca\documentos\development\build/../components/wifi/wifi.c:114 (discriminator 1)

Backtrace:0x4008f1ba:0x3ffbc190 0x4008f901:0x3ffbc1b0 0x40095776:0x3ffbc1d0 0x40128b78:0x3ffbc240 0x400d8d64:0x3ffbc340 0x401be063:0x3ffbc450
0x4008f1ba: panic_abort at C:/Users/pasca/esp-idf/components/esp_system/panic.c:367

Any hints or recomendations are welcome.

sch0bert

Re: Calling esp_netif_init() caused a panic error

Posted: Fri Sep 10, 2021 6:29 am
by filo_gr
Did you put #include "esp_netif.h" ?

Look at the examples here https://github.com/espressif/esp-idf/tr ... ng_started

Re: Calling esp_netif_init() caused a panic error

Posted: Sat Sep 11, 2021 12:52 am
by mbratch
sch0bert wrote:
Wed Sep 01, 2021 7:28 am
But when I initially call:

 ESP_ERROR_CHECK(esp_netif_init());

I get the next message in the console that points to this line

abort() was called at PC 0x40128b78 on core 0
0x40128b78: wifi_init at c:\users\pasca\documentos\development\build/../components/wifi/wifi.c:114 (discriminator 1)
...
Assuming the `abort()` was called because `esp_netif_init()` did not return ESP_OK. `esp_netif_init()` logs an error message for any case that it does not return ESP_OK giving a reason for the failure. What does your console log show before the "abort() was called..."?