Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webserver hangs up while device is still reachable by ping without problems #5725

Closed
6 tasks done
calkoe opened this issue Feb 6, 2019 · 2 comments
Closed
6 tasks done
Labels
waiting for feedback Waiting on additional info. If it's not received, the issue may be closed.

Comments

@calkoe
Copy link

calkoe commented Feb 6, 2019

Basic Infos

  • This issue complies with the issue POLICY doc.
  • I have read the documentation at readthedocs and the issue is not addressed there.
  • I have tested that the issue is present in current master branch (aka latest git).
  • I have searched the issue tracker for a similar issue.
  • If there is a stack dump, I have decoded it.
  • I have filled out all fields below.

Platform

Settings in IDE

  • Module: [Nodemcu]
  • Flash Mode: [qio]
  • Flash Size: [4MB]
  • lwip Variant: [v2 Higher Bandwidth]
  • Reset Method: [nodemcu]
  • Flash Frequency: [40Mhz]
  • CPU Frequency: [160MHz]
  • Upload Using: [SERIAL]
  • Upload Speed: [115200]

Problem Description

  • After a while (20 - 60sec) the Webserver stops answering to requests while the device is still reachable by ping.
  • After about 30sec the Webserver continues working without any problems.
  • there are not WiFi-Scans or STA the ESP tryes to connect, see simple script below.

alt text

#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
ESP8266WebServer server(80);

void handleRPC() {
  server.send(200, "application/json", "{\"id\": 2858,\"method\": \"system.getStatus\",\"payload\": {\"system\": {\"batteryPowerSupply\": true,\"batteryPercent\": 100,\"totalBytes\": 2949250,\"usedBytes\": 1004,\"freeHeap\": 35552,\"currentTaskTime\": 129867,\"status\": 5},\"wifi\": {\"ssid\": \"Wolke\",\"status\": 3,\"mode\": 3,\"ip\": \"192.168.135.163\",\"rssi\": -47},\"application\": {\"name\": \"radar\",\"version\": \"0.1\",\"statusEnable\": false,\"statusStatus\": false,\"statusText\": \"\"}},\"success\": true,\"status\": \"ok\"}");
}

void setup() {
  delay(1000);
  Serial.begin(115200);
  Serial.println();
  Serial.print("Configuring access point...");
  WiFi.softAPConfig(IPAddress(192, 168, 5, 1), IPAddress(192, 168, 5, 1), IPAddress(255, 255, 255, 0));
  WiFi.softAP("arduinoOS");

  IPAddress myIP = WiFi.softAPIP();
  Serial.print("AP IP address: ");
  Serial.println(myIP);
  server.on("/rpc", handleRPC);
  server.begin();
  Serial.println("HTTP server started");
}

void loop() {
  server.handleClient();yield();
}
@devyte
Copy link
Collaborator

devyte commented Feb 8, 2019

Please test with the following before calling softAPConfig():

WiFi.persistent(false);
WiFi.mode(WiFI_AP);

and also make sure to do a full flash wipe before flashing this sketch.

@devyte devyte added the waiting for feedback Waiting on additional info. If it's not received, the issue may be closed. label Feb 8, 2019
@devyte
Copy link
Collaborator

devyte commented Oct 31, 2019

No feedback in several months. Closing.

@devyte devyte closed this as completed Oct 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for feedback Waiting on additional info. If it's not received, the issue may be closed.
Projects
None yet
Development

No branches or pull requests

2 participants