You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using the WiFiManager library on the ESP32-WROOM-32D module, I encountered the following issue: after several cycles of disconnecting and reconnecting to a previously configured access point, the module becomes unresponsive. This manifests as a black screen and no response to button presses. The configuration page also becomes inaccessible.
Additionally, after such a state, it is necessary to reflash the program with the full flash memory erase option enabled. Without this, after restarting, the program operates in a completely unstable manner.
Attempts to Resolve:
Replaced the ESP32 module with a new unit.
Updated the WiFiManager library to the latest version.
Verified the correctness of the code and configuration.
Unfortunately, these actions did not yield the desired results.
Technical Details:
Module: ESP32-WROOM-32D devkitc v4
WiFiManager Library Version: [new]
Development Environment: Arduino IDE,
Firmware Version: [provide version]
I kindly request assistance in resolving this issue or guidance on steps to diagnose and fix it.
Thank you in advance for your help.
From Wifimanager 192.168.4.1/info:
`esp32
Uptime
4 mins 3 secs
Chip ID
a9286f24
Chip rev
100
Flash size
4194304 bytes
PSRAM Size
0 bytes
CPU frequency
240MHz
Memory - Free heap
216912 bytes available
Memory - Sketch size
Used / Total bytes
1046992 / 2357712
Temperature
66.67 C° / 177.60 F°
WiFi
Connected
No
Station SSID
Station IP
0.0.0.0
Station gateway
0.0.0.0
Station subnet
0.0.0.0
DNS Server
0.0.0.0
Hostname
esp32-A97894
Station MAC
24:6F:28:A9:78:94
Access point IP
192.168.4.1
Access point MAC
24:6F:28:A9:78:95
Access point hostname
espressif
BSSID
About
WiFiManager
v2.0.17
Arduino
3.1.1
Build date
Jan 25 2025 20:14:58
`
and my code Arduino IDE , Oled ssd1309
`/*
V2
Wersja testy_Ap_wifi 2
Pod projekt ORI oraz NaraTEMeratury
osiągnięto:
nazwa widziana w siecu ESPDevice
zmiana z poziomu WiFiManager (WMG) czas AP trybu i czas skanowania sieci WiFi
Łączenie z automatu do sieci zapisanych
tryb AP po przytrzymaniu 3 sek. klawisza wyboru
kontrolki stanu AP i WiFi na OLED ssd1309
na OLED wyświetla IP adr klienta albo IP konfiguracyjnej sieci trybu AP.
bool checkForSavedWiFi() {
int n = WiFi.scanNetworks(); // Skanowanie sieci
if (n == 0) {
Serial.println("Brak dostępnych sieci Wi-Fi.");
return false;
}
Serial.println("Dostępne sieci Wi-Fi:");
Serial.printf("Zapisana sieć Wi-Fi to: '%s'\n", WiFiManager().getWiFiSSID().c_str());
for (int i = 0; i < n; i++) {
Serial.printf("SSID: %s, RSSI: %d\n", WiFi.SSID(i).c_str(), WiFi.RSSI(i));
if (WiFi.SSID(i) == WiFiManager().getWiFiSSID()) {
Serial.println("Zapisana sieć Wi-Fi dostępna.");
return true;
}
}
return false;
}
void displayCurrentState() {
u8g2.clearBuffer();
// Pasek statusu
u8g2.setFont(u8g2_font_profont10_tr);
// AP status
if (isAPMode) {
u8g2.drawBox(0, 0, 20, 10); // Tło podświetlenia dla AP
u8g2.setDrawColor(0);
u8g2.drawStr(2, 8, "AP");
u8g2.setDrawColor(1);
} else {
u8g2.drawStr(2, 8, "AP");
}
// Wi-Fi status
if (WiFi.status() == WL_CONNECTED) {
u8g2.drawBox(25, 0, 20, 10); // Tło podświetlenia dla WF
u8g2.setDrawColor(0);
u8g2.drawStr(27, 8, "WF");
u8g2.setDrawColor(1);
} else {
u8g2.drawStr(27, 8, "WF");
}
// Adres IP lub komunikaty o błędach
char ipBuffer[20];
if (WiFi.status() == WL_CONNECTED) {
snprintf(ipBuffer, sizeof(ipBuffer), "IP: %s", WiFi.localIP().toString().c_str());
} else if (isAPMode) {
snprintf(ipBuffer, sizeof(ipBuffer), "AP: %s", WiFi.softAPIP().toString().c_str());
} else if (wrongPassword) {
strcpy(ipBuffer, "WiFi: wrong pass");
} else {
strcpy(ipBuffer, "Brak znanego WiFi");
}
u8g2.drawStr(0, 18, ipBuffer);
// Menu
u8g2.setFont(u8g2_font_helvR08_tr);
u8g2.drawStr(0, 35, currentMenuOption == 0 ? "> Opcja 1" : " Opcja 1");
u8g2.drawStr(0, 48, currentMenuOption == 1 ? "> Ustawienia" : " Ustawienia");
u8g2.sendBuffer();
}
void handleButtons() {
static unsigned long lastButtonPress = 0;
unsigned long currentMillis = millis();
Problem Description:
While using the WiFiManager library on the ESP32-WROOM-32D module, I encountered the following issue: after several cycles of disconnecting and reconnecting to a previously configured access point, the module becomes unresponsive. This manifests as a black screen and no response to button presses. The configuration page also becomes inaccessible.
Additionally, after such a state, it is necessary to reflash the program with the full flash memory erase option enabled. Without this, after restarting, the program operates in a completely unstable manner.
Attempts to Resolve:
Unfortunately, these actions did not yield the desired results.
Technical Details:
I kindly request assistance in resolving this issue or guidance on steps to diagnose and fix it.
Thank you in advance for your help.
From Wifimanager 192.168.4.1/info:
`esp32
Uptime
4 mins 3 secs
Chip ID
a9286f24
Chip rev
100
Flash size
4194304 bytes
PSRAM Size
0 bytes
CPU frequency
240MHz
Memory - Free heap
216912 bytes available
Memory - Sketch size
Used / Total bytes
1046992 / 2357712
Temperature
66.67 C° / 177.60 F°
WiFi
Connected
No
Station SSID
Station IP
0.0.0.0
Station gateway
0.0.0.0
Station subnet
0.0.0.0
DNS Server
0.0.0.0
Hostname
esp32-A97894
Station MAC
24:6F:28:A9:78:94
Access point IP
192.168.4.1
Access point MAC
24:6F:28:A9:78:95
Access point hostname
espressif
BSSID
About
WiFiManager
v2.0.17
Arduino
3.1.1
Build date
Jan 25 2025 20:14:58
`
and my code Arduino IDE , Oled ssd1309
`/*
V2
Wersja testy_Ap_wifi 2
Pod projekt ORI oraz NaraTEMeratury
osiągnięto:
*/
#include <WiFi.h>
#include <WiFiManager.h>
#include <U8g2lib.h>
#include <Wire.h>
// Definicje pinów dla przycisków
#define BUTTON_UP 32
#define BUTTON_DOWN 33
#define BUTTON_SELECT 27
// Inicjalizacja wyświetlacza OLED
U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/U8X8_PIN_NONE);
// Zmienne globalne
String currentMenu = "MAIN";
int currentMenuOption = 0;
bool isAPMode = false;
unsigned long lastDisplayUpdate = 0;
const unsigned long displayUpdateInterval = 500;
unsigned long lastWiFiCheckTime = 0;
unsigned long wifiCheckInterval = 15000; // 15 sekund
unsigned long apStartTime = 0;
unsigned long apTimeout = 180000; // 3 minuty
unsigned long buttonPressTime = 0;
bool buttonHeld = false;
bool wrongPassword = false; // Flaga dla złego hasła Wi-Fi
WiFiManager wifiManager;
WiFiManagerParameter customAPTimeout("apTimeout", "Czas trybu AP (ms) min.120000: ", "180000", 7);
WiFiManagerParameter customWiFiScanInterval("wifiCheckInterval", "Interwał skanowania WiFi (ms)", "15000", 7);
void setup() {
WiFi.setHostname("MyESP32Device");
}
void loop() {
unsigned long currentMillis = millis();
}
void enableAPMode() {
WiFi.disconnect();
WiFi.mode(WIFI_AP);
WiFi.softAP("ORI_setupWWW");
isAPMode = true;
apStartTime = millis();
Serial.println("Tryb AP włączony.");
}
void disableAPMode() {
WiFi.softAPdisconnect(true);
WiFi.mode(WIFI_STA);
isAPMode = false;
Serial.println("Tryb AP wyłączony.");
}
void handleAPButton() {
if (digitalRead(BUTTON_SELECT) == LOW) {
if (!buttonHeld) {
buttonPressTime = millis();
buttonHeld = true;
} else if (millis() - buttonPressTime >= 2500) {
if (!isAPMode) {
enableAPMode();
} else {
disableAPMode();
}
buttonHeld = false; // Zapobiega wielokrotnemu włączeniu/wyłączeniu
}
} else {
buttonHeld = false;
}
}
bool checkForSavedWiFi() {
int n = WiFi.scanNetworks(); // Skanowanie sieci
if (n == 0) {
Serial.println("Brak dostępnych sieci Wi-Fi.");
return false;
}
}
void displayCurrentState() {
u8g2.clearBuffer();
}
void handleButtons() {
static unsigned long lastButtonPress = 0;
unsigned long currentMillis = millis();
}
`
The text was updated successfully, but these errors were encountered: