I want to send 23 bytes every second to an android device.
My Server Init :
Code: Select all
serverConn.type = ESPCONN_TCP;
serverConn.state = ESPCONN_NONE;
serverTcp.local_port = port;
serverConn.proto.tcp = &serverTcp;
rc = espconn_set_opt (conn, ESPCONN_KEEPALIVE | ESPCONN_COPY | ESPCONN_NODELAY); // enable write buffer
rc = espconn_regist_write_finish (conn, user_tcp_write_finish); // register write finish callback
rc = espconn_regist_sentcb (conn, serverSentCb);
The Sequence of tx is:
Code: Select all
send_buf(...)
if ( ready_tosend) {
espconn_send(...)
ready_tosend = false;
}
}
user_tcp_write_finish() {
}
serverSentCb() {
ready_tosend = true;
}
The problem after ~10 sends, I don't get any serverSentCb()

If I send again anyway, I get ESPCONN_MAXNUM, and it's also stays.
Is there a way to debug this?
Please help
I'm using esp_iot_sdk_v1.5.0_15_11_27