You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm still using esp-hal. 0.23.1 with esp-wifi 0.12.0 .
I have two applications, running on two very different devices (both ESP32S3), but with the WiFi connection code exactly the same. In both I have the same issue as described below:
Everything, including WiFi, is working for a long time and on multiple devices running. these apps.
The WiFi connection code is working the same as in the examples, except that because the application sometimes need to do AP and sometime STA, I'm doing
let (wifi_ap_interface, wifi_sta_interface, controller) = esp_wifi::wifi::new_ap_sta(init, wifi).unwrap();
Not sure it is relevant but stating it in case it is.
What I noticed that in the code that checks wifi_state(), before connection is made, it returns WifiState::Invalid (maybe that's ok at that stage), but after connection is made and IP received and the loop goes back to that code to wait for disconnects it returns Invalid again.
Then, because it's not StaConnected, the code continues to controller.connect_async().await again (because in the code if it's not StaConnected then it goes back to connect again). It stays in that call as long as the application is working and communicating (that call doesn't return) until WiFi disconnects (like if I turn off my Access Point).
So while things are working, they are not working the way I expect it to.
So in short, even though STA is connected and everything is working wifi_state always return Invalid (also when disconnected).
What could cause this?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm still using esp-hal. 0.23.1 with esp-wifi 0.12.0 .
I have two applications, running on two very different devices (both ESP32S3), but with the WiFi connection code exactly the same. In both I have the same issue as described below:
Everything, including WiFi, is working for a long time and on multiple devices running. these apps.
The WiFi connection code is working the same as in the examples, except that because the application sometimes need to do AP and sometime STA, I'm doing
Not sure it is relevant but stating it in case it is.
What I noticed that in the code that checks
wifi_state(), before connection is made, it returnsWifiState::Invalid(maybe that's ok at that stage), but after connection is made and IP received and the loop goes back to that code to wait for disconnects it returnsInvalidagain.Then, because it's not
StaConnected, the code continues tocontroller.connect_async().awaitagain (because in the code if it's not StaConnected then it goes back to connect again). It stays in that call as long as the application is working and communicating (that call doesn't return) until WiFi disconnects (like if I turn off my Access Point).So while things are working, they are not working the way I expect it to.
So in short, even though STA is connected and everything is working wifi_state always return Invalid (also when disconnected).
What could cause this?
Beta Was this translation helpful? Give feedback.
All reactions