Closed Tipmanfrank closed 1 year ago
I cannot reproduce the problem in my environment.
Generally, when extreme response delays occur with such a mundane and basic sketch, the following conditions should be checked:
Sufficient power and current A common failure is an insufficient current. Current consumption increases, especially when SoftAP is activated simultaneously. Most importantly, the voltage drop on the VBUS (5V) line due to inrush current must be less than 330mV. Can the power supply lines connected to your ESP32 module (especially the LDO on the ESP module) withstand that?
LAN segment configuration with WiFi access points Are there any obstacles in the path of your network with your WiFi access points? Does your WiFi network broadcast on different channels with the same SSID? Are you able to isolate them?
Then, Isolate AutoConnect to narrow down the cause of the problem and verify it with some example sketches provided by the ESP32 WebServer library.
Then, if AutoConnect behavior is still not stable, please refer to the documentation here and provide the information I need to investigate.
Core Debug Level=Verbose
in the Arduino IDE and investigate any logs that may be contributing to the delay.AC_DEBUG
macro to get AutoConnect traces. Investigate error factors as well as core debug logs. See the Documentation here.Until I find out that the cause lies in AutoConnect, I will temporarily move to Discussions.
I have been testing again. I have a lot of time outs on ping and the http://IP/_ac or http://IP is answering very slowly.
I don't understand what happens. It seems like it is sometimes running ok.
<
include // Replace with WiFi.h for ESP32
include // Replace with WebServer.h for ESP32
include // For AutoConnect Wifi
// INPUTS int START_ALONE = 15; // Input to start stand alone int START_DATA = 16; // Input to start with homepage data int START_NO_WIFI = 18; // Input to start with homepage data int BUTTON_START_ALONE = LOW; int BUTTON_START_DATA = LOW; int BUTTON_NO_WIFI = LOW; int WIFICONN = LOW;
// AUTOCONNECT WebServer Server; // Replace with WebServer for ESP32 AutoConnect Portal(Server); AutoConnectConfig Config;
// Webside fra ESP void rootPage() { char content[] = "Kapsejlads.nu - HORN
Afsted med dem!"; Server.send(200, "text/plain", content); }
void setup() { Serial.begin(115200); Serial.println("SETUP START");
// Input Output // pinMode(START_ALONE, INPUT); // pinMode(START_DATA, INPUT); // pinMode(START_NO_WIFI, INPUT); Serial.println("I/O OK");
// AUTOCONNECT Config.apid = "Kapsejlads-horn"; Config.psk = "Kapsejlads.nu"; Portal.config(Config); Serial.println("AUTO CONNECT OK");
BUTTON_START_DATA = digitalRead(START_DATA); Serial.print(" BUTTON_START_DATA = "); Serial.println(BUTTON_START_DATA); // if(BUTTON_START_DATA==HIGH){ //SHOW AUTOCONNECT SCREEN //(OFF with button during startup) Server.on("/", rootPage); if (Portal.begin()) { //SWITCH ON NETWORK MAN SCREEN Serial.println(" WiFi connected: " + WiFi.localIP().toString()); } Serial.println("ROOTPAGE OK"); // } Serial.println("BUTTON WIFI START OK");
}
void loop() { // put your main code here, to run repeatedly: Portal.handleClient(); Serial.println(millis());
}