{"action":"created","issue":{"url":"https://api.github.com/repos/esp8266/Arduino/issues/2145","repository_url":"https://api.github.com/repos/esp8266/Arduino","labels_url":"https://api.github.com/repos/esp8266/Arduino/issues/2145/labels{/name}","comments_url":"https://api.github.com/repos/esp8266/Arduino/issues/2145/comments","events_url":"https://api.github.com/repos/esp8266/Arduino/issues/2145/events","html_url":"https://github.com/esp8266/Arduino/issues/2145","id":160030667,"number":2145,"title":"Frequent resets of WifiServer especially in softap mode","user":{"login":"boguslawb","id":14364078,"avatar_url":"https://avatars.githubusercontent.com/u/14364078?v=3","gravatar_id":"","url":"https://api.github.com/users/boguslawb","html_url":"https://github.com/boguslawb","followers_url":"https://api.github.com/users/boguslawb/followers","following_url":"https://api.github.com/users/boguslawb/following{/other_user}","gists_url":"https://api.github.com/users/boguslawb/gists{/gist_id}","starred_url":"https://api.github.com/users/boguslawb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boguslawb/subscriptions","organizations_url":"https://api.github.com/users/boguslawb/orgs","repos_url":"https://api.github.com/users/boguslawb/repos","events_url":"https://api.github.com/users/boguslawb/events{/privacy}","received_events_url":"https://api.github.com/users/boguslawb/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/esp8266/Arduino/labels/type:%20troubleshooting","name":"type: troubleshooting","color":"bfdadc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-06-13T19:52:15Z","updated_at":"2016-06-14T14:58:45Z","closed_at":null,"body":"\r\n### Basic Infos\r\n\r\n#### Hardware\r\nHardware:\t\t\tNodemcu 1.0\r\nCore Version:      \tArduino 1.6.8, code from github 13.06.2016\r\n\r\n### Description\r\n\r\nProblem description\r\n\r\nCode like posted below (simple echo server) cause frequent wdt resets, exception  especially in softap mode of module. The similar code in lua 5.1.4 runs without a single problem for hours with the same client connected (which is other ESP12E module programed in Arduino using wificlient ).\r\n\r\nWhat am I doing wrong ? It is not about power issue because using the same board with Nodemcu Lua it works reliably.\r\n\r\n### Settings in IDE\r\nArduino 1.6.8\r\nModule:  \t\t\t?Nodemcu 0.9?\r\nFlash Size: \t\t?4MB/1MB(SPIFFS)?\r\nCPU Frequency:\t\t?160Mhz?\r\nUpload Using:\t\t SERIAL115200kb/s?\r\nReset Method:\t\t?ck / nodemcu?\r\n\r\n\r\n### Sketch\r\n```c++\r\n#include <ESP8266WiFi.h>\r\n#include <WiFiClient.h> \r\n\r\nconst char *ssid = \"ssid\";\r\nconst char *password = \"12345678\";\r\nconst char *host = \"192.168.7.1\";\r\nint channel = 5;\r\n\r\nWiFiServer server(8008);\r\n\r\n\r\nvoid setup() {\r\n  WiFi.persistent(false);\r\n  Serial.begin(9600);\r\n  delay(10);\r\n  Serial.println();\r\n  initWiFi();\r\n  server.begin();\r\n}\r\n\r\n\r\nvoid loop() {\r\n  yield();\r\n  WiFiClient client = server.available();   // listen for incoming clients\r\n\r\n  if (client) {                             // if you get a client,\r\n    Serial.println(\"new client\");           // print a message out the serial port\r\n    String currentLine = \"\";                // make a String to hold incoming data from the client\r\n    while (client.connected()) {            // loop while the client's connected\r\n      if (client.available()) {             // if there's bytes to read from the client,\r\n        currentLine = client.readStringUntil('\\r');\r\n        Serial.println(currentLine);\r\n        ESP.wdtFeed();\r\n        yield();\r\n      }\r\n    }\r\n    // close the connection:\r\n    \r\n    client.flush();\r\n    client.stop();\r\n    Serial.println(\"client disonnected\");\r\n  }  \r\n}\r\n\r\nvoid initWiFi(void) {\r\n  \r\n  IPAddress Ip(192, 168, 1, 1);\r\n  IPAddress NMask(255, 255, 255, 0);\r\n\r\n  WiFi.mode(WIFI_AP);\r\n  Ip.fromString(host);\r\n  WiFi.softAPConfig(Ip, Ip, NMask);\r\n if (!WiFi.softAP( ssid, password,channel,0))\r\n  {\r\n   Serial.println(\"WiFi.softAP failed.(Password too short?)\");\r\n   return;\r\n  }\r\n  IPAddress myIP = WiFi.softAPIP();\r\n  Serial.println();\r\n  Serial.print(\"AP IP address: \");\r\n  Serial.println(myIP);\r\n  long rssi = WiFi.RSSI();\r\n  Serial.print(\"signal strength (RSSI):\");\r\n  Serial.print(rssi);\r\n  Serial.println(\" dBm\");  \r\n  \r\n}\r\n\r\n```\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/35125634-frequent-resets-of-wifiserver-especially-in-softap-mode?utm_campaign=plugin&utm_content=tracker%2F14245935&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F14245935&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/esp8266/Arduino/issues/comments/225909407","html_url":"https://github.com/esp8266/Arduino/issues/2145#issuecomment-225909407","issue_url":"https://api.github.com/repos/esp8266/Arduino/issues/2145","id":225909407,"user":{"login":"boguslawb","id":14364078,"avatar_url":"https://avatars.githubusercontent.com/u/14364078?v=3","gravatar_id":"","url":"https://api.github.com/users/boguslawb","html_url":"https://github.com/boguslawb","followers_url":"https://api.github.com/users/boguslawb/followers","following_url":"https://api.github.com/users/boguslawb/following{/other_user}","gists_url":"https://api.github.com/users/boguslawb/gists{/gist_id}","starred_url":"https://api.github.com/users/boguslawb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boguslawb/subscriptions","organizations_url":"https://api.github.com/users/boguslawb/orgs","repos_url":"https://api.github.com/users/boguslawb/repos","events_url":"https://api.github.com/users/boguslawb/events{/privacy}","received_events_url":"https://api.github.com/users/boguslawb/received_events","type":"User","site_admin":false},"created_at":"2016-06-14T14:58:44Z","updated_at":"2016-06-14T14:58:44Z","body":"I don't know how to turn on syntax coloring"}}
{"actor":{"display_login":"boguslawb"}}