Espconn api not ACKing tcp packets

gustavo
Posts: 24
Joined: Thu Apr 28, 2016 6:01 pm

Espconn api not ACKing tcp packets

Postby gustavo » Thu Oct 27, 2016 11:03 pm

Hi,
I'm trying to implement UPNP IGD port forwarding using the espconn api.

I create a connection to the router and then:
1) On the connected callback (espconn_regist_connectcb) I send the GET request for the IGD description using espconn_send;
2) on the receive callback (espconn_regist_recvcb) I parse the IGD description (which needs 4 tcp packets) and I send a request (espconn_send) asking if a port is open;
3) I receive the response on the same callback (espconn_regist_recvcb), if the port is free I send the mapping request (espconn_send).

All the tcp packets can be seen in this pcap: http://s000.tinyupload.com/?file_id=00012444369366896292

My problem is that there isn't a ACK for the second request, which makes the router re-transmit the 2) response.
And my last request isn't sent either, espconn_send doesn't return any error, but the pcap can't capture the packet.

Why isn't the ACK being sent?

gustavo
Posts: 24
Joined: Thu Apr 28, 2016 6:01 pm

Re: Espconn api not ACKing tcp packets

Postby gustavo » Thu Oct 27, 2016 11:16 pm

I have confirmed that this only happens if I try to send more data, if I don't follow to step 3) the espconn api will eventually send the ACK.

Who is online

Users browsing this forum: No registered users and 1 guest