WIFI disconnect from different devices

marclee
Posts: 51
Joined: Fri Apr 09, 2021 1:09 pm

WIFI disconnect from different devices

Postby marclee » Thu Mar 17, 2022 1:25 am

Configuration:
* ESP32-S2-WROVER (4MB) with ESP-IDF V5.0
* WIFI is configured as WIFI_MODE_APSTA (access point and station simultaneously)
* HTTP server is running
* HTTP queries are used to configure ESP32 station parameters and to initiate the connection of ESP32 station with an external access point

Procedure:
* ESP32 ist working in AP and station mode simultaneously.
* A smartphone or computer connects to ESP32 softAP HTTP-Server. -- So far no problem.
* ESP32-Station is configured and connection of ESP32 station with an external access point is configured and started using HTTP query commands.

This works fine with most devices.

But if I use my old Android smartphone to connect with the ESP32 softAP, the connection stops once the ESP32 station connects to an external access point. There's no log message. It seems that disconnect is initiated from smartphone, not from ESP32 softAP. Not before several minutes ESP32 softAP disconnect event appears as a log message. Other smartphones disconnect from ESP32 softAP after accessing the HTTP server. Disconnect is not initiated from ESP32 softAP. But most smartphones don't disconnect even ESP32 is connected in AP and STA mode.

This problem only affects some devices. For example the problem occurs with my old Samsung Smartphone (Android 8.0.0) and one Windows computers I have tested. The problem doesn't occur with my tested newer Samsung Smartphones and my Linux computer.

I have tried ESP-IDF V4.4 and current V5.0.

Does anybody has any idea how to evaluate that problem? How can I check why some devices disconnect from ESP32 softAP once ESP32 connects to an external access point? May the smartphone disconnect because of a timeout? Or may the ESP32 softAP disconnect without knowing? Did anybody have similar experiences?

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: WIFI disconnect from different devices

Postby WiFive » Thu Mar 17, 2022 5:17 am

If the ap the esp32 is connecting to is on a different channel, softap will also change to that channel. It should send channel switch announcement but maybe some devices don't automatically switch channels.

marclee
Posts: 51
Joined: Fri Apr 09, 2021 1:09 pm

Re: WIFI disconnect from different devices

Postby marclee » Fri Mar 18, 2022 6:47 pm

Thank you for your response.

That could be the reason for disconnecting. I have just checked it. If I force the external access point to run on the same channel than ESP32 softAP, my smartphone doesn't disconnect from softAP. But if I force the external access point to run on a diffferent channel, than the smartphone disconnects the ESP32 softAP once after ESP32 station is connected to the external access point.

Now I have two questions:
(1) Does that mean that softAP and station only work on the same channel? Or is there a way to let them run on different channels?
(2) Shouldn't a channel switch be reported at ESP verbose log?

Who is online

Users browsing this forum: No registered users and 90 guests