Skip to content

Unable to connect to AP after updating to 2.0.14 #8828

@qlalfdu

Description

@qlalfdu

Board

esap32 wroom32

Device Description

esp32 development board

Hardware Configuration

Use AP mode only

Version

v2.0.14

IDE Name

arduino ide 1.8.19

Operating System

windows 10

Flash frequency

80

PSRAM enabled

yes

Upload speed

115200

Description

I'm sorry.
I'm not familiar with it and I'm not good at English, so I closed the previously posted issue by mistake, so please understand that I'm uploading it again.

1, After updating the sketch I worked on in version 2.0.9 to 2.0.14, I just recompiled and uploaded it without modifying the code and tried to connect to the AP, but I could not connect because the password was wrong.

  1. If re-download version 2.0.9, it will work fine.

  2. Change the version to 2.0.14 again and upload. At this point, can access it by selecting erase all flash before sketch upload: Enabled and Uploading.

The big problem is that it is not easy for people to access what is installed on other devices.

If you want to reproduce this problem

  1. Prepare versions 2.0.9 and 2.0.14
  2. Change to 2.0.9 and Enabled erase all flash before sketch upload
  3. After uploading the sketch, check the connection with the AP
    Assuming it is installed in a high place out of reach
  4. After changing to 2.0.14, compile and update with OTA or disable erase all flash before sketch upload
  5. Check AP connection

Sketch

#include "Arduino.h"
#include <WiFi.h>
#include <WiFiClient.h>

#include <DNSServer.h>
#include "mainpage.h"
const byte DNS_PORT = 53;
DNSServer dnsServer;
#include <WebServer.h>
WebServer server(80);
IPAddress apIP(8, 8, 8, 8);
IPAddress apsubnet(255, 255, 255, 0);

String apid = "ABCD";
String appw = "12341234";

void setup() {
Serial.begin(115200);
WiFi.disconnect(true);
WiFi.mode(WIFI_AP);
WiFi.softAP(apid.c_str(), appw.c_str());
WiFi.softAPConfig(apIP, apIP, apsubnet);
WiFi.softAPConfig(apIP, apIP, apsubnet);
dnsServer.start(DNS_PORT, "*", apIP);
server.on("/", handleRoot);
server.on("/generate_204", handleRoot); //Android captive portal. Maybe not needed. Might be handled by notFound handler.
server.on("/fwlink", handleRoot); //Microsoft captive portal. Maybe not needed. Might be handled by notFound handler.
server.onNotFound(handleNotFound);
server.begin();
}

void loop() {
dnsServer.processNextRequest();
server.handleClient();
}

void handleRoot() {
server.send_P(200, "text/html", mainpage);
}

void handleNotFound() {
String message = F("File Not Found\n\n");
for (uint8_t i = 0; i < server.args(); i++) {
message += " " + server.argName(i) + ": " + server.arg(i) + "\n";
}
server.send(200, "text/plain", message);
}

///
mainpage.h

const char mainpage[] PROGMEM = R"=====(
<!DOCTYPE html>
<html>
<head>
<html>
<link rel="shortcut icon" href="#">
<meta charset="UTF-8">
</head>
<title>FanSetup</title>
<body>
<div>
hellow word!
</div>
</body>
</html>
)=====";

Debug Message

Not a compilation problem

Other Steps to Reproduce

If I revert to 2.0.9, it works fine.

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions