-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Client cannot connect ESP32 AP in AP-STA Mode #2242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What type of phone? Turn on logging in Arduino IDE (board-> esp32 dev module, tools -> Core debug level -> Verbose) and post the log. |
Hi, thank you for the response, my phone is Xiaomi Redmi 4A. How i can get the log? i've choose the Core debug level Verbose |
Start the serial monitor and upload your code. You will need to add |
owh, yes, in my code has serial begin :D , but i can't get any log except the serial message in my script.
when i stop get message "Wifi Not Connected", thats mean ESP32 has connected to some access point. |
Upload the exact code above with a Serial.begin. This is clearly not what is on your device. |
Here my void setup code :)
Maybe you need to know function get_ip and print_info, i upload too :)
|
If you want help, you need to do as asked. Upload the following code (with verbose logging enabled) and post the log:
|
Hi, this is my log
When i try to connect my phone, i got this log
But, when i try to connect my laptop and connected, i got log like this
|
the fact that when the phone connects you do not see |
Try to do an |
Hi, i've tried but with "flash download tool", but still stuck :(. maybe tomorrow i'll try with esptool.py :D |
Okee, maybe tomorrow i'll try info about wireshark :D thank you for the suggestion |
Today i've try to erase flash with esptool but still stuck in same problem :( |
Google "troubleshoot dhcp with wireshark" |
Since other devices connect with no problem and only your Xiaomi phone has problem to connect, it seems we are debugging your phone and not arduino-esp32 or your sketch. Make sure there is nothing setup or running on your phone that could possibly interfere with DHCP (no tethering of any kind like wifi hotspot or bluetooth tethering, no VPN setup or VPN app active, no network security apps etc). Also make sure that "DHCP / obtain IP automatically" or whatever the option is called in Xiaomi's MIUI is enabled for your ESP32 SSID. Also consider restoring factory defaults on your phone and retrying... (make sure you backup your phone first) |
i still learning how to trace with wireshark and still stuck because in the morning i must go to work :D :D i hope i can trace the problem |
Yes, i think i wanna try to restore factory setting my phone, who make me confuse is why my phone cannot connect only when ESP32 in AP STA Mode, but when ESP32 only AP Mode, my phone can connect to ESP32 :D :D. Today i've buy new ESP32, and got same problem. I think the problem is in my phone, maybe wifi hardware or something not compatible with ESP32. |
you have taken a screenshot of the wireshark window :) and you can actualy take a .pcap file out of it and post that file here so we can look deeply into the packets. That screenshot up there shows little to no info |
Hi, i'll try to do that, and i'll upload the result :) |
Hi, this is my log from .pcap file I think because the problem is in my phone, so i'm using app tPacketCapture in my phone and trying to get data packet when i'm connected and cannot connected to my ESP32. I'm open that .pcap file in wireshark but i still dont understand to trace, i still must studying about that :D :D |
Does your phone connect to ESP32 if you set "AP only" mode? |
Yes, my phone can connect to ESP32 if ESP32 AP Only. even if my ESP32 is set to AP_STA Mode, if that ESP32 not connect to any wifi (just as AP Only), my phone still can connect to ESP32. i'm still try to find someting configuration in my phone :D |
you can just zip it and drop here on github ;) |
Oh, yes, this is my pcap file, i have 4 file, 2 file when i can connect, and 2 file when i cannot connect :) |
funny enough I do not see any DHCP messages on either log... how did you connect and obtain IP? |
"an esptool.py erase_flash and load the firmware again" - fixed my problem, which was my perfectly good password being refused by my esp32 in AP mode. |
i just connect to ESP32 AP like connect to other wifi :)
i've try this step with 2 ESP32 board and my xiaomi phone still can't connect :( today i've got other mobile phone and i'll try to connect with my ESP32 :D |
Hi, i've try with my lenovo s890 phone, and that's phone is not get any problem to connect my ESP32. Maybe the problem is actually in my xiaomi's phone |
@diazaki there is no problem it's with library i am trying it also and having same problem |
Owh, really? what the type your phone? |
I am trying to connect even laptop from it but it doesn't, there is a simple question to ask if your phone has a problem or not. If your phone has a problem then it can not connect to any other wifi. If your phone is connecting to other router also then it has no problem esp32 has only problem. |
Hola, puedes subir el código completo, estoy e lo mismo, gracias |
Use ESP32-Arduino Core build 1.0.2. I faced the same issue on build 1.0.1. |
Any luck with this ? |
Hello all, Regarding the connection with a computer, I have problems when I use the original IP address of the ESP32 (192.168.4.1) because it is the same address as the management page of my Internet box. This address is used by many Internet boxes. To avoid this connection problem, I gave another IP address to my ESP32 (like 1.2.3.4 or whatever) and it works. When connection problems are all fixed, there may still be slowness problems with the display of pages. I improved this by indicating the size of the files before sending them: If that can help you... |
Reading through this repository I found that there are some users that have problems connecting to the ESP32's AP Mode. And there isn't a fix yet for it. I don't know how to add a header because I haven't done this before. How should that work with the following handler :
Like this maybe ?
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions. |
Hardware:
Board: DOIT ESP32 DevKit v1
Core Installation/update date: -
IDE name: Arduino IDE
Flash Frequency:80MHz
PSRAM enabled:-
Upload Speed:115200
Computer OS:Windows 10
Description:
Hi, i'm sorry before for my bad english language.
My name is Diaz, i wanna make smart plug with ESP32. I've done with my ESP8266 Before, but i need more GPIO, so i've change to ESP32.
My problem is when i've change my program to from ESP8266 to ESP32, my phone cannot connect to ESP32 Access Point when my ESP32 is connected to other Access Point (In AP-STA Mode). My phone can connect to ESP32 only in AP Mode. From three device below, only my phone who is cannot connect to my ESP32.
Can anybody help me? i've been googling and still stuck in this problem. why just my phone who cannot connect to ESP32 in AP-STA Mode,
Sketch: I'm cut my sketch because it's too long :)
#include <Arduino.h>
#include "WiFi.h"
void setup()
{
WiFi.mode(WIFI_AP_STA);
WiFi.softAP("TEST-DSP", "12345678");
WiFi.begin("spiderman", "spiderboy");
}
void loop() {
}
Debug Messages:
When my phone trying to connect my ESP32, i got authentication problem and my phone always ask to input password again.
The text was updated successfully, but these errors were encountered: