Skip to content

Can't connect to ESP32 AP mode #3037

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

Closed
GeorgeFlorian opened this issue Jul 28, 2019 · 8 comments
Closed

Can't connect to ESP32 AP mode #3037

GeorgeFlorian opened this issue Jul 28, 2019 · 8 comments

Comments

@GeorgeFlorian
Copy link

GeorgeFlorian commented Jul 28, 2019

OS: Linux Mint 19.1
Board: ESP32 Wroover DevKitV4

[env:esp32doit-devkit-v1]
platform = https://github.com/platformio/platform-espressif32.git
board = esp32dev
framework = arduino

I am trying to connect to the ESP32 while it is in AP mode. Doing it with a Samsung Note 9 is easy peasy. Doing it with my PC however proves impossible. It will "connect" to the ESP but the webserver won't serve any page returning:

This site can’t be reached
109.108.112.114 took too long to respond.
//------------------------- logOutput(String)
void logOutput(String string1) {
	circle.push(string1);	
	Serial.println(string1);	
}

IPAddress local_IP_AP(109,108,112,114);
IPAddress gatewayAP(1,1,1,1);
IPAddress subnetAP(255,255,255,0);

 logOutput(WiFi.mode(WIFI_AP) ? "ESP32 went in AP Mode !" : "ESP couldn't go in AP_MODE. ESP_AP_STATION_MODE will start.");
  logOutput((String)"Starting AP ... ");
  logOutput(WiFi.softAP(ssidAP, passwordAP) ? "Ready" : "WiFi.softAP failed ! (Password must be at least 8 characters long )");
  delay(100);
  logOutput((String)"Setting AP configuration ... ");
  logOutput(WiFi.softAPConfig(local_IP_AP, gatewayAP, subnetAP) ? "Ready" : "Failed!");
  delay(100);
  logOutput((String)"Soft-AP IP address: ");
  logOutput(WiFi.softAPIP().toString());

These are the Verbose Logs:

[D][WiFiGeneric.cpp:336] _eventCallback(): Event: 0 - WIFI_READY
ESP32 went in AP Mode !
[D][WiFiGeneric.cpp:336] _eventCallback(): Event: 13 - AP_START
Starting AP ...
Ready
[D][WiFiGeneric.cpp:336] _eventCallback(): Event: 13 - AP_START
[D][WiFiGeneric.cpp:336] _eventCallback(): Event: 13 - AP_START
Setting AP configuration ...
Ready
Soft-AP IP address:
109.108.112.114
[D][WiFiGeneric.cpp:336] _eventCallback(): Event: 15 - AP_STACONNECTED
dhcps: send_offer>>udp_sendto result 0
[D][WiFiGeneric.cpp:336] _eventCallback(): Event: 17 - AP_STAIPASSIGNED

I have also tried without:

  logOutput((String)"Setting AP configuration ... ");
  logOutput(WiFi.softAPConfig(local_IP_AP, gatewayAP, subnetAP) ? "Ready" : "Failed!");

and it still did not work.

Also tried IPAddress gatewayAP(0,0,0,0); with no luck.

It just won't work on the PC.

I have opened a similar issue over a month ago: #2910

This is a serious bug, isn't it ? I see lots of users having similar issues.

I have a ASUS STRIX Z270E GAMING motherboard capable of Wi-Fi 802.11 a/b/g/n/ac.
I'm also using an Asus RT-N18U Router which is 802.11 n capable.

@psykokwak-com
Copy link

Hi, Maybe #2971 ?

@GeorgeFlorian
Copy link
Author

Hi, Maybe #2971 ?

Hello ! Maybe !
But I am using PlatformIO.
I used both Stable and Development platforms and the problems are on both.
I don't really know if the PlatformIO ESP32 Core is using the same commits as this one.

@GeorgeFlorian
Copy link
Author

Hi, Maybe #2971 ?

So, I've manually replaced all of the content of both sdkfiles with the ones I found here https://github.com/espressif/arduino-esp32/blob/master/tools/sdk/sdkconfig and here https://github.com/espressif/arduino-esp32/blob/master/tools/sdk/include/config/sdkconfig.h
and I have no idea if the changes are actually in place. I will continue testing.

@GeorgeFlorian
Copy link
Author

Update:

It appears as it works now ! I've only modified the sdkconfig files accordingly.

@MkLHX
Copy link

MkLHX commented Sep 12, 2019

Hello again today, update pio core 4.0.1 to 4.0.3, get troubles, rollback to 4.0.1 still have problem.
Try to back on sdkconfig values on #3037 (comment)
so what we can do to manage AP mode in ESP32 at this time?

@atanisoft
Copy link
Collaborator

@MkLHX Please open a new issue and provide your usecase/code in that new issue. Also test with 1.0.3-rc3 using the sdkconfig as-is from that release.

@MkLHX
Copy link

MkLHX commented Sep 12, 2019

Sorry but since 2 months get again and again troubles with AP, WiFi etc etc
My first constat : #2995
Read and Try:
#2910
platformio/platform-espressif32#191
#3043

@atanisoft
Copy link
Collaborator

@MkLHX Unless you open a new issue after testing with arduino-esp32 1.0.3-rc3 nobody will likely help you with your issue. In all of my testing on the latest releases soft AP works exactly as expected in all regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants