TCP Client - disconnection after 10 minutes
Posted: Sun Nov 29, 2015 6:33 pm
Hi, I´m using Arduino MEGA + ESP8266-07 with SDK v1.4.0 firmware .
My test program reads 8 analog values and sends them to Thingspeak every 15 seconds .
For this purpose, I connect ESP8266 to ThingSpeak as a TCP client using AT+CIPSTART command, then I send the data with AT+CIPSEND and finally close the TCP connection using AT+CIPCLOSE. This loop repeats every 15 seconds.
My problem is that there is a pattern: every ten minutes, after the last AT+CIPCLOSE ,ESP8266 can´t reconnect to Thingspeak for 1min 15 sec.
I know this because my program has a do while loop that looks for OK or ALREADY CONNECTED when it sends the AT+CIPSTART command, so it stays in that loop for that minute.
I have forced TCP keep alive parameter to several values in the AT+CIPSTART command without success.
Any idea of what other parameter could be changed/tested to avoid this problem?
Thanks in advance,
Marcelo
My test program reads 8 analog values and sends them to Thingspeak every 15 seconds .
For this purpose, I connect ESP8266 to ThingSpeak as a TCP client using AT+CIPSTART command, then I send the data with AT+CIPSEND and finally close the TCP connection using AT+CIPCLOSE. This loop repeats every 15 seconds.
My problem is that there is a pattern: every ten minutes, after the last AT+CIPCLOSE ,ESP8266 can´t reconnect to Thingspeak for 1min 15 sec.
I know this because my program has a do while loop that looks for OK or ALREADY CONNECTED when it sends the AT+CIPSTART command, so it stays in that loop for that minute.
I have forced TCP keep alive parameter to several values in the AT+CIPSTART command without success.
Any idea of what other parameter could be changed/tested to avoid this problem?
Thanks in advance,
Marcelo