Wifi not working after ESP-now tests.

A001FF
Posts: 12
Joined: Sat Apr 02, 2022 3:41 pm

Wifi not working after ESP-now tests.

Postby A001FF » Wed Apr 27, 2022 10:57 am

I did some ESP-Now tests with two ESP WROOM-32. And the communication went well.
After these tests, I can no longer use classic WiFi.
None of the modules can connect to an AP or set as an AP.
Strange, I can see the APs in the area with WiFi scanning using these ESPs.
But when I try to connect I get err: WIFI_REASON_AUTH_EXPIRE

Where I'am wrong ?
Is it necessary to delete the ESP-Now configuration? How?

A001FF
Posts: 12
Joined: Sat Apr 02, 2022 3:41 pm

Re: Wifi not working after ESP-now tests.

Postby A001FF » Wed Apr 27, 2022 5:14 pm

I almost found the answer.
I launched "esptool erase_flash" and the Wifi works ok now!
And I repeated the experiment several times.
The line that blocking WiFi is:
esp_wifi_set_protocol (ESP_IF_WIFI_STA, WIFI_PROTOCOL_LR);
This "WIFI_PROTOCOL_LR" is the problem. But ESP-Now works normally in tests with this setting.

Maybe I'm wrong, but when if is set this, can't use WiFi without flash_erase.
I also tried esp_wifi_set_protocol (ESP_IF_WIFI_STA, WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N);
but it didn't work.
Why ?

Who is online

Users browsing this forum: tonystuart and 92 guests