Using the new Arduino IDE for ESP8266 and found bugs, report them here

Moderator: igrr

User avatar
By alemlishar
#61249 Hello all,

I am basically testing the example wificlient, and modified some lines to connect to my local server, and after some times it crushed with displaying the below error log, i appreciate any help, thank you, the code and the log is here below



#include <ESP8266WiFi.h>

const char* ssid = "****";
const char* password = "******";

const char* host = "******";
const char* streamId = "....................";
const char* privateKey = "....................";

void setup() {
Serial.begin(115200);
delay(10);

// We start by connecting to a WiFi network

Serial.println();
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);

WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}

Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}

int value = 0;

void loop() {
// delay(5000);
++value;

Serial.print("connecting to ");
Serial.println(host);

// Use WiFiClient class to create TCP connections
WiFiClient client;
const int httpPort = 6065;
if (!client.connect(host, httpPort)) {
Serial.println("connection failed");
return;
}

// We now create a URI for the request
client.print("hello");
client.stop();
}





Exception (29):
epc1=0x4000e1b2 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: sys
sp: 3ffffcd0 end: 3fffffb0 offset: 01a0

stack>>>
3ffffe70: 3fff017c 00000203 3fff4864 401004f4
3ffffe80: 00000000 3fff4864 3fff4864 40106ff8
3ffffe90: 3fffc278 4010268c 3fffc200 40220a78
3ffffea0: 3ffe0000 00790171 40210017 3ffefdd4
3ffffeb0: 3ffefcbc 3ffefcc4 00000011 00000001
3ffffec0: 40000f58 00000000 00000020 3ffe9aee
3ffffed0: 3fff017c 3fff4864 3ffefcdc 40223944
3ffffee0: 00000035 00000000 3ffe9ada 3ffefcc4
3ffffef0: 000000c0 3fffdcc0 3ffe8c80 40106fb4
3fffff00: 00000000 00000000 3ffe9504 3ffefcc0
3fffff10: 3ffe9ada 3ffefcc4 3fff4864 40225080
3fffff20: 3ffef9e4 3fff017c 3fff017c 3ffed740
3fffff30: 00000000 3fff4864 0000001c 3fff017c
3fffff40: 3ffe9acc 00000000 3fff4864 40224489
3fffff50: 012ba8c0 00000078 00000000 00000027
3fffff60: 00000002 0000001a 40204e9b 3ffec620
3fffff70: 3ffe9aa4 3fffdcc0 3ffe8c88 3ffe8c88
3fffff80: 40204e0e 3ffec620 3fffdab0 3fff01cc
3fffff90: 3fffdc80 00000000 3fff4864 40218f0b
3fffffa0: 40000f49 3fffdab0 3fffdab0 40000f49
<<<stack<<<

ets Jan 8 2013,rst cause:2, boot mode:(1,6)

ets Jan 8 2013,rst cause:4, boot mode:(1,6)

wdt reset
User avatar
By Henning
#61340 Hello alemlishar,

I tried your code and yes, it crashes after a while with watchdog. I tested your code with port 80 acessing my webserver. Possibly it has something to do with the number of tcp-connections (TIME-WAIT), we are opening connections very fast.
However, the reason for a watchdog is unclear for me ...

friendly regards
Henning
User avatar
By alemlishar
#61391 Hello Henning,

Basically it works for the first hundreds connection,

i tried to open the connection (Wificlient) inside setup and use that connection for the next connection in the draw, but it wouldn't allow me, in some forum its suggested to raise the voltage to more than 3.3V but that didn't help me though what would you suggest me please? i am using it for my thesis project,

Regards,