[GH-ISSUE #899] http timeout startConfigPortal #762

Open
opened 2026-02-28 01:26:55 +03:00 by kerem · 1 comment
Owner

Originally created by @supaplextor on GitHub (Jun 16, 2019).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/899

Basic Infos

Hardware

WiFimanager Branch/Release:

  • Master
  • Development

Esp8266/Esp32:

  • ESP8266
  • ESP32

Hardware: ESP-12e, esp01, esp25

  • ESP01
  • ESP12 E/F/S (nodemcu, wemos, feather)
  • Other

ESP Core Version: 2.4.0, staging

  • 2.3.0
  • 2.4.0
  • staging (master/dev)

Not sure... How do I check?

Description

Problem description

webui does not respond during startConfigPortal


supaplex@supaplex-gtx760m:~/Arduino/libraries$ ip r
default via 192.168.4.1 dev wlp3s0 proto dhcp metric 20600 
169.254.0.0/16 dev wlp3s0 scope link metric 1000 
192.168.4.0/24 dev wlp3s0 proto kernel scope link src 192.168.4.2 metric 600 
192.168.250.0/24 dev anbox0 proto kernel scope link src 192.168.250.1 
supaplex@supaplex-gtx760m:~/Arduino/libraries$ ping 192.168.4.1
PING 192.168.4.1 (192.168.4.1) 56(84) bytes of data.
64 bytes from 192.168.4.1: icmp_seq=1 ttl=255 time=1.83 ms
64 bytes from 192.168.4.1: icmp_seq=2 ttl=255 time=1.96 ms
^C
--- 192.168.4.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 1.830/1.896/1.963/0.079 ms
supaplex@supaplex-gtx760m:~/Arduino/libraries$ netstat -tn
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0    297 192.168.50.149:54994    104.99.238.104:80       FIN_WAIT1  
tcp        0      0 192.168.4.2:55196       192.168.4.1:80          ESTABLISHED
tcp        1      0 192.168.50.149:38934    172.217.6.136:443       CLOSE_WAIT 
supaplex@supaplex-gtx760m:~/Arduino/libraries$ fg
GET http://192.168.4.1
^C
supaplex@supaplex-gtx760m:~/Arduino/libraries$ time GET http://192.168.4.1
^C

real	0m14.921s
user	0m0.076s
sys	0m0.012s

Settings in IDE

Module: NodeMcu, Wemos D1
NodeMCU

Additional libraries:

https://github.com/beegee-tokyo/DHTesp
https://github.com/MajicDesigns/MD_MAX72XX
https://github.com/MajicDesigns/MD_Parola

Sketch



void D7_handler() {
  if ( digitalRead(D7) == LOW ) {
    ESP.wdtDisable();                               // used to debug, disable wachdog timer,
    Serial.println("D7 is LOW, startConfigPortal(...)");
    Display("LEDMatrix18 192.168.4.1");
    WiFiManager wifiManager;
    wifiManager.setTimeout(180);
    wifiManager.startConfigPortal("LEDMatrix18", "hellohello");

    sprintf(curMessage, "%s", handleMacros ("Login to http://$$IP ($$SSID)").c_str() );
    Display(curMessage);
    sprintf(curMessage, "%s", handleMacros (newMessage).c_str() );

    while ( digitalRead(D7) == LOW ) { // wait for HIGH
      yield();
      delay(250);
      server.handleClient();
      dnsServer.processNextRequest();
      ArduinoOTA.handle(); // Check OTA Firmware Updates
      Serial.print(".");
    }
    Serial.println("D7 is HIGH.");
    Display("D7 is HIGH.");
    yield();
    ESP.wdtEnable(10000);
    yield();
    return;
  }
}

void loop ()
{
  server.handleClient();
  dnsServer.processNextRequest();
  ArduinoOTA.handle(); // Check OTA Firmware Updates

  D7_handler();
// ...

Debug Messages

wifiManager-serial-debug

Originally created by @supaplextor on GitHub (Jun 16, 2019). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/899 ### Basic Infos #### Hardware **WiFimanager Branch/Release:** - [ ] Master - [x] Development **Esp8266/Esp32:** - [x] ESP8266 - [ ] ESP32 **Hardware: ESP-12e, esp01, esp25** - [ ] ESP01 - [x] ESP12 E/F/S (nodemcu, wemos, feather) - [ ] Other **ESP Core Version: 2.4.0, staging** - [ ] 2.3.0 - [ ] 2.4.0 - [ ] staging (master/dev) Not sure... How do I check? ### Description Problem description webui does not respond during startConfigPortal ``` supaplex@supaplex-gtx760m:~/Arduino/libraries$ ip r default via 192.168.4.1 dev wlp3s0 proto dhcp metric 20600 169.254.0.0/16 dev wlp3s0 scope link metric 1000 192.168.4.0/24 dev wlp3s0 proto kernel scope link src 192.168.4.2 metric 600 192.168.250.0/24 dev anbox0 proto kernel scope link src 192.168.250.1 supaplex@supaplex-gtx760m:~/Arduino/libraries$ ping 192.168.4.1 PING 192.168.4.1 (192.168.4.1) 56(84) bytes of data. 64 bytes from 192.168.4.1: icmp_seq=1 ttl=255 time=1.83 ms 64 bytes from 192.168.4.1: icmp_seq=2 ttl=255 time=1.96 ms ^C --- 192.168.4.1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1002ms rtt min/avg/max/mdev = 1.830/1.896/1.963/0.079 ms supaplex@supaplex-gtx760m:~/Arduino/libraries$ netstat -tn Active Internet connections (w/o servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 297 192.168.50.149:54994 104.99.238.104:80 FIN_WAIT1 tcp 0 0 192.168.4.2:55196 192.168.4.1:80 ESTABLISHED tcp 1 0 192.168.50.149:38934 172.217.6.136:443 CLOSE_WAIT supaplex@supaplex-gtx760m:~/Arduino/libraries$ fg GET http://192.168.4.1 ^C supaplex@supaplex-gtx760m:~/Arduino/libraries$ time GET http://192.168.4.1 ^C real 0m14.921s user 0m0.076s sys 0m0.012s ``` ### Settings in IDE Module: NodeMcu, Wemos D1 NodeMCU Additional libraries: https://github.com/beegee-tokyo/DHTesp https://github.com/MajicDesigns/MD_MAX72XX https://github.com/MajicDesigns/MD_Parola ### Sketch ```cpp void D7_handler() { if ( digitalRead(D7) == LOW ) { ESP.wdtDisable(); // used to debug, disable wachdog timer, Serial.println("D7 is LOW, startConfigPortal(...)"); Display("LEDMatrix18 192.168.4.1"); WiFiManager wifiManager; wifiManager.setTimeout(180); wifiManager.startConfigPortal("LEDMatrix18", "hellohello"); sprintf(curMessage, "%s", handleMacros ("Login to http://$$IP ($$SSID)").c_str() ); Display(curMessage); sprintf(curMessage, "%s", handleMacros (newMessage).c_str() ); while ( digitalRead(D7) == LOW ) { // wait for HIGH yield(); delay(250); server.handleClient(); dnsServer.processNextRequest(); ArduinoOTA.handle(); // Check OTA Firmware Updates Serial.print("."); } Serial.println("D7 is HIGH."); Display("D7 is HIGH."); yield(); ESP.wdtEnable(10000); yield(); return; } } void loop () { server.handleClient(); dnsServer.processNextRequest(); ArduinoOTA.handle(); // Check OTA Firmware Updates D7_handler(); // ... ``` ### Debug Messages ![wifiManager-serial-debug](https://user-images.githubusercontent.com/4638774/59558336-0b17dd80-8fa5-11e9-8609-4f502285d114.png)
Author
Owner

@tablatronix commented on GitHub (Jun 16, 2019):

Isnt reset cause 4 wdt?

<!-- gh-comment-id:502449483 --> @tablatronix commented on GitHub (Jun 16, 2019): Isnt reset cause 4 wdt?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#762
No description provided.