-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wifi(init): Unexpected behavior when initializing subsystems (IDFGH-12651) #13643
Comments
#8745 Welcome to the club |
Hi @KaeLL |
Why then are return codes needed at all, if everything is recommended in the documentation? This turns out to be an extra binary code. |
The esp_wifi_deinit function will return ESP_ERR_WIFI_NOT_INIT when wifi is not inited. From which it follows that without knowing whether Wi-Fi was launched earlier, it is not clear whether esp_wifi_deinit can be used or not. esp-idf/components/esp_wifi/src/wifi_init.c Line 234 in 636ff35
|
Maybe we should introduce a bool wifi_is_inited() check function? |
Hi @safocl Change in the esp_wifi_init function |
@mhdong Did you really mean to reply to me? I don't care about reapplying configurations to an already initialized component. What I want is for init functions in IDF to be idempotent (like |
Answers checklist.
General issue report
This line is misleading because it expects initialization with the config attached, but if the subsystem is already initialized it simply returns ESP_OK. From which it is not clear whether the attached config was applied or not. But the API does not provide the ability to check whether the subsystem was initialized earlier.
Perhaps we should return a code that signals that the subsystem is already running?
The text was updated successfully, but these errors were encountered: