khoih-prog / ESP_WiFiManager

This is an ESP32 / ESP8266 WiFi Connection Manager with fallback web configuration portal. Use this library for configuring ESP32 (including ESP32-S2 and ESP32-C3), ESP8266 modules' WiFi, etc. Credentials at runtime. You can also specify static DNS servers, personalized HostName, fixed or random AP WiFi channel. With examples supporting ArduinoJson
MIT License
371 stars 97 forks source link

Cant enter wifi details - clicking configuration button does not load and crashes - FSWebServer example code - esp32 #81

Closed BratwurstUndBier closed 2 years ago

BratwurstUndBier commented 2 years ago

I am trying to set up a connection to my wifi from my eink esp32 with the library. I am using the example sketch: "ESP32_FSWebServer". I have also tried to run this project code: quotation machine (https://github.com/re-innovation/TTGO_EPaper) which uses the ESP_wifimanager library. However when uploading either of the above sketches, and connecting to the AP, i can click on information successfully, but not configuration - the web page never loads, eventually this leads to my pc disconnecting from the ESP32 (i think i restarts).

Im using the latest ESP_wifimanager library in arduino 18.13 on windows 10. My esp32 is an with an eink display( model ttgo t5_V2.3_2.13).

The code worked for a me long time ago, now i am trying to get it to work, but have the above problem. I used esptool to erase the flash and then uploaded the example FSwebserver code again but still same problem.

Am i doing anything wrong? Is there any more info i can provide why this doesnt work for me?

I apologize in advance for any simple mistakes or bad Question / forum etiquette, im just starting out with programming.

Many thanks!

khoih-prog commented 2 years ago

HI @BetweenBeltSizes

Thanks for your interest in the library.

I've retested and everything is working normally here.

I suggest that you

  1. Follow the instructions in Prerequisites and install the latest ESP32 core v2.0.2
  2. Test and be sure the LittleFS is working for your board
  3. Start for the library example ESP32_FSWebServer_DRD, then moving gradually to merge other libraries's codes to see where and when it's breaking.
  4. Post the issue on other Forums, such as Arduino, ESP32 and ask for help. Be sure to add much more info than vague description in here (ESP32 core, board, Minimal, Reproducible Example, etc.)

Sorry I don't have the time to spend here as this is not a bug of this library.

Good Luck,


Screen shot of Config Portal

Selection_124

Terminal Debug Output

Starting ESP32_FSWebServer_DRD with DoubleResetDetect using LittleFS on ESP32_DEV
ESP_WiFiManager v1.10.2
ESP_DoubleResetDetector v1.3.0
FS File: CanadaFlag_1.png, size: 40.25KB
FS File: CanadaFlag_2.png, size: 8.12KB
FS File: CanadaFlag_3.jpg, size: 10.89KB
FS File: ConfigMQTT.json, size: 153B
FS File: ConfigSW.json, size: 76B
FS File: drd.dat, size: 4B
FS File: edit.htm.gz, size: 4.02KB
FS File: favicon.ico, size: 1.12KB
FS File: graphs.js.gz, size: 1.92KB
FS File: gsm_config.bak, size: 556B
FS File: gsm_config.dat, size: 556B
FS File: gsm_cred.bak, size: 180B
FS File: gsm_cred.dat, size: 180B
FS File: index.htm, size: 3.63KB
FS File: mrd.dat, size: 4B
FS File: timezone.dat, size: 32B
FS File: wifi_cred.dat, size: 334B
FS File: wm_config.bak, size: 236B
FS File: wm_config.dat, size: 236B
FS File: wm_cp.bak, size: 4B
FS File: wm_cp.dat, size: 4B
FS File: wm_cred.bak, size: 180B
FS File: wm_cred.dat, size: 180B
FS File: wmssl_conf.bak, size: 376B
FS File: wmssl_conf.dat, size: 376B
FS File: wmssl_cred.bak, size: 180B
FS File: wmssl_cred.dat, size: 180B

[WM] RFC925 Hostname = ESP32-FSWebServerDRD
[WM] Set CORS Header to :  Your Access-Control-Allow-Origin
ESP Self-Stored: SSID = HueNet1, Pass = 12345678
[WM] * Add SSID =  HueNet1 , PW =  12345678
Got ESP Self-Stored Credentials. Timeout 120s for Config Portal
[WM] LoadWiFiCfgFile 
[WM] OK
[WM] stationIP = 192.168.2.232 , gatewayIP = 192.168.2.1
[WM] netMask = 255.255.255.0
[WM] dns1IP = 192.168.2.1 , dns2IP = 8.8.8.8
Got stored Credentials. Timeout 120s for Config Portal
[WM] Current TZ_Name = America/New_York , TZ =  EST5EDT,M3.2.0,M11.1.0
LittleFS Flag read = 0xD0D01234
doubleResetDetected
Saving config file...
Saving config file OK
Open Config Portal without Timeout: Double Reset Detected
Starting configuration portal @ 192.168.4.1:80, SSID = ESP_9ABF498, PWD = MyESP_9ABF498
[WM] WiFi.waitForConnectResult Done
[WM] SET AP
[WM] Configuring AP SSID = ESP_9ABF498
[WM] AP PWD = MyESP_9ABF498
[WM] AP Channel = 5
[WM] AP IP address = 192.168.4.1
[WM] HTTP server started
[WM] startConfigPortal : Enter loop
[WM] Request redirected to captive portal :  192.168.4.1
[WM] Request redirected to captive portal :  192.168.4.1
[WM] Request redirected to captive portal :  192.168.4.1
[WM] Request redirected to captive portal :  192.168.4.1
[WM] Connecting to new AP
[WM] Previous settings invalidated
[WM] Can't use Custom STA IP/GW/Subnet
[WM] Connect to new WiFi using new IP parameters
[WM] Connected after waiting (s) : 5.20
[WM] Local ip = 0.0.0.0
[WM] Connection result:  WL_NO_SSID_AVAIL
[WM] Failed to connect
Not connected to WiFi but continuing anyway.
[WM] * Add SSID =  HueNet1 , PW =  12345678
[WM] * Add SSID =  HueNet2 , PW =  12345678
[WM] Saving current TZ_Name = America/New_York , TZ =  EST5EDT,M3.2.0,M11.1.0
[WM] getSTAStaticIPConfig
[WM] SaveWiFiCfgFile 
[WM] stationIP = 0.0.0.0 , gatewayIP = 192.168.2.1
[WM] netMask = 255.255.255.0
[WM] dns1IP = 192.168.2.1 , dns2IP = 8.8.8.8
[WM] OK
After waiting 0.00 secs more in setup(), connection result is WL_DISCONNECTED
HTTP server started @ 0.0.0.0
Open http://esp32-fs-browser.local/edit to see the file browser
[WM] freeing allocated params!

WiFi lost. Call connectMultiWiFi in loop
[WM] ConnectMultiWiFi with :
[WM] * Flash-stored Router_SSID =  HueNet1 , Router_Pass =  12345678
[WM] * Add SSID =  HueNet1 , PW =  12345678
[WM] * Additional SSID =  HueNet1 , PW =  12345678
[WM] * Additional SSID =  HueNet2 , PW =  12345678
[WM] Connecting MultiWifi...
[WM] WiFi connected after time:  1
[WM] SSID: HueNet1 ,RSSI= -41
[WM] Channel: 4 ,IP address: 192.168.2.93