Page 1 of 1

ESP32 Wifi Component

Posted: Tue Aug 20, 2024 1:17 pm
by mnfisher
I hit upon an odd bug when using the wifi component.

I wanted to create a list of SSIDs then enter the password - connect. This worked well on the first attempt. List of SSIDs displayed, password entered and all good.

Subsequent runs failed however - and looking at the debug output it looks as though the Wifi is auto magically connecting (although the wifi component doesn't know this) then crashing the esp32.

I wrote a simple demo of this - compile and run - and it should display 'Found n SSIDs' (where n is 4 in my case)

Recompile with the connect enabled (and SSID and password entered) - then Scan for SSIDS fails (as expected).

Disable connect - recompile and Scan SSID still fails - and debug output shows connect then crash.

A workaround is to do connect with ssid and password = "" immediately after initialisation (doing disconnect doesn't work) There might be an option in the config (wifi NVS storage to tweak here?)
Wifi_test.fcfx
(12.3 KiB) Downloaded 255 times
Martin

Re: ESP32 Wifi Component

Posted: Tue Aug 20, 2024 3:17 pm
by mnfisher
Very odd - now I can't get it to connect to anything at all :-(

I notice in the output

Before
attempting to connect
Wifi Unexpected event

Maybe I should backtrack from esp tools 5.3?