-
When I connect to the esp32ap through the wifi network list in android. It pops up the configuration screen (great!). I configure everything and then hit connect. Instead of going to the new device IP address /_ac/success it goes to the default 172.217.28.1/_ac/success which is not reachable and barfs a page not found error from the portal popup on android (I believe the SSID is shut down after a successful connection and thus not listening). Shouldn't there be a default delay between changing the network, and the success page before shutting down the esp32ap SSID SoftAP? If so, how could I implement this. |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments
-
No, SoftAP is alive. Stop only DNS if the connection is successful.
This means that the client device (Android) leaves the ESP32's SoftAP and automatically switches connections to the same access point that the ESP32 STA just connected to. Can your android do that? |
Beta Was this translation helpful? Give feedback.
-
@wspitts2 Please take the AC_DEBUG trace. I would like to proceed to diagnose the problem a bit on my end. There have been other issue reports of redirects to 172.217.28.1/_ac/success failing after a successful connection on some Android devices. This phenomenon may be caused by the combination of a specific Android version and the ESP32 Arduino core, and is also discussed in the ESP32 repo. Also, can you reproduce the problem by changing the SoftAP IP address? I would like you to configure the |
Beta Was this translation helpful? Give feedback.
-
I will absolutely do that over the next few days! Thanks for the reply! |
Beta Was this translation helpful? Give feedback.
-
I have done what you requested. Also, here is a link to my code that I am using (without the added Debug code)... Both of these result in a failed load of the _ac/success Original: Updated: |
Beta Was this translation helpful? Give feedback.
-
@wspitts2 I will let you know the results of my diagnosis of your sketch. Your sketch is weak in several ways.
I usually don't diagnose user sketches in detail. Because I'm not debugger. But in this case, I was hoping that this issue could be a clue to a still unresolved issue with certain versions of Android. But the cause is the fragility of the sketch. I will close this issue and move it to Discussions. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much!!!
I appreciate the deep dive into this. |
Beta Was this translation helpful? Give feedback.
-
I would still like to see what you were suggesting for "I2C LCD is used, but please do not use I2C interrupts while WiFi.begin is running." right now the sketch works with the I2C attached to an LCD, but I do have some additional I2C sensors I would like to connect to this. I did a bit of a look around and nothing jumped out at me. I have included your suggestions, and use both mutex and semaphores for different tasks in the code. In your example above it needed to have the following: I also updated the loop function as follows: I have updated the code here: |
Beta Was this translation helpful? Give feedback.
-
I know it's an old thread. Let me know if I should start a new one. My log:
My Autoconnect library:
|
Beta Was this translation helpful? Give feedback.
@wspitts2 I will let you know the results of my diagnosis of your sketch. Your sketch is weak in several ways.
Unnecessary AsyncTCP and ESPAsyncWebServer are included. Please exclude these. Also, if you plan to use ESPAsyncWebServer together in the future, please be aware that it cannot coexist with the HTTP request handler of the ESP32 core library.
#ifdef ARDUINOJSON_VERSION_MAJOR >= 6
preprocessor directive is incorrect. It is a syntax error.I2C LCD is used, but please do not use I2C interrupts while WiFi.begin is running. The ESP-IDF WiFi driver is vulnerable to I2C interrupts. This issue is discussed in the ESP32 Arduino Core Repository. Some workarounds can also be found in t…