ESP32-WROVER + ESP-IDF , WiFi works in STA mode (connects to a router). Until Friday, the device worked successfully for more than a month. Physical connection to the port showed that esp_wifi_connect() now always returns ESP_ERR_WIFI_CONN.
A search for this error does not give anything sensible, there is no description of it. What this means, other than that something inside is not right, is not clear. What to do in this case is completely unclear.
The code that is called in the handler static void wifiEventHandler_Start(void* arg, esp_event_base_t event_base, int32_t event_id, void* event_data):
Code: Select all
wifi_config_t conf;
memset(&conf, 0, sizeof(wifi_config_t));
strcpy(reinterpret_cast<char*>(conf.sta.ssid), CONFIG_WIFI_SSID);
strcpy(reinterpret_cast<char*>(conf.sta.password), CONFIG_WIFI_PASS);
conf.sta.pmf_cfg.capable = true;
conf.sta.pmf_cfg.required = false;
WIFI_ERROR_CHECK_BOOL(esp_wifi_set_config(WIFI_IF_STA, &conf), "set the configuration of the ESP32 STA");
WIFI_ERROR_CHECK_BOOL(esp_wifi_connect(), "сonnect the ESP32 WiFi station to the AP");