I'm new to ESP8266 so I make some kind of mistake. I have a code like below in my espconn_regist_connectcb callback:
uint32 nKeepAliveParam = 10;
espconn_set_keepalive(conn, ESPCONN_KEEPIDLE, &nKeepAliveParam);
nKeepAliveParam = 2;
espconn_set_keepalive(conn, ESPCONN_KEEPINTVL, &nKeepAliveParam);
nKeepAliveParam = 10;
espconn_set_keepalive(conn, ESPCONN_KEEPCNT, &nKeepAliveParam);
espconn_set_opt(conn, ESPCONN_KEEPALIVE);
espconn_regist_time(conn, 180, 0);
I try many different combinations but the TCP connection seems to disconnect always after 10 seconds or so.
What am I doing wrong?