Skip to content
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

Example CaptivePortal from DNSServer.h #10422

Closed
1 task done
RodrigoStefanini opened this issue Oct 5, 2024 · 5 comments
Closed
1 task done

Example CaptivePortal from DNSServer.h #10422

RodrigoStefanini opened this issue Oct 5, 2024 · 5 comments
Labels
Resolution: Awaiting response Waiting for response of author Type: Example Issue is related to specific example.

Comments

@RodrigoStefanini
Copy link

Related area

Esp32

Hardware specification

Esp32 wroom

Is your feature request related to a problem?

The example of CaptivePortal do not work for me, and i modify the code for be usefull.

Describe the solution you'd like

The proposal is to make the example functional, if this occurs for other users.

Describe alternatives you've considered

Change this:
"if (dnsServer.start()) {
Serial.println("Started DNS server in captive portal-mode");
} else {
Serial.println("Err: Can't start DNS server!");
}
"

Additional context

The code only work for me wen i put:

"dnsServer.start(53, "*", WiFi.softAPIP());"

I dont know if this is about some version, i used the 3.0.5 esp32 lib for arduino.

I have checked existing list of Feature requests and the Contribution Guide

  • I confirm I have checked existing list of Feature requests and Contribution Guide.
@RodrigoStefanini RodrigoStefanini added the Type: Feature request Feature request for Arduino ESP32 label Oct 5, 2024
@lbernstone
Copy link
Contributor

lbernstone commented Oct 5, 2024

Already fixed in #10366
Please include version in your issue description. It's there for a reason.

@VojtechBartoska VojtechBartoska added Type: Example Issue is related to specific example. Resolution: Awaiting response Waiting for response of author and removed Type: Feature request Feature request for Arduino ESP32 labels Oct 7, 2024
@N0edL
Copy link

N0edL commented Feb 24, 2025

Why doesnt it open the captive portal automaticly when connected on phone ?

@lbernstone
Copy link
Contributor

@N0edL Many android phones are hard coded to use 8.8.8.8 as their DNS server. If you set the softAP to use that address, it can redirect those phones.

WiFi.softAPConfig(IPAddress(8,8,8,8), IPAddress(8,8,8,8), IPAddress(255,255,255,0));

@N0edL
Copy link

N0edL commented Feb 24, 2025

@lbernstone Ahh okay what about apple ?

@lbernstone
Copy link
Contributor

Please don't hijack this issue, unless the exact same workaround works for you. Turn verbose logging on and open a new issue with the log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Awaiting response Waiting for response of author Type: Example Issue is related to specific example.
Projects
None yet
Development

No branches or pull requests

5 participants