-
Notifications
You must be signed in to change notification settings - Fork 188
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
esp32ap beg a password #586
Comments
This could be a problem known as captive portal limitation on some android platforms, which may be avoided by adjusting the IP address of the DNS activated in SoftAP for android. Try AutoConnectConfig::apip with Also, You can take advantage of the following verification sketch to make sure your android device is compliant. This is a captive portal demonstration that the ESP32 Arduino core has included as an example for the DNS Server library, with the addition of password authentication. #include <Arduino.h>
#include <WiFi.h>
#include <DNSServer.h>
const byte DNS_PORT = 53;
IPAddress apIP(8,8,4,4);
DNSServer dnsServer;
WiFiServer server(80);
String responseHTML = ""
"<!DOCTYPE html><html><head><title>CaptivePortal</title></head><body>"
"<h1>Hello World!</h1><p>This is a captive portal example. All requests will "
"be redirected here.</p></body></html>";
void setup() {
delay(1000);
Serial.begin(115200);
Serial.println();
WiFi.mode(WIFI_AP);
WiFi.softAP("esp32ap", "12345678");
WiFi.softAPConfig(apIP, apIP, IPAddress(255, 255, 255, 0));
// if DNSServer is started with "*" for domain name, it will reply with
// provided IP to all DNS request
dnsServer.start(DNS_PORT, "*", apIP);
server.begin();
Serial.println("Server started");
}
void loop() {
dnsServer.processNextRequest();
WiFiClient client = server.available(); // listen for incoming clients
if (client) {
String currentLine = "";
while (client.connected()) {
if (client.available()) {
char c = client.read();
if (c == '\n') {
if (currentLine.length() == 0) {
client.println("HTTP/1.1 200 OK");
client.println("Content-type:text/html");
client.println();
client.print(responseHTML);
break;
} else {
currentLine = "";
}
} else if (c != '\r') {
currentLine += c;
}
}
}
client.stop();
}
} Combine this sketch with your android device and open esp32ap. The password is |
It may be related to espressif/arduino-esp32#4423. |
using android and esp32-s2/esp32cam
i see the esp32ap on smartphone and when i connect it beg password
using 123456789 output wrong password
https://github.com/Hieromon/AutoConnect/tree/master/examples)/WebCamServer/
https://github.com/Hieromon/AutoConnect/tree/master/examples)/FetchLED/
The text was updated successfully, but these errors were encountered: