espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.81k stars 7.32k forks source link

E (123456) wifi_init_default: netstack cb reg failed with 12308 (IDFGH-14107) #14916

Open kriegste opened 1 day ago

kriegste commented 1 day ago

Answers checklist.

General issue report

In ESP-IDF 5.3.1 with ESP32.

After using esp_wifi_set_mode(WIFI_MODE_STA); to disable the AP, this error appears:

E (123456) wifi_init_default: netstack cb reg failed with 12308

What does this error mean? And how do I fix it?

kriegste commented 1 day ago

I do a

esp_wifi_set_protocol(ESP_IF_WIFI_AP, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N | WIFI_PROTOCOL_LR);

just before changing the mode. This seems to be the cause of the error. How can I avoid this problem?